hcrosse opened a new pull request, #1611:
URL: https://github.com/apache/arrow-go/pull/1611

   ### Rationale for this change
   
   `MakeArrayFromScalar` rejects valid `large_list`, union and extension 
scalars.
   
   ### What changes are included in this PR?
   
   For lengths above 0:
   
   - `large_list` repeats values with 64 bit offsets.
   - Sparse unions create full length children. Only the child selected by the 
type code is populated. All other children contain only nulls.
   - Dense unions store one selected child value, leave other children empty 
and use offset 0 for every row.
   - Extensions build storage and wrap it. Go checks the extension type and, 
unlike C++, that the storage type matches, returning `ErrInvalid` instead of 
panicking.
   - Null unions keep their type code and use the same layouts.
   - Hand built malformed null unions now error or panic in `Validate`.
   
   ### Are these changes tested?
   
   Yes. I added tests for each newly supported scalar type, including invalid 
and null scalars, and extended the dense union case in 
`TestViewScalarsInNestedTypes`.
   
   ### Are there any user-facing changes?
   
   Yes. `MakeArrayFromScalar` supports large lists, unions and extensions at 
positive lengths. There is no API change.
   
   Closes #1610.
   


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