kevingurney commented on code in PR #37981:
URL: https://github.com/apache/arrow/pull/37981#discussion_r1344495447
##########
cpp/src/arrow/pretty_print_test.cc:
##########
@@ -1020,6 +1067,37 @@ TEST_F(TestPrettyPrint, ChunkedArrayPrimitiveType) {
CheckStream(chunked_array_2, {0}, expected_2);
}
+TEST_F(TestPrettyPrint, ChunkedArrayPrimitiveTypeCustomArrayElementDelimiter) {
+ PrettyPrintOptions options{};
+ // Display array contents on one line.
+ options.skip_new_lines = true;
+ // Display maximum of 3 elements at the beginning and at the end of the array
+ options.window = 3;
+ // Use a custom array element delimiter of " | ",
+ // rather than the default delimiter (i.e. ",").
+ options.array_element_delimiter = " | ";
+
+ const auto chunk = ArrayFromJSON(int32(), "[1, 2, null, 4, null]");
+
+ // ChunkedArray with 1 chunk
+ {
+ const ChunkedArray chunked_array(chunk);
+
+ static const char* expected = R"expected([[1 | 2 | null | 4 |
null]])expected";
+ CheckStream(chunked_array, options, expected);
+ }
+
+ // ChunkedArray with 2 chunks
+ {
+ const ChunkedArray chunked_array({chunk, chunk});
+
+ static const char* expected =
+ R"expected([[1 | 2 | null | 4 | null],[1 | 2 | null | 4 |
null]])expected";
Review Comment:
Marking this as resolved since the main discussion around naming/design is
happening in https://github.com/apache/arrow/pull/37981#discussion_r1343266917.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]