-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(frontend): output explain result as graphviz dot format (#19446)
- Loading branch information
Showing
9 changed files
with
591 additions
and
16 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
src/frontend/planner_test/tests/testdata/input/explain_dot_format.yaml
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
- name: test dot output format (logical) | ||
sql: | | ||
CREATE TABLE t (v1 int); | ||
explain (logical, format dot) SELECT approx_percentile(0.5) WITHIN GROUP (order by v1) from t; | ||
expected_outputs: | ||
- explain_output | ||
- name: test dot output format (batch) | ||
sql: | | ||
CREATE TABLE t (v1 int); | ||
explain (physical, format dot) SELECT approx_percentile(0.5) WITHIN GROUP (order by v1) from t; | ||
expected_outputs: | ||
- explain_output | ||
- name: test dot output format (stream) | ||
sql: | | ||
CREATE TABLE t (v1 int); | ||
explain (physical, format dot) create materialized view m1 as SELECT approx_percentile(0.5) WITHIN GROUP (order by v1) from t; | ||
expected_outputs: | ||
- explain_output | ||
- name: test long dot output format (stream) | ||
sql: | | ||
create table t1(a int, b int); | ||
create table t2(c int primary key, d int); | ||
explain (physical, format dot) create materialized view m1 as SELECT | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col1, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col2, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col3, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col4, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col5, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col6, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col7, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col8, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col9, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col10, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col11, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col12, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col13, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col14, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col15, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col16, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col17, | ||
COALESCE((SELECT b FROM t2 WHERE t1.a = t2.c), 0) col18 | ||
from t1; | ||
expected_outputs: | ||
- explain_output |
439 changes: 439 additions & 0 deletions
439
src/frontend/planner_test/tests/testdata/output/explain_dot_format.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,6 +202,7 @@ define_keywords!( | |
DISTRIBUTED, | ||
DISTSQL, | ||
DO, | ||
DOT, | ||
DOUBLE, | ||
DROP, | ||
DYNAMIC, | ||
|
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