Skip to content

Commit 37b567c

Browse files
ggevaydef-
authored andcommitted
Rename explain/view.slt to locally_optimized_plan.slt, and move out raw plans
1 parent ac99eb5 commit 37b567c

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed

test/sqllogictest/explain/view.slt renamed to test/sqllogictest/explain/locally_optimized_plan.slt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,6 @@ WHERE
3232

3333
mode cockroach
3434

35-
# Must explain the "Raw Plan".
36-
query T multiline
37-
EXPLAIN RAW PLAN FOR
38-
VIEW v;
39-
----
40-
Project (#0, #1, #3)
41-
Filter (#1 = 100)
42-
LeftOuterJoin (integer_to_bigint(#0) = #2)
43-
Get materialize.public.accounts
44-
Get materialize.public.account_details
45-
46-
EOF
47-
4835
# Must explain the "Locally Optimized Plan".
4936
query T multiline
5037
EXPLAIN LOCALLY OPTIMIZED PLAN FOR
@@ -158,7 +145,7 @@ FROM
158145
WHERE
159146
balance = 100;
160147

161-
# Ensure that flag whas used during planning.
148+
# Ensure that flag was used during planning.
162149
query T multiline
163150
EXPLAIN LOCALLY OPTIMIZED PLAN FOR
164151
VIEW v;

test/sqllogictest/explain/raw_plan_as_text.slt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,3 +661,32 @@ With Mutually Recursive [recursion_limit=5, return_at_limit]
661661
Target cluster: mz_catalog_server
662662

663663
EOF
664+
665+
statement ok
666+
CREATE TABLE accounts(id int, balance int);
667+
668+
statement ok
669+
CREATE TABLE account_details(id bigint, address string);
670+
671+
statement ok
672+
CREATE OR REPLACE VIEW v AS
673+
SELECT
674+
*
675+
FROM
676+
accounts a
677+
LEFT JOIN account_details ad USING(id)
678+
WHERE
679+
balance = 100;
680+
681+
# Must explain the "Raw Plan".
682+
query T multiline
683+
EXPLAIN RAW PLAN AS TEXT FOR
684+
VIEW v;
685+
----
686+
Project (#0, #1, #3)
687+
Filter (#1 = 100)
688+
LeftOuterJoin (integer_to_bigint(#0) = #2)
689+
Get materialize.public.accounts
690+
Get materialize.public.account_details
691+
692+
EOF

0 commit comments

Comments
 (0)