-
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
Support filter/limit pushdown for views/dataframes #3905
Support filter/limit pushdown for views/dataframes #3905
Conversation
Support filter, limit pushdown for views/dataframes Support filter, limit pushdown for views/dataframes Support filter, limit pushdown for views/dataframes
f74373e
to
deda756
Compare
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.
👨🍳 👌
Very nice @Dandandan
&self, | ||
_filter: &Expr, | ||
) -> Result<TableProviderFilterPushDown> { | ||
// A filter is added on the DataFrame when given |
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.
👍
.select_columns(&["bool_col", "int_col"])?; | ||
|
||
let plan = df.explain(false, false)?.collect().await?; | ||
// Filters all the way to Parquet |
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.
🎉
self.logical_plan().clone() | ||
}; | ||
let mut plan = LogicalPlanBuilder::from(plan); | ||
let filter = filters.iter().cloned().reduce(|acc, new| acc.and(new)); |
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.
You could use conjunction
here and above too if you wanted : https://github.com/apache/arrow-datafusion/blob/master/datafusion/optimizer/src/utils.rs#L123-L147
it just does the same thing, so I don't feel strongly
Which issue does this PR close?
Closes #3681
Closes #3249
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?