lidavidm commented on a change in pull request #11339:
URL: https://github.com/apache/arrow/pull/11339#discussion_r723414055



##########
File path: cpp/src/arrow/pretty_print.cc
##########
@@ -54,17 +57,21 @@ class PrettyPrinter {
   PrettyPrinter(const PrettyPrintOptions& options, std::ostream* sink)
       : options_(options), indent_(options.indent), sink_(sink) {}
 
-  void Write(const char* data);
-  void Write(const std::string& data);
-  void WriteIndented(const char* data);
-  void WriteIndented(const std::string& data);
-  void Newline();
-  void Indent();
+  inline void Write(util::string_view data);
+  inline void WriteIndented(util::string_view data);
+  inline void Newline();
+  inline void Indent();
+  inline void IndentAfterNewline();
   void OpenArray(const Array& array);
   void CloseArray(const Array& array);
-
   void Flush() { (*sink_) << std::flush; }
 
+  PrettyPrintOptions ChildOptions() const {
+    PrettyPrintOptions child_options = options_;
+    child_options.indent = indent_;
+    return child_options;
+  }

Review comment:
       This fixes the case of a non-default indent_size not being propagated, 
right? Should we add a test for that?




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