mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-27 01:14:07 +00:00
ISSUE-1147: Add support for MATERIALIZED CTEs (#1148)
Co-authored-by: Andrew Repp <arepp@cloudflare.com> Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
parent
57113a9344
commit
0c5f6fbf81
5 changed files with 65 additions and 9 deletions
|
@ -3837,3 +3837,12 @@ fn parse_array_agg() {
|
|||
let sql4 = "SELECT ARRAY_AGG(my_schema.sections_tbl.*) AS sections FROM sections_tbl";
|
||||
pg().verified_stmt(sql4);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_mat_cte() {
|
||||
let sql = r#"WITH cte AS MATERIALIZED (SELECT id FROM accounts) SELECT id FROM cte"#;
|
||||
pg().verified_stmt(sql);
|
||||
|
||||
let sql2 = r#"WITH cte AS NOT MATERIALIZED (SELECT id FROM accounts) SELECT id FROM cte"#;
|
||||
pg().verified_stmt(sql2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue