Skip to content

Commit f02a0d9

Browse files
author
Bert Vermeiren
committed
Fix: optimize projections for unnest logical plan. sqllogictest adapted
1 parent f5f0172 commit f02a0d9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

datafusion/sqllogictest/test_files/push_down_filter.slt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ physical_plan
3939
01)ProjectionExec: expr=[__unnest_placeholder(v.column2,depth=1)@0 as uc2]
4040
02)--UnnestExec
4141
03)----RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1
42-
04)------ProjectionExec: expr=[column2@1 as __unnest_placeholder(v.column2), column1@0 as column1]
42+
04)------ProjectionExec: expr=[column2@0 as __unnest_placeholder(v.column2)]
4343
05)--------CoalesceBatchesExec: target_batch_size=8192
44-
06)----------FilterExec: column1@0 = 2
44+
06)----------FilterExec: column1@0 = 2, projection=[column2@1]
4545
07)------------DataSourceExec: partitions=1, partition_sizes=[1]
4646

4747
query I
@@ -59,10 +59,9 @@ physical_plan
5959
02)--CoalesceBatchesExec: target_batch_size=8192
6060
03)----FilterExec: __unnest_placeholder(v.column2,depth=1)@0 > 3
6161
04)------RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1
62-
05)--------ProjectionExec: expr=[__unnest_placeholder(v.column2,depth=1)@0 as __unnest_placeholder(v.column2,depth=1)]
63-
06)----------UnnestExec
64-
07)------------ProjectionExec: expr=[column2@1 as __unnest_placeholder(v.column2), column1@0 as column1]
65-
08)--------------DataSourceExec: partitions=1, partition_sizes=[1]
62+
05)--------UnnestExec
63+
06)----------ProjectionExec: expr=[column2@0 as __unnest_placeholder(v.column2)]
64+
07)------------DataSourceExec: partitions=1, partition_sizes=[1]
6665

6766
query II
6867
select uc2, column1 from (select unnest(column2) as uc2, column1 from v) where uc2 > 3 AND column1 = 2;

0 commit comments

Comments
 (0)