-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add rule to merge projection. (#5349)
- Loading branch information
Showing
9 changed files
with
252 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
Sort: supplier_cnt DESC NULLS FIRST, part.p_brand ASC NULLS LAST, part.p_type ASC NULLS LAST, part.p_size ASC NULLS LAST | ||
Projection: part.p_brand, part.p_type, part.p_size, COUNT(DISTINCT partsupp.ps_suppkey) AS supplier_cnt | ||
Projection: group_alias_0 AS part.p_brand, group_alias_1 AS part.p_type, group_alias_2 AS part.p_size, COUNT(alias1) AS COUNT(DISTINCT partsupp.ps_suppkey) | ||
Aggregate: groupBy=[[group_alias_0, group_alias_1, group_alias_2]], aggr=[[COUNT(alias1)]] | ||
Aggregate: groupBy=[[part.p_brand AS group_alias_0, part.p_type AS group_alias_1, part.p_size AS group_alias_2, partsupp.ps_suppkey AS alias1]], aggr=[[]] | ||
LeftAnti Join: partsupp.ps_suppkey = __correlated_sq_1.s_suppkey | ||
Inner Join: partsupp.ps_partkey = part.p_partkey | ||
TableScan: partsupp projection=[ps_partkey, ps_suppkey] | ||
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 | ||
Filter: supplier.s_comment LIKE Utf8("%Customer%Complaints%") | ||
TableScan: supplier projection=[s_suppkey, s_comment] | ||
Projection: group_alias_0 AS part.p_brand, group_alias_1 AS part.p_type, group_alias_2 AS part.p_size, COUNT(alias1) AS supplier_cnt | ||
Aggregate: groupBy=[[group_alias_0, group_alias_1, group_alias_2]], aggr=[[COUNT(alias1)]] | ||
Aggregate: groupBy=[[part.p_brand AS group_alias_0, part.p_type AS group_alias_1, part.p_size AS group_alias_2, partsupp.ps_suppkey AS alias1]], aggr=[[]] | ||
LeftAnti Join: partsupp.ps_suppkey = __correlated_sq_1.s_suppkey | ||
Inner Join: partsupp.ps_partkey = part.p_partkey | ||
TableScan: partsupp projection=[ps_partkey, ps_suppkey] | ||
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 | ||
Filter: supplier.s_comment LIKE Utf8("%Customer%Complaints%") | ||
TableScan: supplier projection=[s_suppkey, s_comment] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
Sort: supplier.s_acctbal DESC NULLS FIRST, nation.n_name ASC NULLS LAST, supplier.s_name ASC NULLS LAST, part.p_partkey ASC NULLS LAST | ||
Projection: supplier.s_acctbal, supplier.s_name, nation.n_name, part.p_partkey, part.p_mfgr, supplier.s_address, supplier.s_phone, supplier.s_comment | ||
Projection: part.p_partkey, part.p_mfgr, supplier.s_name, supplier.s_address, supplier.s_phone, supplier.s_acctbal, supplier.s_comment, nation.n_name | ||
Inner Join: part.p_partkey = __scalar_sq_1.ps_partkey, partsupp.ps_supplycost = __scalar_sq_1.__value | ||
Inner Join: nation.n_regionkey = region.r_regionkey | ||
Inner Join: supplier.s_nationkey = nation.n_nationkey | ||
Inner Join: partsupp.ps_suppkey = supplier.s_suppkey | ||
Inner Join: part.p_partkey = partsupp.ps_partkey | ||
Filter: part.p_size = Int32(15) AND part.p_type LIKE Utf8("%BRASS") | ||
TableScan: part projection=[p_partkey, p_mfgr, p_type, p_size] | ||
TableScan: partsupp projection=[ps_partkey, ps_suppkey, ps_supplycost] | ||
TableScan: supplier projection=[s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment] | ||
TableScan: nation projection=[n_nationkey, n_name, n_regionkey] | ||
Filter: region.r_name = Utf8("EUROPE") | ||
TableScan: region projection=[r_regionkey, r_name] | ||
SubqueryAlias: __scalar_sq_1 | ||
Projection: partsupp.ps_partkey, MIN(partsupp.ps_supplycost) AS __value | ||
Aggregate: groupBy=[[partsupp.ps_partkey]], aggr=[[MIN(partsupp.ps_supplycost)]] | ||
Inner Join: nation.n_regionkey = region.r_regionkey | ||
Inner Join: supplier.s_nationkey = nation.n_nationkey | ||
Inner Join: partsupp.ps_suppkey = supplier.s_suppkey | ||
TableScan: partsupp projection=[ps_partkey, ps_suppkey, ps_supplycost] | ||
TableScan: supplier projection=[s_suppkey, s_nationkey] | ||
TableScan: nation projection=[n_nationkey, n_regionkey] | ||
Filter: region.r_name = Utf8("EUROPE") | ||
TableScan: region projection=[r_regionkey, r_name] | ||
Inner Join: part.p_partkey = __scalar_sq_1.ps_partkey, partsupp.ps_supplycost = __scalar_sq_1.__value | ||
Inner Join: nation.n_regionkey = region.r_regionkey | ||
Inner Join: supplier.s_nationkey = nation.n_nationkey | ||
Inner Join: partsupp.ps_suppkey = supplier.s_suppkey | ||
Inner Join: part.p_partkey = partsupp.ps_partkey | ||
Filter: part.p_size = Int32(15) AND part.p_type LIKE Utf8("%BRASS") | ||
TableScan: part projection=[p_partkey, p_mfgr, p_type, p_size] | ||
TableScan: partsupp projection=[ps_partkey, ps_suppkey, ps_supplycost] | ||
TableScan: supplier projection=[s_suppkey, s_name, s_address, s_nationkey, s_phone, s_acctbal, s_comment] | ||
TableScan: nation projection=[n_nationkey, n_name, n_regionkey] | ||
Filter: region.r_name = Utf8("EUROPE") | ||
TableScan: region projection=[r_regionkey, r_name] | ||
SubqueryAlias: __scalar_sq_1 | ||
Projection: partsupp.ps_partkey, MIN(partsupp.ps_supplycost) AS __value | ||
Aggregate: groupBy=[[partsupp.ps_partkey]], aggr=[[MIN(partsupp.ps_supplycost)]] | ||
Inner Join: nation.n_regionkey = region.r_regionkey | ||
Inner Join: supplier.s_nationkey = nation.n_nationkey | ||
Inner Join: partsupp.ps_suppkey = supplier.s_suppkey | ||
TableScan: partsupp projection=[ps_partkey, ps_suppkey, ps_supplycost] | ||
TableScan: supplier projection=[s_suppkey, s_nationkey] | ||
TableScan: nation projection=[n_nationkey, n_regionkey] | ||
Filter: region.r_name = Utf8("EUROPE") | ||
TableScan: region projection=[r_regionkey, r_name] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.