-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RowSelection::intersection Produces Invalid RowSelection #5036
Comments
For context we found this in some internal data in IOx |
tustvold
added a commit
to tustvold/arrow-rs
that referenced
this issue
Nov 6, 2023
tustvold
added a commit
that referenced
this issue
Nov 7, 2023
alamb
pushed a commit
to alamb/arrow-rs
that referenced
this issue
Nov 7, 2023
* Fix RowSelection::intersection (apache#5036) * Review feedback
This was referenced Nov 7, 2023
|
alamb
pushed a commit
to alamb/arrow-rs
that referenced
this issue
Nov 8, 2023
* Fix RowSelection::intersection (apache#5036) * Review feedback
alamb
added a commit
that referenced
this issue
Nov 8, 2023
* Fix RowSelection::intersection (#5036) * Review feedback Co-authored-by: Raphael Taylor-Davies <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
An invariant of
RowSelection
is that it alternates select and skip, and does not contain emptyRowSelector
.This is typically enforced when a RowSelection is created from a slice (or vec) of
RowSelector
byfrom_selectors_and_combine
.When intersect_row_selections was imported from DataFusion in #3047 and subsequently exposed as a member function in https://github.com/apache/arrow-rs/pull/3084/files#diff-7638a63d118da0ac5321c1948eb9acfc59f7acee56598879eba8338b2c22ff9eR334 a subtle bug was introduced.
intersect_row_selections
does not produce aVec<RowSelector>
that obey the invariants ofRowSelection
, and yet the member function doesn't callfrom_selectors_and_combine
.This results in RowSelection of the form
[Skip(x), Skip(y)]
. The async reader determines what data to fetch based on what rows are selected, however, when reading the data it performs each operation in turn. In order to perform the first skip, the reader must set up the decoders to the relevant position within the pages (as it doesn't know that the next operation is another skip). This in turn causes it to request data that wasn't fetched, and the reader bails out with an offset index error.To Reproduce
Expected behavior
Additional context
The text was updated successfully, but these errors were encountered: