-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(binder): add enable_materialized_cte settings (#16950)
- Loading branch information
Showing
4 changed files
with
54 additions
and
4 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
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
36 changes: 36 additions & 0 deletions
36
tests/sqllogictests/suites/mode/standalone/explain/explain_cte.test
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,36 @@ | ||
query T | ||
EXPLAIN WITH t AS MATERIALIZED (SELECT * FROM numbers(5)) SELECT * FROM t; | ||
---- | ||
MaterializedCTE | ||
├── output columns: [number (#1)] | ||
├── TableScan | ||
│ ├── table: default.system.numbers | ||
│ ├── output columns: [number (#0)] | ||
│ ├── read rows: 5 | ||
│ ├── read size: < 1 KiB | ||
│ ├── partitions total: 1 | ||
│ ├── partitions scanned: 1 | ||
│ ├── push downs: [filters: [], limit: NONE] | ||
│ └── estimated rows: 5.00 | ||
└── CTEScan | ||
├── CTE index: 0, sub index: 1 | ||
└── estimated rows: 5.00 | ||
|
||
statement ok | ||
set enable_materialized_cte = 0; | ||
|
||
query T | ||
EXPLAIN WITH t AS MATERIALIZED (SELECT * FROM numbers(5)) SELECT * FROM t; | ||
---- | ||
TableScan | ||
├── table: default.system.numbers | ||
├── output columns: [number (#0)] | ||
├── read rows: 5 | ||
├── read size: < 1 KiB | ||
├── partitions total: 1 | ||
├── partitions scanned: 1 | ||
├── push downs: [filters: [], limit: NONE] | ||
└── estimated rows: 5.00 | ||
|
||
statement ok | ||
set enable_materialized_cte = 1; |