mr-smidge commented on a change in pull request #7158:
URL: https://github.com/apache/arrow/pull/7158#discussion_r428940753



##########
File path: csharp/src/Apache.Arrow/Arrays/BinaryArray.cs
##########
@@ -56,16 +56,16 @@ public abstract class BuilderBase<TArray, TBuilder> : 
IArrowArrayBuilder<byte, T
             protected TBuilder Instance => this as TBuilder;
             protected ArrowBuffer.Builder<int> ValueOffsets { get; }
             protected ArrowBuffer.Builder<byte> ValueBuffer { get; }
-            protected BooleanArray.Builder ValidityBuffer { get; }
+            protected ArrowBuffer.BitPackedBuilder ValidityBuffer { get; }
             protected int Offset { get; set; }
-            protected int NullCount { get; private set; }
+            protected int NullCount => this.ValidityBuffer.CountUnsetBits();

Review comment:
       This was slightly more involved to change, but now done: the 
`BitmapBuilder` class keeps track of the set/unset bit count during its 
operations.  This required adding a new method to `BitUtility`, along with 
appropriate unit tests.
   
   I also took the opportunity to add verification of the new 
`BitmapBuilder.Num[Set|Unset]Bits` properties in all the unit tests.




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