Skip to content
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

Build physical filter eagerly while constructing ParquetExec operator #2059

Open
yjshen opened this issue Mar 22, 2022 · 4 comments
Open

Build physical filter eagerly while constructing ParquetExec operator #2059

yjshen opened this issue Mar 22, 2022 · 4 comments
Labels
ballista datafusion Changes in the datafusion crate development-process Related to development process of arrow-datafusion enhancement New feature or request

Comments

@yjshen
Copy link
Member

yjshen commented Mar 22, 2022

We should avoid leaking logical expression to physical operators.

https://github.com/apache/arrow-datafusion/blob/master/datafusion/src/physical_optimizer/pruning.rs#L93-L101

https://github.com/apache/arrow-datafusion/blob/master/datafusion/src/physical_plan/file_format/parquet.rs#L77-L86

@yjshen yjshen added enhancement New feature or request ballista development-process Related to development process of arrow-datafusion datafusion Changes in the datafusion crate labels Mar 22, 2022
@yjshen
Copy link
Member Author

yjshen commented Mar 22, 2022

@alamb could you please provide some context on why we are using Expr instead of PhyscialExpr for ParquetExec in the first place?

@alamb
Copy link
Contributor

alamb commented Mar 22, 2022

@alamb could you please provide some context on why we are using Expr instead of PhyscialExpr for ParquetExec in the first place?

I don't know of any original rationale -- I think @yordan-pavlov 's initial implementation was in terms of Expr

I think it would be fine to use physical exprs instead (as we can always translate from Expr --> PhysicalExpr)

@yordan-pavlov
Copy link
Contributor

@yjshen when I first introduced parquet predicate push-down for Data Fusion in apache/arrow#9064 I was focused on reusing existing code for evaluating dynamically generated expressions. I don't remember any particular reason for using logical instead of physical expressions. If you think using physical expressions (instead of logical) would make the code better, that's fine with me.

@yjshen
Copy link
Member Author

yjshen commented Mar 24, 2022

Thanks @yordan-pavlov for the context! I am asking here to make sure this proposal won't break any hypothesis I'm not aware of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ballista datafusion Changes in the datafusion crate development-process Related to development process of arrow-datafusion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants