Cintu07 commented on issue #11197:
URL: https://github.com/apache/arrow-rs/issues/11197#issuecomment-5874394772

   len 0 is the only length an empty union can represent. every slot carries a 
type id naming one of the children, and UnionArray::try_new rejects a type id 
that names none, so there is nothing to put in a slot when there are no fields.
   
   so new_null builds the empty buffers with no children at len 0, and panics 
for any other length saying what is missing, same shape as FixedSizeBinary with 
a negative width. new_null returns Self, so the alternative is data that fails 
later in validate_full.
   
   pr is up. happy to change it if you would rather it produced something for 
len > 0.
   


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