milesgranger commented on PR #14395:
URL: https://github.com/apache/arrow/pull/14395#issuecomment-1294642330
> What do we want to use as the default return type for slicing a variable
size list? Return a fixed size list (padding with nulls to get the correct
length), or keep a variable size list (not padding with nulls, just slice until
the end if stop > size of a list element)
Right now it's set to return fixed size list, but I have no opinion on this.
> For slicing fixed size list arrays, what do we want to do when slicing
until after the end (stop > list size)? Padding with nulls and always return a
fixed size list of size stop - start, or slice until the end (Python slice
semantics) and return a fixed size list of size min(list_size, stop -start)
IMO, it should flow like this:
- Input type -> FixedSizeLIstArray:
- Return type -> FixedSizeListArray:
- Slice to `stop`, padding if stop > list_size
- Return type -> ListArray:
- Slice to `min(list_size, stop)` TODO: this now raises an error, as it
assumed to slice to stop always given a fixedsizelist as input; will update.
- Input type -> ListArray:
- Return type -> FixedSizeListArray:
- Slice to `stop` padding if stop > list_size
- Return type -> ListArray:
- Slice to `min(list_size, stop)` with no null padding.
--
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]