zeroshade commented on code in PR #1648:
URL: https://github.com/apache/arrow-go/pull/1648#discussion_r4647889638


##########
arrow/array/list.go:
##########
@@ -1436,12 +1473,16 @@ func (b *baseListViewBuilder) UnmarshalOne(dec 
*json.Decoder) error {
                }
                // consume ']'
                _, err := dec.Token()
+               size := b.values.Len() - offset
+               if b.checkDimensions != nil {

Review Comment:
   nit: `UnmarshalOne` already returns `error`, and JSON is the one path where 
the size comes from data rather than the caller. Consider returning 
`fmt.Errorf("%w: list-view size overflow", arrow.ErrInvalid)` here instead of 
panicking through `checkDimensions`.



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