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


##########
datafusion/sqllogictest/test_files/push_down_filter.slt:
##########
@@ -116,11 +116,12 @@ explain select * from (select column1, unnest(column2) as 
o from d) where o['a']
 ----
 physical_plan
 01)ProjectionExec: expr=[column1@0 as column1, 
__unnest_placeholder(d.column2,depth=1)@1 as o]
-02)--FilterExec: get_field(__unnest_placeholder(d.column2,depth=1)@1, a) = 1
+02)--FilterExec: __datafusion_extracted_1@0 = 1, projection=[column1@1, 
__unnest_placeholder(d.column2,depth=1)@2]
 03)----RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1
-04)------UnnestExec
-05)--------ProjectionExec: expr=[column1@0 as column1, column2@1 as 
__unnest_placeholder(d.column2)]
-06)----------DataSourceExec: partitions=1, partition_sizes=[1]
+04)------ProjectionExec: 
expr=[get_field(__unnest_placeholder(d.column2,depth=1)@1, a) as 
__datafusion_extracted_1, column1@0 as column1, 
__unnest_placeholder(d.column2,depth=1)@1 as 
__unnest_placeholder(d.column2,depth=1)]
+05)--------UnnestExec

Review Comment:
   I think it would be quite complex to try to push the get_filter through the 
unnest, and ultimately I don't think Parquet would be able to optimize the scan 
(maybe I'm wrong about this?) so there would be little point.



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