You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "1fanwang (via GitHub)" <gi...@apache.org> on 2026/08/30 06:52:20 UTC
[PR] Fix take on zero-width FixedSizeListArray [arrow-rs]
1fanwang opened a new pull request, #10915:
URL: https://github.com/apache/arrow-rs/pull/10915
# Which issue does this PR close?
- Closes https://github.com/apache/arrow-rs/issues/10914.
# Rationale for this change
`take` returns no rows for a non-nullable `FixedSizeListArray` whose list size
is zero, regardless of how many indices were requested. With a three-row input
and indices `[2, 0]`, the result has length 0 instead of 2.
The take kernel rebuilt the result with `FixedSizeListArray::try_new`. That
constructor cannot infer a row count from an empty child array when there is no
null buffer, so it defaults to zero.
# What changes are included in this PR?
The kernel now passes `indices.len()` to
`FixedSizeListArray::try_new_with_length`. For nonzero list sizes this is the
same length previously derived from the child array. A regression test covers
the zero-width case.
# Are these changes tested?
Yes.
<details>
<summary>Raw test output</summary>
```text
$ git rev-parse HEAD
cbbb56bba13c85f36505453b08f22f8ab71b5794
$ cargo test -p arrow-select --test issue_10914
test take_preserves_zero_width_fixed_size_list_length ... FAILED
assertion `left == right` failed
left: 0
right: 2
$ git rev-parse HEAD
b9dac7cfd239766b5d77dfbcb18ca9524bfbeba1
$ cargo test -p arrow-select
test result: ok. 418 passed; 0 failed
test result: ok. 17 passed; 0 failed
```
</details>
# Are there any user-facing changes?
`take` now preserves one output row per requested index for zero-width
`FixedSizeListArray` values. No public API changes.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix take on zero-width FixedSizeListArray [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey merged PR #10915:
URL: https://github.com/apache/arrow-rs/pull/10915
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix take on zero-width FixedSizeListArray [arrow-rs]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10915:
URL: https://github.com/apache/arrow-rs/pull/10915#issuecomment-5467505413
thanks @1fanwang
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org