-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Dylan <[email protected]>
- Loading branch information
1 parent
9cf1b06
commit 454bf2f
Showing
3 changed files
with
76 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- sql: | | ||
CREATE TABLE t1 (pk int, a int, b int, c bigint, d int); | ||
CREATE MATERIALIZED VIEW t1_mv AS SELECT SUM(a) as sa, SUM(b) as sb, SUM(c) as sc, SUM(d) as sd FROM t1; | ||
SELECT sa, count(*) as cnt2 FROM t1_mv GROUP BY sa ORDER BY cnt2 DESC LIMIT 50 OFFSET 50; | ||
expected_outputs: | ||
- batch_plan | ||
- sql: | | ||
CREATE TABLE t1 (pk int, a int, b int, c bigint, d int); | ||
CREATE MATERIALIZED VIEW t1_mv AS SELECT * from t1; | ||
SELECT * FROM t1_mv ORDER BY a DESC LIMIT 50 OFFSET 50; | ||
expected_outputs: | ||
- batch_plan | ||
- sql: | | ||
CREATE TABLE t1 (pk int, a int, b int, c bigint, d int); | ||
CREATE MATERIALIZED VIEW t1_mv AS SELECT * from t1 order by a desc; | ||
SELECT * FROM t1_mv ORDER BY a DESC LIMIT 50 OFFSET 50; | ||
expected_outputs: | ||
- batch_plan |
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,28 @@ | ||
# This file is automatically generated. See `src/frontend/planner_test/README.md` for more information. | ||
- sql: | | ||
CREATE TABLE t1 (pk int, a int, b int, c bigint, d int); | ||
CREATE MATERIALIZED VIEW t1_mv AS SELECT SUM(a) as sa, SUM(b) as sb, SUM(c) as sc, SUM(d) as sd FROM t1; | ||
SELECT sa, count(*) as cnt2 FROM t1_mv GROUP BY sa ORDER BY cnt2 DESC LIMIT 50 OFFSET 50; | ||
batch_plan: |- | ||
BatchExchange { order: [count DESC], dist: Single } | ||
└─BatchTopN { order: [count DESC], limit: 50, offset: 50 } | ||
└─BatchSimpleAgg { aggs: [internal_last_seen_value(t1_mv.sa), count] } | ||
└─BatchScan { table: t1_mv, columns: [t1_mv.sa], distribution: Single } | ||
- sql: | | ||
CREATE TABLE t1 (pk int, a int, b int, c bigint, d int); | ||
CREATE MATERIALIZED VIEW t1_mv AS SELECT * from t1; | ||
SELECT * FROM t1_mv ORDER BY a DESC LIMIT 50 OFFSET 50; | ||
batch_plan: |- | ||
BatchTopN { order: [t1_mv.a DESC], limit: 50, offset: 50 } | ||
└─BatchExchange { order: [], dist: Single } | ||
└─BatchTopN { order: [t1_mv.a DESC], limit: 100, offset: 0 } | ||
└─BatchScan { table: t1_mv, columns: [t1_mv.pk, t1_mv.a, t1_mv.b, t1_mv.c, t1_mv.d], distribution: SomeShard } | ||
- sql: | | ||
CREATE TABLE t1 (pk int, a int, b int, c bigint, d int); | ||
CREATE MATERIALIZED VIEW t1_mv AS SELECT * from t1 order by a desc; | ||
SELECT * FROM t1_mv ORDER BY a DESC LIMIT 50 OFFSET 50; | ||
batch_plan: |- | ||
BatchTopN { order: [t1_mv.a DESC], limit: 50, offset: 50 } | ||
└─BatchExchange { order: [], dist: Single } | ||
└─BatchLimit { limit: 100, offset: 0 } | ||
└─BatchScan { table: t1_mv, columns: [t1_mv.pk, t1_mv.a, t1_mv.b, t1_mv.c, t1_mv.d], limit: 100, distribution: SomeShard } |
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