emkornfield commented on a change in pull request #8589:
URL: https://github.com/apache/arrow/pull/8589#discussion_r517512787



##########
File path: cpp/src/parquet/column_writer.cc
##########
@@ -1230,8 +1230,9 @@ class TypedColumnWriterImpl : public ColumnWriterImpl, 
public TypedColumnWriter<
     buffers[0] = bits_buffer_;
     // Should be a leaf array.
     DCHECK_EQ(array->num_fields(), 0);
-    return arrow::MakeArray(std::make_shared<ArrayData>(
-        array->type(), array->length(), std::move(buffers), new_null_count));
+    return arrow::MakeArray(std::make_shared<ArrayData>(array->type(), 
array->length(),
+                                                        std::move(buffers),

Review comment:
       Nice catch.
   
   I think there is an edge case here.  I think offset applies to the null 
buffer also, so this would cause an illegal access if any values are actually 
null.  unfortunately, I think we need to slice all the buffers according to 
offset.




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


Reply via email to