adamreeve commented on code in PR #41144:
URL: https://github.com/apache/arrow/pull/41144#discussion_r1561769340
##########
csharp/src/Apache.Arrow/Arrays/ArrayData.cs:
##########
@@ -28,12 +27,25 @@ public sealed class ArrayData : IDisposable
public readonly IArrowType DataType;
public readonly int Length;
- public readonly int NullCount;
+ private int _nullCount;
public readonly int Offset;
public readonly ArrowBuffer[] Buffers;
public readonly ArrayData[] Children;
public readonly ArrayData Dictionary; // Only used for dictionary type
+ public int NullCount
Review Comment:
I've reverted `NullCount` back to a normal member but made it non-readonly
and added a `GetNullCount` method instead. I've changed most uses of
`NullCount` to `GetNullCount()`, except in the C Data interface implementation
which explicitly allows -1 values:
https://arrow.apache.org/docs/format/CDataInterface.html#c.ArrowArray.null_count
Let me know if you'd prefer to deprecate `NullCount` instead though, or have
any other suggestions for how to handle this.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]