adamreeve commented on code in PR #41144:
URL: https://github.com/apache/arrow/pull/41144#discussion_r1561798195


##########
csharp/src/Apache.Arrow/Arrays/ArrayDataConcatenator.cs:
##########
@@ -71,7 +71,7 @@ public ArrayDataConcatenationVisitor(IReadOnlyList<ArrayData> 
arrayDataList, Mem
                 foreach (ArrayData arrayData in _arrayDataList)
                 {
                     _totalLength += arrayData.Length;
-                    _totalNullCount += arrayData.NullCount;
+                    _totalNullCount += arrayData.GetNullCount();

Review Comment:
   It could make sense to check `NullCount` for -1 here, and then set the final 
null count to -1 if it was -1 in any array, rather than forcing a computation. 
But this class has bigger problems as it doesn't account for non-zero offsets 
anywhere as far as I can see, although it does seem to account for array 
lengths being less than the full buffer size. Maybe it should throw a 
`NotImplementedException` if it encounters a non-zero 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to