adriangb commented on code in PR #19111:
URL: https://github.com/apache/datafusion/pull/19111#discussion_r2593327427


##########
datafusion/physical-expr-adapter/src/schema_rewriter.rs:
##########
@@ -35,6 +36,35 @@ use datafusion_physical_expr::{
 };
 use datafusion_physical_expr_common::physical_expr::PhysicalExpr;
 
+/// Replace column references in the given physical expression with literal 
values.

Review Comment:
   This is a nice improvement because it:
   1. Makes the `PhysicalExprAdapter` trait that users might need to implement 
simpler (less boilerplate for users).
   2. Decouples these two transformations so that we can replace partition 
values and then apply a projection without having to also do the schema mapping 
(it would be from the logical schema to the logical schema, confusing and a 
waste of compute). This is the bit I needed for this PR. I think there may be 
other ways of doing it (e.g. piping in the expected output schema from 
ParquetSource) but it felt nicer this way and I expect other places may also 
need the decoupled transformation.
   3. I think we can use it in the future to implement #19089



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to