westonpace opened a new pull request, #34691:
URL: https://github.com/apache/arrow/pull/34691

   ### Rationale for this change
   
   A struct array can have a validity map and an offset.  A record batch 
cannot.  When converting from a struct array to a record batch we were throwing 
an error if a validity map was present and returning the wrong data if an 
offset was present.
   
   ### What changes are included in this PR?
   
   If a validity map or offset are present then StructArray::Flatten is used to 
push the offset and validity map into the struct array.  Note: this means that 
RecordBatch::FromStructArray will not be zero-copy if it has to push down a 
validity map.
   
   ### Are these changes tested?
   
   Yes
   
   ### Are there any user-facing changes?
   
   Yes, RecordBatch::FromStructArray now takes in a memory pool because it 
might have to make allocations when pushing validity bitmaps down.
   


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