tianchen92 commented on a change in pull request #7887:
URL: https://github.com/apache/arrow/pull/7887#discussion_r484621822
##########
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:
> The difference should be this:
>
> * `AppendNull` appends a null entry in the struct
> * `AppendEmptyValue` appends a non-null entry in the struct
Thanks for your clarification, agree with you and I have updated this PR,
please take a look, thanks!
----------------------------------------------------------------
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:
[email protected]