@@ -65,13 +65,14 @@ TEST(SchemaTests, SchemaUtils) {
65
65
{" c13" , BINARY ()},
66
66
{" c14" , OFFSETARRAY (INTEGER ())},
67
67
{" c15" , SLIDINGWINDOWMAP (INTEGER (), INTEGER ())},
68
+ {" c16" , ROW ({{" d1" , TINYINT ()}, {" d2" , ARRAY (TINYINT ())}})},
68
69
}));
69
70
70
71
auto nodes = builder.getSchemaNodes ();
71
72
nimble::test::verifySchemaNodes (
72
73
nodes,
73
74
{
74
- {nimble::Kind::Row, 23 , nimble::ScalarKind::Bool, std::nullopt , 15 },
75
+ {nimble::Kind::Row, 27 , nimble::ScalarKind::Bool, std::nullopt , 16 },
75
76
{nimble::Kind::Scalar, 0 , nimble::ScalarKind::Int8, " c1" },
76
77
{nimble::Kind::Array, 2 , nimble::ScalarKind::UInt32, " c2" },
77
78
{nimble::Kind::Scalar, 1 , nimble::ScalarKind::Int8},
@@ -101,19 +102,24 @@ TEST(SchemaTests, SchemaUtils) {
101
102
{nimble::Kind::Scalar, 22 , nimble::ScalarKind::UInt32},
102
103
{nimble::Kind::Scalar, 19 , nimble::ScalarKind::Int32},
103
104
{nimble::Kind::Scalar, 20 , nimble::ScalarKind::Int32},
105
+ {nimble::Kind::Row, 26 , nimble::ScalarKind::Bool, " c16" , 2 },
106
+ {nimble::Kind::Scalar, 23 , nimble::ScalarKind::Int8, " d1" },
107
+ {nimble::Kind::Array, 25 , nimble::ScalarKind::UInt32, " d2" },
108
+ {nimble::Kind::Scalar, 24 , nimble::ScalarKind::Int8},
104
109
});
105
110
106
- verifyLabels (nodes, {" /" , " /0" , " /1" , " /1" , " /2" , " /3" , " /3" , " /3" ,
107
- " /4" , " /5" , " /6" , " /7" , " /8" , " /9" , " /10" , " /11" ,
108
- " /12" , " /13" , " /13" , " /13" , " /14" , " /14" , " /14" , " /14" });
111
+ verifyLabels (nodes, {" /" , " /0" , " /1" , " /1" , " /2" , " /3" , " /3" ,
112
+ " /3" , " /4" , " /5" , " /6" , " /7" , " /8" , " /9" ,
113
+ " /10" , " /11" , " /12" , " /13" , " /13" , " /13" , " /14" ,
114
+ " /14" , " /14" , " /14" , " /15/" , " /15/0" , " /15/1" , " /15/1" });
109
115
110
116
fm2.addChild (" f1" );
111
117
112
118
nodes = builder.getSchemaNodes ();
113
119
nimble::test::verifySchemaNodes (
114
120
nodes,
115
121
{
116
- {nimble::Kind::Row, 23 , nimble::ScalarKind::Bool, std::nullopt , 15 },
122
+ {nimble::Kind::Row, 27 , nimble::ScalarKind::Bool, std::nullopt , 16 },
117
123
{nimble::Kind::Scalar, 0 , nimble::ScalarKind::Int8, " c1" },
118
124
{nimble::Kind::Array, 2 , nimble::ScalarKind::UInt32, " c2" },
119
125
{nimble::Kind::Scalar, 1 , nimble::ScalarKind::Int8},
@@ -122,9 +128,9 @@ TEST(SchemaTests, SchemaUtils) {
122
128
{nimble::Kind::Scalar, 4 , nimble::ScalarKind::Int8},
123
129
{nimble::Kind::Scalar, 5 , nimble::ScalarKind::Int8},
124
130
{nimble::Kind::FlatMap, 7 , nimble::ScalarKind::Float, " c5" , 1 },
125
- {nimble::Kind::Scalar, 26 , nimble::ScalarKind::Bool, " f1" },
126
- {nimble::Kind::Array, 25 , nimble::ScalarKind::UInt32},
127
- {nimble::Kind::Scalar, 24 , nimble::ScalarKind::Int64},
131
+ {nimble::Kind::Scalar, 30 , nimble::ScalarKind::Bool, " f1" },
132
+ {nimble::Kind::Array, 29 , nimble::ScalarKind::UInt32},
133
+ {nimble::Kind::Scalar, 28 , nimble::ScalarKind::Int64},
128
134
{nimble::Kind::Scalar, 8 , nimble::ScalarKind::Int16, " c6" },
129
135
{nimble::Kind::Scalar, 9 , nimble::ScalarKind::Int32, " c7" },
130
136
{nimble::Kind::Scalar, 10 , nimble::ScalarKind::Int64, " c8" },
@@ -146,12 +152,17 @@ TEST(SchemaTests, SchemaUtils) {
146
152
{nimble::Kind::Scalar, 22 , nimble::ScalarKind::UInt32},
147
153
{nimble::Kind::Scalar, 19 , nimble::ScalarKind::Int32},
148
154
{nimble::Kind::Scalar, 20 , nimble::ScalarKind::Int32},
155
+ {nimble::Kind::Row, 26 , nimble::ScalarKind::Bool, " c16" , 2 },
156
+ {nimble::Kind::Scalar, 23 , nimble::ScalarKind::Int8, " d1" },
157
+ {nimble::Kind::Array, 25 , nimble::ScalarKind::UInt32, " d2" },
158
+ {nimble::Kind::Scalar, 24 , nimble::ScalarKind::Int8},
149
159
});
150
160
151
- verifyLabels (nodes, {" /" , " /0" , " /1" , " /1" , " /2" , " /3" , " /3" ,
152
- " /3" , " /4" , " /4/f1" , " /4/f1" , " /4/f1" , " /5" , " /6" ,
153
- " /7" , " /8" , " /9" , " /10" , " /11" , " /12" , " /13" ,
154
- " /13" , " /13" , " /14" , " /14" , " /14" , " /14" });
161
+ verifyLabels (
162
+ nodes, {" /" , " /0" , " /1" , " /1" , " /2" , " /3" , " /3" , " /3" ,
163
+ " /4" , " /4/f1" , " /4/f1" , " /4/f1" , " /5" , " /6" , " /7" , " /8" ,
164
+ " /9" , " /10" , " /11" , " /12" , " /13" , " /13" , " /13" , " /14" ,
165
+ " /14" , " /14" , " /14" , " /15/" , " /15/0" , " /15/1" , " /15/1" });
155
166
156
167
fm1.addChild (" f1" );
157
168
fm1.addChild (" f2" );
@@ -162,28 +173,28 @@ TEST(SchemaTests, SchemaUtils) {
162
173
nimble::test::verifySchemaNodes (
163
174
nodes,
164
175
{
165
- {nimble::Kind::Row, 23 , nimble::ScalarKind::Bool, std::nullopt , 15 },
176
+ {nimble::Kind::Row, 27 , nimble::ScalarKind::Bool, std::nullopt , 16 },
166
177
{nimble::Kind::Scalar, 0 , nimble::ScalarKind::Int8, " c1" },
167
178
{nimble::Kind::Array, 2 , nimble::ScalarKind::UInt32, " c2" },
168
179
{nimble::Kind::Scalar, 1 , nimble::ScalarKind::Int8},
169
180
{nimble::Kind::FlatMap, 3 , nimble::ScalarKind::Int8, " c3" , 2 },
170
- {nimble::Kind::Scalar, 28 , nimble::ScalarKind::Bool, " f1" },
171
- {nimble::Kind::Scalar, 27 , nimble::ScalarKind::Int8},
172
- {nimble::Kind::Scalar, 30 , nimble::ScalarKind::Bool, " f2" },
173
- {nimble::Kind::Scalar, 29 , nimble::ScalarKind::Int8},
181
+ {nimble::Kind::Scalar, 32 , nimble::ScalarKind::Bool, " f1" },
182
+ {nimble::Kind::Scalar, 31 , nimble::ScalarKind::Int8},
183
+ {nimble::Kind::Scalar, 34 , nimble::ScalarKind::Bool, " f2" },
184
+ {nimble::Kind::Scalar, 33 , nimble::ScalarKind::Int8},
174
185
{nimble::Kind::Map, 6 , nimble::ScalarKind::UInt32, " c4" },
175
186
{nimble::Kind::Scalar, 4 , nimble::ScalarKind::Int8},
176
187
{nimble::Kind::Scalar, 5 , nimble::ScalarKind::Int8},
177
188
{nimble::Kind::FlatMap, 7 , nimble::ScalarKind::Float, " c5" , 3 },
178
- {nimble::Kind::Scalar, 26 , nimble::ScalarKind::Bool, " f1" },
179
- {nimble::Kind::Array, 25 , nimble::ScalarKind::UInt32},
180
- {nimble::Kind::Scalar, 24 , nimble::ScalarKind::Int64},
181
- {nimble::Kind::Scalar, 33 , nimble::ScalarKind::Bool, " f2" },
182
- {nimble::Kind::Array, 32 , nimble::ScalarKind::UInt32},
183
- {nimble::Kind::Scalar, 31 , nimble::ScalarKind::Int64},
184
- {nimble::Kind::Scalar, 36 , nimble::ScalarKind::Bool, " f3" },
185
- {nimble::Kind::Array, 35 , nimble::ScalarKind::UInt32},
186
- {nimble::Kind::Scalar, 34 , nimble::ScalarKind::Int64},
189
+ {nimble::Kind::Scalar, 30 , nimble::ScalarKind::Bool, " f1" },
190
+ {nimble::Kind::Array, 29 , nimble::ScalarKind::UInt32},
191
+ {nimble::Kind::Scalar, 28 , nimble::ScalarKind::Int64},
192
+ {nimble::Kind::Scalar, 37 , nimble::ScalarKind::Bool, " f2" },
193
+ {nimble::Kind::Array, 36 , nimble::ScalarKind::UInt32},
194
+ {nimble::Kind::Scalar, 35 , nimble::ScalarKind::Int64},
195
+ {nimble::Kind::Scalar, 40 , nimble::ScalarKind::Bool, " f3" },
196
+ {nimble::Kind::Array, 39 , nimble::ScalarKind::UInt32},
197
+ {nimble::Kind::Scalar, 38 , nimble::ScalarKind::Int64},
187
198
{nimble::Kind::Scalar, 8 , nimble::ScalarKind::Int16, " c6" },
188
199
{nimble::Kind::Scalar, 9 , nimble::ScalarKind::Int32, " c7" },
189
200
{nimble::Kind::Scalar, 10 , nimble::ScalarKind::Int64, " c8" },
@@ -205,15 +216,19 @@ TEST(SchemaTests, SchemaUtils) {
205
216
{nimble::Kind::Scalar, 22 , nimble::ScalarKind::UInt32},
206
217
{nimble::Kind::Scalar, 19 , nimble::ScalarKind::Int32},
207
218
{nimble::Kind::Scalar, 20 , nimble::ScalarKind::Int32},
219
+ {nimble::Kind::Row, 26 , nimble::ScalarKind::Bool, " c16" , 2 },
220
+ {nimble::Kind::Scalar, 23 , nimble::ScalarKind::Int8, " d1" },
221
+ {nimble::Kind::Array, 25 , nimble::ScalarKind::UInt32, " d2" },
222
+ {nimble::Kind::Scalar, 24 , nimble::ScalarKind::Int8},
208
223
});
209
224
210
225
verifyLabels (
211
- nodes,
212
- { " / " , " /0 " , " /1 " , " /1 " , " /2 " , " /2/f1 " , " /2/f1 " , " /2/f2 " ,
213
- " /2/f2 " , " /3 " , " /3 " , " /3 " , " /4" , " /4/f1 " , " /4/f1 " , " /4/f1 " ,
214
- " /4/f2 " , " /4/f2 " , " /4/f2 " , " /4/f3 " , " /4/f3 " , " /4/f3 " , " /5 " , " /6 " ,
215
- " /7 " , " /8 " , " /9 " , " /10 " , " /11 " , " /12 " , " /13 " , " /13 " ,
216
- " /13 " , " /14" , " /14 " , " /14 " , " /14 " });
226
+ nodes, { " / " , " /0 " , " /1 " , " /1 " , " /2 " , " /2/f1 " , " /2/f1 " ,
227
+ " /2/f2 " , " /2/f2 " , " /3 " , " /3 " , " /3 " , " /4 " , " /4/f1 " ,
228
+ " /4/f1 " , " /4/f1 " , " /4/f2 " , " /4/f2 " , " /4/f2 " , " /4/f3 " , " /4/f3 " ,
229
+ " /4/f3 " , " /5 " , " /6 " , " /7 " , " /8 " , " /9 " , " /10 " ,
230
+ " /11 " , " /12 " , " /13 " , " /13 " , " /13 " , " /14 " , " /14 " ,
231
+ " /14 " , " /14" , " /15/ " , " /15/0 " , " /15/1 " , " /15/1 " });
217
232
}
218
233
219
234
TEST (SchemaTests, RoundTrip) {
@@ -226,8 +241,12 @@ TEST(SchemaTests, RoundTrip) {
226
241
// c5:BOOL,
227
242
// c6:OFFSETARRAY<FLOAT>,
228
243
// c7:SLIDINGWINDOWMAP<INT, INT>)
244
+ // c8:ROW(
245
+ // d1:TINYINT,
246
+ // d2:ARRAY<UINT>)
247
+ // )
229
248
230
- auto row = builder.createRowTypeBuilder (7 );
249
+ auto row = builder.createRowTypeBuilder (8 );
231
250
{
232
251
auto scalar = builder.createScalarTypeBuilder (nimble::ScalarKind::Int32);
233
252
row->addChild (" c1" , scalar);
@@ -268,11 +287,24 @@ TEST(SchemaTests, RoundTrip) {
268
287
row->addChild (" c7" , slidingWindowMap);
269
288
}
270
289
290
+ {
291
+ auto row2 = builder.createRowTypeBuilder (2 );
292
+ auto scalar1 = builder.createScalarTypeBuilder (nimble::ScalarKind::Int8);
293
+ row2->addChild (" d1" , scalar1);
294
+
295
+ auto array = builder.createArrayTypeBuilder ();
296
+ auto elements = builder.createScalarTypeBuilder (nimble::ScalarKind::UInt32);
297
+ array->setChildren (elements);
298
+ row2->addChild (" d2" , array);
299
+
300
+ row->addChild (" c8" , row2);
301
+ }
302
+
271
303
auto nodes = builder.getSchemaNodes ();
272
304
nimble::test::verifySchemaNodes (
273
305
nodes,
274
306
{
275
- {nimble::Kind::Row, 0 , nimble::ScalarKind::Bool, std::nullopt , 7 },
307
+ {nimble::Kind::Row, 0 , nimble::ScalarKind::Bool, std::nullopt , 8 },
276
308
{nimble::Kind::Scalar, 1 , nimble::ScalarKind::Int32, " c1" , 0 },
277
309
{nimble::Kind::FlatMap, 2 , nimble::ScalarKind::Int8, " c2" , 0 },
278
310
{nimble::Kind::Map, 3 , nimble::ScalarKind::UInt32, " c3" },
@@ -295,6 +327,10 @@ TEST(SchemaTests, RoundTrip) {
295
327
{nimble::Kind::Scalar, 12 , nimble::ScalarKind::UInt32, std::nullopt },
296
328
{nimble::Kind::Scalar, 13 , nimble::ScalarKind::Int32, std::nullopt },
297
329
{nimble::Kind::Scalar, 14 , nimble::ScalarKind::Int32, std::nullopt },
330
+ {nimble::Kind::Row, 15 , nimble::ScalarKind::Bool, " c8" , 2 },
331
+ {nimble::Kind::Scalar, 16 , nimble::ScalarKind::Int8, " d1" },
332
+ {nimble::Kind::Array, 17 , nimble::ScalarKind::UInt32, " d2" },
333
+ {nimble::Kind::Scalar, 18 , nimble::ScalarKind::UInt32},
298
334
});
299
335
300
336
verifyLabels (
@@ -313,7 +349,11 @@ TEST(SchemaTests, RoundTrip) {
313
349
" /6" ,
314
350
" /6" ,
315
351
" /6" ,
316
- " /6" });
352
+ " /6" ,
353
+ " /7/" ,
354
+ " /7/0" ,
355
+ " /7/1" ,
356
+ " /7/1" });
317
357
318
358
{
319
359
auto array = builder.createArrayTypeBuilder ();
@@ -339,21 +379,21 @@ TEST(SchemaTests, RoundTrip) {
339
379
nimble::test::verifySchemaNodes (
340
380
nodes,
341
381
{
342
- {nimble::Kind::Row, 0 , nimble::ScalarKind::Bool, std::nullopt , 7 },
382
+ {nimble::Kind::Row, 0 , nimble::ScalarKind::Bool, std::nullopt , 8 },
343
383
{nimble::Kind::Scalar, 1 , nimble::ScalarKind::Int32, " c1" , 0 },
344
384
{nimble::Kind::FlatMap, 2 , nimble::ScalarKind::Int8, " c2" , 2 },
345
- {nimble::Kind::Scalar, 17 , nimble::ScalarKind::Bool, " f1" },
346
- {nimble::Kind::Array, 15 , nimble::ScalarKind::UInt32},
347
- {nimble::Kind::Scalar, 16 , nimble::ScalarKind::Double},
348
- {nimble::Kind::Scalar, 20 , nimble::ScalarKind::Bool, " f2" },
349
- {nimble::Kind::Array, 18 , nimble::ScalarKind::UInt32},
350
- {nimble::Kind::Scalar, 19 , nimble::ScalarKind::Double},
385
+ {nimble::Kind::Scalar, 21 , nimble::ScalarKind::Bool, " f1" },
386
+ {nimble::Kind::Array, 19 , nimble::ScalarKind::UInt32},
387
+ {nimble::Kind::Scalar, 20 , nimble::ScalarKind::Double},
388
+ {nimble::Kind::Scalar, 24 , nimble::ScalarKind::Bool, " f2" },
389
+ {nimble::Kind::Array, 22 , nimble::ScalarKind::UInt32},
390
+ {nimble::Kind::Scalar, 23 , nimble::ScalarKind::Double},
351
391
{nimble::Kind::Map, 3 , nimble::ScalarKind::UInt32, " c3" },
352
392
{nimble::Kind::Scalar, 4 , nimble::ScalarKind::String},
353
393
{nimble::Kind::Scalar, 5 , nimble::ScalarKind::Float},
354
394
{nimble::Kind::FlatMap, 6 , nimble::ScalarKind::Int64, " c4" , 1 },
355
- {nimble::Kind::Scalar, 22 , nimble::ScalarKind::Bool, " f1" },
356
- {nimble::Kind::Scalar, 21 , nimble::ScalarKind::Int32},
395
+ {nimble::Kind::Scalar, 26 , nimble::ScalarKind::Bool, " f1" },
396
+ {nimble::Kind::Scalar, 25 , nimble::ScalarKind::Int32},
357
397
{nimble::Kind::Scalar, 7 , nimble::ScalarKind::Bool, " c5" },
358
398
{nimble::Kind::ArrayWithOffsets, 9 , nimble::ScalarKind::UInt32, " c6" },
359
399
{nimble::Kind::Scalar, 8 , nimble::ScalarKind::UInt32},
@@ -365,12 +405,17 @@ TEST(SchemaTests, RoundTrip) {
365
405
{nimble::Kind::Scalar, 12 , nimble::ScalarKind::UInt32, std::nullopt },
366
406
{nimble::Kind::Scalar, 13 , nimble::ScalarKind::Int32, std::nullopt },
367
407
{nimble::Kind::Scalar, 14 , nimble::ScalarKind::Int32, std::nullopt },
408
+ {nimble::Kind::Row, 15 , nimble::ScalarKind::Bool, " c8" , 2 },
409
+ {nimble::Kind::Scalar, 16 , nimble::ScalarKind::Int8, " d1" },
410
+ {nimble::Kind::Array, 17 , nimble::ScalarKind::UInt32, " d2" },
411
+ {nimble::Kind::Scalar, 18 , nimble::ScalarKind::UInt32},
368
412
});
369
413
370
414
verifyLabels (
371
- nodes, {" /" , " /0" , " /1" , " /1/f1" , " /1/f1" , " /1/f1" , " /1/f2" , " /1/f2" ,
372
- " /1/f2" , " /2" , " /2" , " /2" , " /3" , " /3/f1" , " /3/f1" , " /4" ,
373
- " /5" , " /5" , " /5" , " /6" , " /6" , " /6" , " /6" });
415
+ nodes,
416
+ {" /" , " /0" , " /1" , " /1/f1" , " /1/f1" , " /1/f1" , " /1/f2" , " /1/f2" , " /1/f2" ,
417
+ " /2" , " /2" , " /2" , " /3" , " /3/f1" , " /3/f1" , " /4" , " /5" , " /5" ,
418
+ " /5" , " /6" , " /6" , " /6" , " /6" , " /7/" , " /7/0" , " /7/1" , " /7/1" });
374
419
375
420
{
376
421
auto array = builder.createArrayTypeBuilder ();
@@ -389,26 +434,26 @@ TEST(SchemaTests, RoundTrip) {
389
434
nimble::test::verifySchemaNodes (
390
435
nodes,
391
436
{
392
- {nimble::Kind::Row, 0 , nimble::ScalarKind::Bool, std::nullopt , 7 },
437
+ {nimble::Kind::Row, 0 , nimble::ScalarKind::Bool, std::nullopt , 8 },
393
438
{nimble::Kind::Scalar, 1 , nimble::ScalarKind::Int32, " c1" , 0 },
394
439
{nimble::Kind::FlatMap, 2 , nimble::ScalarKind::Int8, " c2" , 3 },
395
- {nimble::Kind::Scalar, 17 , nimble::ScalarKind::Bool, " f1" },
396
- {nimble::Kind::Array, 15 , nimble::ScalarKind::UInt32},
397
- {nimble::Kind::Scalar, 16 , nimble::ScalarKind::Double},
398
- {nimble::Kind::Scalar, 20 , nimble::ScalarKind::Bool, " f2" },
399
- {nimble::Kind::Array, 18 , nimble::ScalarKind::UInt32},
400
- {nimble::Kind::Scalar, 19 , nimble::ScalarKind::Double},
401
- {nimble::Kind::Scalar, 25 , nimble::ScalarKind::Bool, " f3" },
402
- {nimble::Kind::Array, 23 , nimble::ScalarKind::UInt32},
403
- {nimble::Kind::Scalar, 24 , nimble::ScalarKind::Double},
440
+ {nimble::Kind::Scalar, 21 , nimble::ScalarKind::Bool, " f1" },
441
+ {nimble::Kind::Array, 19 , nimble::ScalarKind::UInt32},
442
+ {nimble::Kind::Scalar, 20 , nimble::ScalarKind::Double},
443
+ {nimble::Kind::Scalar, 24 , nimble::ScalarKind::Bool, " f2" },
444
+ {nimble::Kind::Array, 22 , nimble::ScalarKind::UInt32},
445
+ {nimble::Kind::Scalar, 23 , nimble::ScalarKind::Double},
446
+ {nimble::Kind::Scalar, 29 , nimble::ScalarKind::Bool, " f3" },
447
+ {nimble::Kind::Array, 27 , nimble::ScalarKind::UInt32},
448
+ {nimble::Kind::Scalar, 28 , nimble::ScalarKind::Double},
404
449
{nimble::Kind::Map, 3 , nimble::ScalarKind::UInt32, " c3" },
405
450
{nimble::Kind::Scalar, 4 , nimble::ScalarKind::String},
406
451
{nimble::Kind::Scalar, 5 , nimble::ScalarKind::Float},
407
452
{nimble::Kind::FlatMap, 6 , nimble::ScalarKind::Int64, " c4" , 2 },
408
- {nimble::Kind::Scalar, 22 , nimble::ScalarKind::Bool, " f1" },
409
- {nimble::Kind::Scalar, 21 , nimble::ScalarKind::Int32},
410
- {nimble::Kind::Scalar, 27 , nimble::ScalarKind::Bool, " f2" },
411
- {nimble::Kind::Scalar, 26 , nimble::ScalarKind::Int32},
453
+ {nimble::Kind::Scalar, 26 , nimble::ScalarKind::Bool, " f1" },
454
+ {nimble::Kind::Scalar, 25 , nimble::ScalarKind::Int32},
455
+ {nimble::Kind::Scalar, 31 , nimble::ScalarKind::Bool, " f2" },
456
+ {nimble::Kind::Scalar, 30 , nimble::ScalarKind::Int32},
412
457
{nimble::Kind::Scalar, 7 , nimble::ScalarKind::Bool, " c5" },
413
458
{nimble::Kind::ArrayWithOffsets, 9 , nimble::ScalarKind::UInt32, " c6" },
414
459
{nimble::Kind::Scalar, 8 , nimble::ScalarKind::UInt32},
@@ -420,13 +465,18 @@ TEST(SchemaTests, RoundTrip) {
420
465
{nimble::Kind::Scalar, 12 , nimble::ScalarKind::UInt32, std::nullopt },
421
466
{nimble::Kind::Scalar, 13 , nimble::ScalarKind::Int32, std::nullopt },
422
467
{nimble::Kind::Scalar, 14 , nimble::ScalarKind::Int32, std::nullopt },
468
+ {nimble::Kind::Row, 15 , nimble::ScalarKind::Bool, " c8" , 2 },
469
+ {nimble::Kind::Scalar, 16 , nimble::ScalarKind::Int8, " d1" },
470
+ {nimble::Kind::Array, 17 , nimble::ScalarKind::UInt32, " d2" },
471
+ {nimble::Kind::Scalar, 18 , nimble::ScalarKind::UInt32},
423
472
});
424
473
425
474
verifyLabels (
426
- nodes, {" /" , " /0" , " /1" , " /1/f1" , " /1/f1" , " /1/f1" , " /1/f2" ,
427
- " /1/f2" , " /1/f2" , " /1/f3" , " /1/f3" , " /1/f3" , " /2" , " /2" ,
428
- " /2" , " /3" , " /3/f1" , " /3/f1" , " /3/f2" , " /3/f2" , " /4" ,
429
- " /5" , " /5" , " /5" , " /6" , " /6" , " /6" , " /6" });
475
+ nodes,
476
+ {" /" , " /0" , " /1" , " /1/f1" , " /1/f1" , " /1/f1" , " /1/f2" , " /1/f2" ,
477
+ " /1/f2" , " /1/f3" , " /1/f3" , " /1/f3" , " /2" , " /2" , " /2" , " /3" ,
478
+ " /3/f1" , " /3/f1" , " /3/f2" , " /3/f2" , " /4" , " /5" , " /5" , " /5" ,
479
+ " /6" , " /6" , " /6" , " /6" , " /7/" , " /7/0" , " /7/1" , " /7/1" });
430
480
431
481
auto result = nimble::SchemaReader::getSchema (nodes);
432
482
nimble::test::compareSchema (nodes, result);
0 commit comments