Skip to content

Commit ddb46fd

Browse files
bkietzpitrou
authored andcommitted
Add pretty-print test for fixed size list
1 parent 3256051 commit ddb46fd

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

cpp/src/arrow/pretty_print-test.cc

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,49 @@ TEST_F(TestPrettyPrint, ListType) {
355355
CheckStream(*array, {0, 1}, ex_3);
356356
}
357357

358+
TEST_F(TestPrettyPrint, FixedSizeListType) {
359+
auto list_type = fixed_size_list(int32(), 3);
360+
auto array = ArrayFromJSON(list_type,
361+
"[[null, 0, 1], [2, 3, null], null, [4, 6, 7], [8, 9, 5]]");
362+
363+
CheckArray(*array, {0, 10}, R"expected([
364+
[
365+
null,
366+
0,
367+
1
368+
],
369+
[
370+
2,
371+
3,
372+
null
373+
],
374+
null,
375+
[
376+
4,
377+
6,
378+
7
379+
],
380+
[
381+
8,
382+
9,
383+
5
384+
]
385+
])expected");
386+
CheckStream(*array, {0, 1}, R"expected([
387+
[
388+
null,
389+
...
390+
1
391+
],
392+
...
393+
[
394+
8,
395+
...
396+
5
397+
]
398+
])expected");
399+
}
400+
358401
TEST_F(TestPrettyPrint, FixedSizeBinaryType) {
359402
std::vector<bool> is_valid = {true, true, false, true, false};
360403

0 commit comments

Comments
 (0)