Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Related to #4693, currently PruningPredicate
accepts a logical Expr
which it then converts to a PhysicalExpr
. The comments appear to indicate this at one point related to serialization. However, looking at the code in datafusion-proto, we appear to be able to serialize physical expressions.
Describe the solution you'd like
I would like PruningPredicate
to be created with a PhysicalExpr
instead of Expr
, this would in turn mean ParquetExec
would be created with PhysicalExpr
instead of Expr
.
Not only would this avoid issues like #4693 but would also be more consistent for the physical plan to contain PhysicalExpr
, and not logical Expr
Describe alternatives you've considered
Additional context
This relates to #4629 which tracks making ExecutionProps
a trait to ensure all stages of planning/execution take place against the same configuration.
FYI @alamb in case there is something fundamental I have missed here