fenfeng9 commented on issue #50105:
URL: https://github.com/apache/arrow/issues/50105#issuecomment-4632287224

   I think this bug is in the sparse-union logical null path here:
   
   
https://github.com/apache/arrow/blob/e16067a78ce4e7325a258bb2ae1ef73211cc7d46/cpp/src/arrow/array/data.cc#L72-L77
   
   and here:
   
   
https://github.com/apache/arrow/blob/e16067a78ce4e7325a258bb2ae1ef73211cc7d46/cpp/src/arrow/array/data.cc#L697-L702
   
   `IsNullSparseUnion` checks child nullness with `i`, but it should use 
`data.offset + i`. Likewise, `ArraySpan::IsNullSparseUnion` should use 
`this->offset + i` instead of `i`. Otherwise, sliced sparse unions can return 
incorrect logical values.
   
   I have verified the fix locally and will open a PR.


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