Skip to content

Commit

Permalink
Combine the two rules: DecorrelateWhereExists and DecorrelateWhereIn (#…
Browse files Browse the repository at this point in the history
…6271)

* combine ecorrelation rules

* Fix UTs

* modify TPCH plan txt

* fix intg test
  • Loading branch information
mingmwang authored May 15, 2023
1 parent 063f99f commit ca7f760
Show file tree
Hide file tree
Showing 14 changed files with 1,028 additions and 1,058 deletions.
2 changes: 1 addition & 1 deletion benchmarks/expected-plans/q16.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| | Filter: part.p_brand != Utf8("Brand#45") AND part.p_type NOT LIKE Utf8("MEDIUM POLISHED%") AND part.p_size IN ([Int32(49), Int32(14), Int32(23), Int32(45), Int32(19), Int32(3), Int32(36), Int32(9)]) |
| | TableScan: part projection=[p_partkey, p_brand, p_type, p_size] |
| | SubqueryAlias: __correlated_sq_1 |
| | Projection: supplier.s_suppkey AS s_suppkey |
| | Projection: supplier.s_suppkey |
| | Filter: supplier.s_comment LIKE Utf8("%Customer%Complaints%") |
| | TableScan: supplier projection=[s_suppkey, s_comment] |
| physical_plan | SortPreservingMergeExec: [supplier_cnt@3 DESC,p_brand@0 ASC NULLS LAST,p_type@1 ASC NULLS LAST,p_size@2 ASC NULLS LAST] |
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/expected-plans/q18.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| | TableScan: orders projection=[o_orderkey, o_custkey, o_totalprice, o_orderdate] |
| | TableScan: lineitem projection=[l_orderkey, l_quantity] |
| | SubqueryAlias: __correlated_sq_1 |
| | Projection: lineitem.l_orderkey AS l_orderkey |
| | Projection: lineitem.l_orderkey |
| | Filter: SUM(lineitem.l_quantity) > Decimal128(Some(30000),25,2) |
| | Aggregate: groupBy=[[lineitem.l_orderkey]], aggr=[[SUM(lineitem.l_quantity)]] |
| | TableScan: lineitem projection=[l_orderkey, l_quantity] |
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/expected-plans/q20.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
| | Filter: nation.n_name = Utf8("CANADA") |
| | TableScan: nation projection=[n_nationkey, n_name] |
| | SubqueryAlias: __correlated_sq_1 |
| | Projection: partsupp.ps_suppkey AS ps_suppkey |
| | Projection: partsupp.ps_suppkey |
| | Inner Join: partsupp.ps_partkey = __scalar_sq_1.l_partkey, partsupp.ps_suppkey = __scalar_sq_1.l_suppkey Filter: CAST(partsupp.ps_availqty AS Float64) > __scalar_sq_1.__value |
| | LeftSemi Join: partsupp.ps_partkey = __correlated_sq_2.p_partkey |
| | TableScan: partsupp projection=[ps_partkey, ps_suppkey, ps_availqty] |
| | SubqueryAlias: __correlated_sq_2 |
| | Projection: part.p_partkey AS p_partkey |
| | Projection: part.p_partkey |
| | Filter: part.p_name LIKE Utf8("forest%") |
| | TableScan: part projection=[p_partkey, p_name] |
| | SubqueryAlias: __scalar_sq_1 |
Expand Down
Loading

0 comments on commit ca7f760

Please sign in to comment.