-
Notifications
You must be signed in to change notification settings - Fork 465
/
Copy pathgithub-16036.slt
109 lines (97 loc) · 3.19 KB
/
github-16036.slt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0.
# Regression test for https://github.com/MaterializeInc/materialize/pulls/16036
mode cockroach
statement ok
CREATE TABLE t1 (v1 TEXT, k1 INTEGER, k2 INTEGER);
statement ok
CREATE TABLE t2 (v2 TEXT, k1 INTEGER);
statement ok
CREATE TABLE t3 (v3 TEXT, k2 INTEGER);
statement ok
CREATE INDEX i1 ON t1 (k1);
statement ok
CREATE INDEX i2 ON t2 (k1);
statement ok
CREATE INDEX i3 ON t3 (k2);
statement ok
CREATE VIEW test AS SELECT v1, v2, v3 FROM t1, t2, t3 where t1.k1 = t2.k1 and t1.k2 = t3.k2;
query T multiline
EXPLAIN PHYSICAL PLAN FOR SELECT * FROM test;
----
Explained Query:
Join::Delta
plan_path[0]
delta_stage[1]
closure
project=(#1..=#3)
lookup={ relation=2, key=[#1] }
stream={ key=[#1], thinning=(#0, #2) }
delta_stage[0]
closure
project=(#1..=#3)
lookup={ relation=1, key=[#1] }
stream={ key=[#1], thinning=(#0, #2) }
initial_closure
project=(#1, #0, #2)
source={ relation=0, key=[#1] }
plan_path[1]
delta_stage[1]
closure
project=(#1..=#3)
lookup={ relation=2, key=[#1] }
stream={ key=[#1], thinning=(#0, #2) }
delta_stage[0]
closure
project=(#2, #3, #1)
lookup={ relation=0, key=[#1] }
stream={ key=[#1], thinning=(#0) }
initial_closure
project=(#1, #0)
source={ relation=1, key=[#1] }
plan_path[2]
delta_stage[1]
closure
project=(#1, #3, #2)
lookup={ relation=1, key=[#1] }
stream={ key=[#1], thinning=(#0, #2) }
delta_stage[0]
closure
project=(#2, #3, #1)
lookup={ relation=0, key=[#2] }
stream={ key=[#1], thinning=(#0) }
initial_closure
project=(#1, #0)
source={ relation=2, key=[#1] }
ArrangeBy
raw=true
arrangements[0]={ key=[#1], permutation={#0: #1, #1: #0}, thinning=(#0, #2) }
arrangements[1]={ key=[#2], permutation={#0: #1, #1: #2, #2: #0}, thinning=(#0, #1) }
types=[text?, integer, integer]
Get::Arrangement materialize.public.t1
project=(#1, #0, #2)
filter=((#0) IS NOT NULL AND (#2) IS NOT NULL)
key=#1
raw=false
arrangements[0]={ key=[#1], permutation={#0: #1, #1: #0}, thinning=(#0, #2) }
types=[text?, integer?, integer?]
Get::PassArrangements materialize.public.t2
raw=false
arrangements[0]={ key=[#1], permutation={#0: #1, #1: #0}, thinning=(#0) }
types=[text?, integer?]
Get::PassArrangements materialize.public.t3
raw=false
arrangements[0]={ key=[#1], permutation={#0: #1, #1: #0}, thinning=(#0) }
types=[text?, integer?]
Used Indexes:
- materialize.public.i1 (*** full scan ***)
- materialize.public.i2 (delta join lookup)
- materialize.public.i3 (delta join lookup)
Target cluster: quickstart
EOF