-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix InListExpr to return the correct number of rows #8601
Conversation
let value = self.expr.evaluate(batch)?; | ||
let r = match &self.static_filter { | ||
Some(f) => f.contains(value.into_array(1)?.as_ref(), self.negated)?, | ||
Some(f) => f.contains(value.into_array(num_rows)?.as_ref(), self.negated)?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the actual fix -- the rest of the PR is test
15881bc
to
a77d6a2
Compare
let value = self.expr.evaluate(batch)?; | ||
let r = match &self.static_filter { | ||
Some(f) => f.contains(value.into_array(1)?.as_ref(), self.negated)?, | ||
Some(f) => f.contains(value.into_array(num_rows)?.as_ref(), self.negated)?, | ||
None => { | ||
let value = value.into_array(batch.num_rows())?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can use the let value = value.into_array(batch.num_rows())?;
for both arms here (before matching).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea -- done in 7cde104
Thanks @alamb ! |
Which issue does this PR close?
Closes #8600
Rationale for this change
This was causing a panic for us when reading parquet files when pushing down filters . More details on #8600
What changes are included in this PR?
Are these changes tested?
Yes
Are there any user-facing changes?
Bug fix