nuno-faria commented on code in PR #22476:
URL: https://github.com/apache/datafusion/pull/22476#discussion_r3293186714


##########
datafusion/sqllogictest/test_files/cte.slt:
##########
@@ -842,24 +842,23 @@ logical_plan
 03)----Projection: Int64(1) AS val
 04)------EmptyRelation: rows=1
 05)----Projection: Int64(2) AS val
-06)------Cross Join: 
-07)--------Filter: recursive_cte.val < Int64(2)
-08)----------TableScan: recursive_cte
-09)--------SubqueryAlias: sub_cte
-10)----------Projection: Int64(2) AS val
-11)------------EmptyRelation: rows=1
+06)------Cross Join:
+07)--------Projection:
+08)----------Filter: recursive_cte.val < Int64(2)
+09)------------TableScan: recursive_cte projection=[val]
+10)--------SubqueryAlias: sub_cte
+11)----------EmptyRelation: rows=1
 physical_plan
 01)RecursiveQueryExec: name=recursive_cte, is_distinct=false
 02)--ProjectionExec: expr=[1 as val]
 03)----PlaceholderRowExec
 04)--ProjectionExec: expr=[2 as val]
 05)----CrossJoinExec
 06)------CoalescePartitionsExec
-07)--------FilterExec: val@0 < 2
+07)--------FilterExec: val@0 < 2, projection=[]
 08)----------RepartitionExec: partitioning=RoundRobinBatch(4), 
input_partitions=1
 09)------------WorkTableExec: name=recursive_cte
-10)------ProjectionExec: expr=[2 as val]
-11)--------PlaceholderRowExec
+10)------PlaceholderRowExec

Review Comment:
   Projection is now optimized here.



-- 
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