alamb commented on code in PR #14235:
URL: https://github.com/apache/datafusion/pull/14235#discussion_r1929280874


##########
datafusion/physical-plan/src/execution_plan.rs:
##########
@@ -431,6 +434,20 @@ pub trait ExecutionPlan: Debug + DisplayAs + Send + Sync {
     fn cardinality_effect(&self) -> CardinalityEffect {
         CardinalityEffect::Unknown
     }
+
+    /// Attempts to push down the given projection into the input of this 
`ExecutionPlan`.

Review Comment:
   I agree it makes sense to expose ProjectionExec here in this API -- it is a 
very special operator. In theory it would be nice to avoid the circular 
reference (`ProjectionExec` is an `ExecutionPlan` that depends on 
`ProjetionExec`) but if it compiles I say we 🚢 🇮🇹 



##########
datafusion/sqllogictest/test_files/explain.slt:
##########
@@ -43,10 +43,11 @@ logical_plan
 02)--Filter: aggregate_test_100.c2 > Int8(10)
 03)----TableScan: aggregate_test_100 projection=[c1, c2], 
partial_filters=[aggregate_test_100.c2 > Int8(10)]
 physical_plan
-01)CoalesceBatchesExec: target_batch_size=8192
-02)--FilterExec: c2@1 > 10, projection=[c1@0]
-03)----RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1
-04)------CsvExec: file_groups={1 group: 
[[WORKSPACE_ROOT/testing/data/csv/aggregate_test_100.csv]]}, projection=[c1, 
c2], has_header=true
+01)ProjectionExec: expr=[c1@0 as c1]

Review Comment:
   Some of these plans don't look quite as good (they now have an unecessary 
projection)



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to