Apache DataFusion SQL Query Engine
Minor: add test for pushdown past unnest (#11017)
Andrew Lamb1e7c38b4f0df
diff --git a/datafusion/sqllogictest/test_files/push_down_filter.slt b/datafusion/sqllogictest/test_files/push_down_filter.sltindex 368243f966..5029ab170a 100644--- a/datafusion/sqllogictest/test_files/push_down_filter.slt+++ b/datafusion/sqllogictest/test_files/push_down_filter.slt@@ -60,6 +60,25 @@ logical_plan05)--------Projection: v.column2 AS unnest(v.column2), v.column106)----------TableScan: v projection=[column1, column2]+query II+select uc2, column1 from (select unnest(column2) as uc2, column1 from v) where uc2 > 3 AND column1 = 2;+----+4 2+5 2++# Could push the filter (column1 = 2) down below unnest+# https://github.com/apache/datafusion/issues/11016+query TT+explain select uc2, column1 from (select unnest(column2) as uc2, column1 from v) where uc2 > 3 AND column1 = 2;+----+logical_plan+01)Projection: unnest(v.column2) AS uc2, v.column1+02)--Filter: unnest(v.column2) > Int64(3) AND v.column1 = Int64(2)+03)----Unnest: lists[unnest(v.column2)] structs[]+04)------Projection: v.column2 AS unnest(v.column2), v.column1+05)--------TableScan: v projection=[column1, column2]++statement okdrop table v;@@ -82,5 +101,7 @@ logical_plan04)------Projection: d.column1, d.column2 AS unnest(d.column2)05)--------TableScan: d projection=[column1, column2]++statement okdrop table d;