pitrou commented on a change in pull request #7887:
URL: https://github.com/apache/arrow/pull/7887#discussion_r478514839



##########
File path: cpp/src/arrow/pretty_print.cc
##########
@@ -339,6 +339,17 @@ class ArrayPrinter : public PrettyPrinter {
     children.reserve(array.num_fields());
     for (int i = 0; i < array.num_fields(); ++i) {
       children.emplace_back(array.field(i));
+      // set field array null at index which parent struct is null,
+      // because StructBuilder#AppendNull dosen't set child null bitmap.
+      auto field_null_buf = array.field(i)->null_bitmap();
+      if (field_null_buf != nullptr) {
+        uint8_t* field_null_data = field_null_buf->mutable_data();

Review comment:
       Why exactly are you mutating a null bitmap in a pretty printer?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to