eerhardt commented on a change in pull request #7032:
URL: https://github.com/apache/arrow/pull/7032#discussion_r417708201



##########
File path: csharp/src/Apache.Arrow/Arrays/BinaryArray.cs
##########
@@ -73,24 +76,34 @@ public TArray Build(MemoryAllocator allocator = default)
             {
                 ValueOffsets.Append(Offset);
 
-                var data = new ArrayData(DataType, ValueOffsets.Length - 1, 0, 
0,
-                    new[] { ArrowBuffer.Empty, ValueOffsets.Build(allocator), 
ValueBuffer.Build(allocator) });
+                var data = new ArrayData(DataType, ValueOffsets.Length - 1, 
NullCount, 0,
+                    new[] { ValidityBuffer.Build(allocator).ValueBuffer, 
ValueOffsets.Build(allocator), ValueBuffer.Build(allocator) });

Review comment:
       Were we going to check for `NullCount == 0` and use an empty buffer for 
the validity buffer in that case?
   
   The same goes for `PrimitiveArrayBuilder` and `BoleanArray.Builder`. #Closed




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