kou commented on code in PR #37981:
URL: https://github.com/apache/arrow/pull/37981#discussion_r1343267311


##########
cpp/src/arrow/pretty_print.h:
##########
@@ -77,6 +77,9 @@ struct PrettyPrintOptions {
 
   /// If true, display schema metadata when pretty-printing a Schema
   bool show_schema_metadata = true;
+
+  /// Delimiter for separating individual elements of an Array (e.g. ",")
+  std::string array_element_delimiter = ",";

Review Comment:
   We can change the default value to `", "` in a separated PR to solve 
GH-30951, right?



##########
cpp/src/arrow/pretty_print_test.cc:
##########
@@ -200,6 +200,53 @@ TEST_F(TestPrettyPrint, PrimitiveTypeNoNewlines) {
   CheckPrimitive<Int32Type, int32_t>(options, is_valid, values, expected, 
false);
 }
 
+TEST_F(TestPrettyPrint, PrimitiveTypeCustomArrayElementDelimiter) {
+  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;

Review Comment:
   How about removing them because we want to focus on 
`array_element_delimiter` in this test?



##########
cpp/src/arrow/pretty_print.h:
##########
@@ -77,6 +77,9 @@ struct PrettyPrintOptions {
 
   /// If true, display schema metadata when pretty-printing a Schema
   bool show_schema_metadata = true;
+
+  /// Delimiter for separating individual elements of an Array (e.g. ",")
+  std::string array_element_delimiter = ",";

Review Comment:
   How about removing `array_`?
   It seems that `array_` is redundant.



-- 
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]

Reply via email to