Skip to content

Commit

Permalink
opt/props: use EquivGroups in FuncDepSet for tracking equivalences
Browse files Browse the repository at this point in the history
Previously, `FuncDepSet` was fairly wasteful in how it tracked sets of
equivalent columns: for each column in the equiv group, an FD was maintained
from that column to all other columns in the group. This meant that there
were `2n` `ColSets` for each equiv group (where `n` is the number of columns
in the group).

This patch modifies `FuncDepSet` and its internals to use `props.EquivGroups`
instead, which keeps a single `ColSet` for each equiv group. This significantly
cuts down on allocations for queries with many columns and equalities, both
because less `ColSets` spill to heap, and because less FDs are added to
the `deps` slice.

Fixes cockroachdb#83963

Release note: None
  • Loading branch information
DrewKimball committed Jan 3, 2025
1 parent 0b01c31 commit b784dfe
Show file tree
Hide file tree
Showing 61 changed files with 662 additions and 713 deletions.
4 changes: 2 additions & 2 deletions pkg/sql/opt/exec/execbuilder/testdata/explain
Original file line number Diff line number Diff line change
Expand Up @@ -2263,7 +2263,7 @@ quality of service: regular
query T
EXPLAIN (OPT, MEMO) SELECT * FROM tc JOIN t ON k=a
----
memo (optimized, ~18KB, required=[presentation: info:14] [distribution: test])
memo (optimized, ~19KB, required=[presentation: info:14] [distribution: test])
├── G1: (explain G2 [presentation: a:1,b:2,k:8,v:9] [distribution: test])
│ └── [presentation: info:14] [distribution: test]
│ ├── best: (explain G2="[presentation: a:1,b:2,k:8,v:9] [distribution: test]" [presentation: a:1,b:2,k:8,v:9] [distribution: test])
Expand Down Expand Up @@ -2344,7 +2344,7 @@ TABLE t
├── crdb_internal_origin_timestamp decimal [hidden] [system]
└── PRIMARY INDEX t_pkey
└── k int not null
memo (optimized, ~18KB, required=[presentation: info:14] [distribution: test])
memo (optimized, ~19KB, required=[presentation: info:14] [distribution: test])
├── G1: (explain G2 [presentation: a:1,b:2,k:8,v:9] [distribution: test])
│ └── [presentation: info:14] [distribution: test]
│ ├── best: (explain G2="[presentation: a:1,b:2,k:8,v:9] [distribution: test]" [presentation: a:1,b:2,k:8,v:9] [distribution: test])
Expand Down
18 changes: 9 additions & 9 deletions pkg/sql/opt/exec/execbuilder/testdata/explain_redact
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ upsert bc
query T
EXPLAIN (OPT, MEMO, REDACT) INSERT INTO bc SELECT a::float + 1 FROM a ON CONFLICT (b) DO UPDATE SET b = bc.b + 100
----
memo (optimized, ~35KB, required=[presentation: info:25] [distribution: test])
memo (optimized, ~36KB, required=[presentation: info:25] [distribution: test])
├── G1: (explain G2 [distribution: test])
│ └── [presentation: info:25] [distribution: test]
│ ├── best: (explain G2="[distribution: test]" [distribution: test])
Expand Down Expand Up @@ -1539,7 +1539,7 @@ delete f
query T
EXPLAIN (OPT, MEMO, REDACT) DELETE FROM f WHERE f = 8.5
----
memo (optimized, ~16KB, required=[presentation: info:14] [distribution: test])
memo (optimized, ~17KB, required=[presentation: info:14] [distribution: test])
├── G1: (explain G2 [distribution: test])
│ └── [presentation: info:14] [distribution: test]
│ ├── best: (explain G2="[distribution: test]" [distribution: test])
Expand Down Expand Up @@ -2138,7 +2138,7 @@ project
query T
EXPLAIN (OPT, MEMO, REDACT) SELECT 100, if(e != '', 12.0, 13.0), 'abc', coalesce(e, 'eee'), row(e, e || 'a', now()), 'POINT (1 1)'::GEOMETRY, '[true]'::JSON, false, NULL, e FROM e
----
memo (optimized, ~8KB, required=[presentation: info:17] [distribution: test])
memo (optimized, ~9KB, required=[presentation: info:17] [distribution: test])
├── G1: (explain G2 [presentation: ?column?:8,if:9,?column?:10,coalesce:11,row:12,geometry:13,jsonb:14,bool:15,?column?:16,e:1] [distribution: test])
│ └── [presentation: info:17] [distribution: test]
│ ├── best: (explain G2="[presentation: ?column?:8,if:9,?column?:10,coalesce:11,row:12,geometry:13,jsonb:14,bool:15,?column?:16,e:1] [distribution: test]" [presentation: ?column?:8,if:9,?column?:10,coalesce:11,row:12,geometry:13,jsonb:14,bool:15,?column?:16,e:1] [distribution: test])
Expand Down Expand Up @@ -2435,7 +2435,7 @@ project
query T
EXPLAIN (OPT, MEMO, REDACT) SELECT * FROM bc JOIN f ON b = f + 1
----
memo (optimized, ~27KB, required=[presentation: info:14] [distribution: test])
memo (optimized, ~28KB, required=[presentation: info:14] [distribution: test])
├── G1: (explain G2 [presentation: b:1,c:2,f:7] [distribution: test])
│ └── [presentation: info:14] [distribution: test]
│ ├── best: (explain G2="[presentation: b:1,c:2,f:7] [distribution: test]" [presentation: b:1,c:2,f:7] [distribution: test])
Expand Down Expand Up @@ -2820,7 +2820,7 @@ project
query T
EXPLAIN (OPT, MEMO, REDACT) SELECT f, g FROM f, LATERAL (SELECT count(DISTINCT c + f + 1) * 2 AS g FROM bc WHERE b * f < 10)
----
memo (optimized, ~33KB, required=[presentation: info:16] [distribution: test])
memo (optimized, ~35KB, required=[presentation: info:16] [distribution: test])
├── G1: (explain G2 [presentation: f:1,g:15] [distribution: test])
│ └── [presentation: info:16] [distribution: test]
│ ├── best: (explain G2="[presentation: f:1,g:15] [distribution: test]" [presentation: f:1,g:15] [distribution: test])
Expand Down Expand Up @@ -3099,7 +3099,7 @@ anti-join-apply
query T
EXPLAIN (OPT, MEMO, REDACT) SELECT * FROM a WHERE a > ALL (SELECT c::int + 2 FROM bc WHERE b > a::float * 3)
----
memo (optimized, ~22KB, required=[presentation: info:15] [distribution: test])
memo (optimized, ~23KB, required=[presentation: info:15] [distribution: test])
├── G1: (explain G2 [presentation: a:1] [distribution: test])
│ └── [presentation: info:15] [distribution: test]
│ ├── best: (explain G2="[presentation: a:1] [distribution: test]" [presentation: a:1] [distribution: test])
Expand Down Expand Up @@ -3426,7 +3426,7 @@ top-k
query T
EXPLAIN (OPT, MEMO, REDACT) SELECT * FROM cd ORDER BY regexp_replace(c, '[0-9]', 'd') LIMIT 3
----
memo (optimized, ~7KB, required=[presentation: info:9] [distribution: test])
memo (optimized, ~8KB, required=[presentation: info:9] [distribution: test])
├── G1: (explain G2 [presentation: c:1,d:2] [ordering: +8 opt(2)] [distribution: test])
│ └── [presentation: info:9] [distribution: test]
│ ├── best: (explain G2="[presentation: c:1,d:2] [ordering: +8 opt(2)] [distribution: test]" [presentation: c:1,d:2] [ordering: +8 opt(2)] [distribution: test])
Expand Down Expand Up @@ -3618,7 +3618,7 @@ scalar-group-by
query T
EXPLAIN (OPT, MEMO, REDACT) SELECT covar_pop(d, d + 1) FROM d
----
memo (optimized, ~7KB, required=[presentation: info:8] [distribution: test])
memo (optimized, ~8KB, required=[presentation: info:8] [distribution: test])
├── G1: (explain G2 [presentation: covar_pop:7] [distribution: test])
│ └── [presentation: info:8] [distribution: test]
│ ├── best: (explain G2="[presentation: covar_pop:7] [distribution: test]" [presentation: covar_pop:7] [distribution: test])
Expand Down Expand Up @@ -3927,7 +3927,7 @@ create-table
query T
EXPLAIN (OPT, MEMO, REDACT) CREATE TABLE t (col STRING CHECK (col != 'secret'))
----
memo (optimized, ~3KB, required=[presentation: info:1] [distribution: test])
memo (optimized, ~4KB, required=[presentation: info:1] [distribution: test])
├── G1: (explain G2 [distribution: test])
│ └── [presentation: info:1] [distribution: test]
│ ├── best: (explain G2="[distribution: test]" [distribution: test])
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/exec/execbuilder/testdata/join
Original file line number Diff line number Diff line change
Expand Up @@ -2235,7 +2235,7 @@ EXPLAIN (OPT, MEMO)
SELECT * FROM (VALUES (1, 10), (2, 20), (3, 30)) as v(x, y)
INNER STRAIGHT JOIN t119035 ON a > x
----
memo (optimized, ~10KB, required=[presentation: info:10] [distribution: test])
memo (optimized, ~11KB, required=[presentation: info:10] [distribution: test])
├── G1: (explain G2 [presentation: x:1,y:2,k:3,a:4,b:5] [distribution: test])
│ └── [presentation: info:10] [distribution: test]
│ ├── best: (explain G2="[presentation: x:1,y:2,k:3,a:4,b:5] [distribution: test]" [presentation: x:1,y:2,k:3,a:4,b:5] [distribution: test])
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/exec/execbuilder/testdata/lookup_join_limit
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ project
├── stats: [rows=1]
├── cost: 29.125
├── key: ()
├── fd: ()-->(1,8), (8)==(1), (1)==(8)
├── fd: ()-->(1,8), (1)==(8), (8)==(1)
├── distribution: test
├── inner-join (lookup b)
│ ├── columns: a.x:1 b.x:8
Expand Down
4 changes: 2 additions & 2 deletions pkg/sql/opt/memo/testdata/logprops/delete
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ DELETE FROM abcde WHERE b=c RETURNING *;
project
├── columns: a:1(int!null) b:2(int!null) c:3(int!null) d:4(int)
├── volatile, mutations
├── fd: (2)==(3), (3)==(2), (2)-->(4)
├── fd: (2)-->(4), (2)==(3), (3)==(2)
├── prune: (1-4)
└── delete abcde
├── columns: a:1(int!null) b:2(int!null) c:3(int!null) d:4(int) rowid:5(int!null)
Expand All @@ -165,7 +165,7 @@ project
│ └── rowid:13 => rowid:5
├── volatile, mutations
├── key: (5)
├── fd: (2)==(3), (3)==(2), (5)-->(1-4), (2)-->(4)
├── fd: (5)-->(1-4), (2)-->(4), (2)==(3), (3)==(2)
└── select
├── columns: a:9(int!null) b:10(int!null) c:11(int!null) d:12(int) rowid:13(int!null) e:14(int) crdb_internal_mvcc_timestamp:15(decimal) tableoid:16(oid)
├── key: (13)
Expand Down
8 changes: 4 additions & 4 deletions pkg/sql/opt/memo/testdata/logprops/insert
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ project
├── columns: a:1(int!null) b:2(int!null) c:3(int!null) d:4(int!null)
├── cardinality: [0 - 10]
├── volatile, mutations
├── fd: ()-->(3), (1)==(2), (2)==(1), (1)-->(4)
├── fd: ()-->(3), (1)-->(4), (1)==(2), (2)==(1)
├── prune: (1-4)
└── insert abcde
├── columns: a:1(int!null) b:2(int!null) c:3(int!null) d:4(int!null) rowid:5(int!null)
Expand All @@ -104,7 +104,7 @@ project
│ └── rowid_default:15 => rowid:5
├── cardinality: [0 - 10]
├── volatile, mutations
├── fd: ()-->(3), (1)==(2), (2)==(1), (1)-->(4)
├── fd: ()-->(3), (1)-->(4), (1)==(2), (2)==(1)
└── project
├── columns: d_comp:17(int!null) y:10(int!null) c_default:14(int!null) rowid_default:15(int) e_default:16(int)
├── cardinality: [0 - 10]
Expand Down Expand Up @@ -158,7 +158,7 @@ INSERT INTO abcde (a, b) SELECT y, y FROM xyz ORDER BY y, z RETURNING *
project
├── columns: a:1(int!null) b:2(int!null) c:3(int!null) d:4(int!null)
├── volatile, mutations
├── fd: ()-->(3), (1)==(2), (2)==(1), (1)-->(4)
├── fd: ()-->(3), (1)-->(4), (1)==(2), (2)==(1)
├── prune: (1-4)
└── insert abcde
├── columns: a:1(int!null) b:2(int!null) c:3(int!null) d:4(int!null) rowid:5(int!null)
Expand All @@ -176,7 +176,7 @@ project
│ ├── d_comp:17 => d:4
│ └── rowid_default:15 => rowid:5
├── volatile, mutations
├── fd: ()-->(3), (1)==(2), (2)==(1), (1)-->(4)
├── fd: ()-->(3), (1)-->(4), (1)==(2), (2)==(1)
└── project
├── columns: d_comp:17(int!null) y:10(int!null) c_default:14(int!null) rowid_default:15(int) e_default:16(int)
├── volatile
Expand Down
12 changes: 6 additions & 6 deletions pkg/sql/opt/memo/testdata/logprops/join
Original file line number Diff line number Diff line change
Expand Up @@ -2463,7 +2463,7 @@ inner-join (hash)
├── cardinality: [0 - 1]
├── multiplicity: left-rows(exactly-one), right-rows(exactly-one)
├── key: ()
├── fd: ()-->(1-4,7-10), (7)==(1), (1)==(7), (2)==(8), (8)==(2), (3)==(9), (9)==(3), (4)==(10), (10)==(4)
├── fd: ()-->(1-4,7-10), (1)==(7), (7)==(1), (2)==(8), (8)==(2), (3)==(9), (9)==(3), (4)==(10), (10)==(4)
├── prune: (2-4,8-10)
├── select
│ ├── columns: xysd.x:1(int!null) xysd.y:2(int) xysd.s:3(string) xysd.d:4(decimal!null)
Expand Down Expand Up @@ -2560,7 +2560,7 @@ inner-join (hash)
├── columns: k:1(int!null) v:2(int) r1:3(int!null) r2:4(int) x:7(int!null) y:8(int) s:9(string) d:10(decimal!null) x:13(int!null) y:14(int) s:15(string) d:16(decimal!null)
├── multiplicity: left-rows(exactly-one), right-rows(zero-or-more)
├── key: (1)
├── fd: (1)-->(2-4), (7)-->(8-10), (9,10)~~>(7,8), (13)-->(14-16), (15,16)~~>(13,14), (7)==(3,13), (13)==(3,7), (8)==(14), (14)==(8), (9)==(15), (15)==(9), (10)==(16), (16)==(10), (3)==(7,13)
├── fd: (1)-->(2-4), (7)-->(8-10), (9,10)~~>(7,8), (13)-->(14-16), (15,16)~~>(13,14), (3)==(7,13), (7)==(3,13), (13)==(3,7), (8)==(14), (14)==(8), (9)==(15), (15)==(9), (10)==(16), (16)==(10)
├── prune: (1,2,4,8-10,14-16)
├── interesting orderings: (+1) (+7) (-9,+10,+7) (+13) (-15,+16,+13)
├── scan fk
Expand Down Expand Up @@ -2609,7 +2609,7 @@ inner-join (hash)
├── columns: k:1(int!null) v:2(int) r1:3(int!null) r2:4(int) x:7(int!null) t:13(int!null)
├── multiplicity: left-rows(zero-or-one), right-rows(zero-or-more)
├── key: (1)
├── fd: (1)-->(2-4), (7)==(3,13), (13)==(3,7), (3)==(7,13)
├── fd: (1)-->(2-4), (3)==(7,13), (7)==(3,13), (13)==(3,7)
├── prune: (1,2,4,7)
├── interesting orderings: (+1) (+(7|13))
├── scan fk
Expand Down Expand Up @@ -3394,12 +3394,12 @@ project
│ │ │ ├── outer: (2)
│ │ │ ├── cardinality: [0 - 1]
│ │ │ ├── key: ()
│ │ │ ├── fd: ()-->(8-10,14-16,22), (10)==(9,15), (8)==(16), (16)==(8), (15)==(9,10), (14)==(22), (22)==(14), (9)==(10,15)
│ │ │ ├── fd: ()-->(8-10,14-16,22), (9)==(10,15), (10)==(9,15), (15)==(9,10), (8)==(16), (16)==(8), (14)==(22), (22)==(14)
│ │ │ ├── interesting orderings: (+(9|10)) (+22)
│ │ │ ├── inner-join (hash)
│ │ │ │ ├── columns: col1_8:8(bytes!null) col1_11:9(string!null) col1_12:10(string!null) col2_1:14(int4!null) col2_2:15(string!null) col2_3:16(bytes!null) table3_119441.col3_16:22(int!null)
│ │ │ │ ├── outer: (2)
│ │ │ │ ├── fd: ()-->(9,10,15), (9)==(10,15), (10)==(9,15), (8)==(16), (16)==(8), (15)==(9,10), (14)==(22), (22)==(14)
│ │ │ │ ├── fd: ()-->(9,10,15), (9)==(10,15), (10)==(9,15), (15)==(9,10), (8)==(16), (16)==(8), (14)==(22), (22)==(14)
│ │ │ │ ├── limit hint: 1.00
│ │ │ │ ├── interesting orderings: (+(9|10)) (+22)
│ │ │ │ ├── top-k
Expand All @@ -3413,7 +3413,7 @@ project
│ │ │ │ │ └── prune: (22)
│ │ │ │ ├── inner-join (hash)
│ │ │ │ │ ├── columns: col1_8:8(bytes!null) col1_11:9(string!null) col1_12:10(string!null) col2_1:14(int4) col2_2:15(string!null) col2_3:16(bytes!null)
│ │ │ │ │ ├── fd: (9)==(10,15), (10)==(9,15), (8)==(16), (16)==(8), (15)==(9,10)
│ │ │ │ │ ├── fd: (9)==(10,15), (10)==(9,15), (15)==(9,10), (8)==(16), (16)==(8)
│ │ │ │ │ ├── prune: (14)
│ │ │ │ │ ├── interesting orderings: (+(9|10))
│ │ │ │ │ ├── scan table2_119441
Expand Down
4 changes: 2 additions & 2 deletions pkg/sql/opt/memo/testdata/logprops/limit
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ limit
├── columns: x:1(int!null) y:2(int!null) z:3(float!null) s:4(string)
├── cardinality: [0 - 1]
├── key: ()
├── fd: ()-->(1-4), (2)==(1), (1)==(2)
├── fd: ()-->(1-4), (1)==(2), (2)==(1)
├── prune: (1-4)
├── interesting orderings: (+(1|2)) (-4,+3,+(1|2))
├── project
Expand Down Expand Up @@ -288,7 +288,7 @@ sort
│ │ ├── k: 1
│ │ ├── cardinality: [0 - 1]
│ │ ├── key: ()
│ │ ├── fd: ()-->(11-13,16-18), (16)==(11), (13)==(18), (18)==(13), (12)==(17), (17)==(12), (11)==(16)
│ │ ├── fd: ()-->(11-13,16-18), (11)==(16), (16)==(11), (13)==(18), (18)==(13), (12)==(17), (17)==(12)
│ │ ├── interesting orderings: (+(12|17))
│ │ └── inner-join (cross)
│ │ ├── columns: t2.a:11(int!null) t2.b:12(int!null) t2.c:13(int!null) t3.a:16(int!null) t3.b:17(int!null) t3.c:18(int!null)
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/logprops/max1row
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ select
├── columns: a:1(int!null) b:2(int!null) c:3(int!null)
├── cardinality: [0 - 1]
├── key: ()
├── fd: ()-->(1-3), (3)==(2), (2)==(3)
├── fd: ()-->(1-3), (2)==(3), (3)==(2)
├── scan abc
│ ├── columns: a:1(int!null) b:2(int) c:3(int)
│ ├── key: (1)
Expand Down
6 changes: 3 additions & 3 deletions pkg/sql/opt/memo/testdata/logprops/scan
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,13 @@ SELECT * FROM computed
project
├── columns: i:1(int!null) s:2(string) d:3(decimal) c_i_expr:4(string!null) c_s:5(string) c_d:6(decimal) c_d_expr:7(string)
├── key: (1)
├── fd: (1,4)-->(2,3,5-7), (3,7)~~>(1,2,4-6), (1)-->(4), (3)==(6), (6)==(3), (2)~~>(1,3-7), (2)==(5), (5)==(2)
├── fd: (1,4)-->(2,3,5-7), (3,7)~~>(1,2,4-6), (1)-->(4), (2)~~>(1,3-7), (3)==(6), (6)==(3), (2)==(5), (5)==(2)
├── prune: (1-7)
├── interesting orderings: (+4,+1) (+7,+(3|6),+4,+1)
└── project
├── columns: c_s:5(string) i:1(int!null) s:2(string) d:3(decimal) c_i_expr:4(string!null) c_d:6(decimal) c_d_expr:7(string) crdb_internal_mvcc_timestamp:8(decimal) tableoid:9(oid)
├── key: (1)
├── fd: (1,4)-->(2,3,6-9), (3,7)~~>(1,2,4,6,8,9), (1)-->(4), (3)==(6), (6)==(3), (2)~~>(1,3,4,6-9), (2)==(5), (5)==(2)
├── fd: (1,4)-->(2,3,6-9), (3,7)~~>(1,2,4,6,8,9), (1)-->(4), (2)~~>(1,3,4,6-9), (3)==(6), (6)==(3), (2)==(5), (5)==(2)
├── prune: (1-9)
├── interesting orderings: (+4,+1) (+7,+(3|6),+4,+1)
├── scan computed
Expand All @@ -451,7 +451,7 @@ project
│ │ └── cast: STRING [type=string]
│ │ └── variable: d:3 [type=decimal]
│ ├── key: (1)
│ ├── fd: (1,4)-->(2,3,6-9), (3,7)~~>(1,2,4,6,8,9), (1)-->(4), (3)==(6), (6)==(3), (2)~~>(1,3,4,6-9)
│ ├── fd: (1,4)-->(2,3,6-9), (3,7)~~>(1,2,4,6,8,9), (1)-->(4), (2)~~>(1,3,4,6-9), (3)==(6), (6)==(3)
│ ├── prune: (1-4,6-9)
│ └── interesting orderings: (+4,+1) (+7,+(3|6),+4,+1)
└── projections
Expand Down
10 changes: 5 additions & 5 deletions pkg/sql/opt/memo/testdata/logprops/set
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ intersect
├── left columns: xy.x:1(int) xy.y:2(int) xy.x:1(int)
├── right columns: v:6(int) u:5(int) rowid:7(int)
├── key: (12)
├── fd: ()-->(11), (10)==(12), (12)==(10), (12)-->(10,11)
├── fd: ()-->(11), (12)-->(10,11), (10)==(12), (12)==(10)
├── interesting orderings: (+12)
├── project
│ ├── columns: xy.x:1(int!null) xy.y:2(int)
Expand Down Expand Up @@ -369,7 +369,7 @@ distinct-on
├── columns: a:11(int!null) b:12(int) c:13(int!null)
├── grouping columns: a:11(int!null)
├── key: (11)
├── fd: (11)==(13), (13)==(11), (11)-->(12,13)
├── fd: (11)-->(12,13), (11)==(13), (13)==(11)
├── prune: (12,13)
├── union-all
│ ├── columns: a:11(int!null) b:12(int) c:13(int!null)
Expand Down Expand Up @@ -496,7 +496,7 @@ intersect-all
├── left columns: a:1(int!null) b:2(int) c:3(int)
├── right columns: a:6(int) b:7(int) c:8(int)
├── key: (1)
├── fd: (1)==(2,3), (3)==(1,2), (2)==(1,3)
├── fd: (1)==(2,3), (2)==(1,3), (3)==(1,2)
├── interesting orderings: (+1)
├── select
│ ├── columns: a:1(int!null) b:2(int) c:3(int!null)
Expand Down Expand Up @@ -681,7 +681,7 @@ intersect-all
├── right columns: column1:6(int) column2:7(int) column3:8(int)
├── cardinality: [0 - 1]
├── key: ()
├── fd: ()-->(9-11), (11)==(9,10), (9)==(10,11), (10)==(9,11)
├── fd: ()-->(9-11), (9)==(10,11), (10)==(9,11), (11)==(9,10)
├── interesting orderings: (+(9|10|11))
├── project
│ ├── columns: coalesce:5(int!null) xy.x:1(int!null)
Expand Down Expand Up @@ -715,7 +715,7 @@ except-all
├── left columns: xy.x:1(int) xy.x:1(int) coalesce:5(int)
├── right columns: column1:6(int) column2:7(int) column3:8(int)
├── key: (10)
├── fd: (11)==(9,10), (9)==(10,11), (10)==(9,11)
├── fd: (9)==(10,11), (10)==(9,11), (11)==(9,10)
├── interesting orderings: (+(9|10|11))
├── project
│ ├── columns: coalesce:5(int!null) xy.x:1(int!null)
Expand Down
Loading

0 comments on commit b784dfe

Please sign in to comment.