mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-23 15:34:09 +00:00
ISSUE-1088: Fix array_agg wildcard behavior (#1093)
Co-authored-by: Andrew Repp <arepp@cloudflare.com>
This commit is contained in:
parent
398a81029e
commit
70764a17e9
4 changed files with 111 additions and 36 deletions
|
@ -3800,3 +3800,22 @@ fn test_simple_insert_with_quoted_alias() {
|
|||
}
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_array_agg() {
|
||||
// follows general function with wildcard code path
|
||||
let sql = r#"SELECT GREATEST(sections_tbl.*) AS sections FROM sections_tbl"#;
|
||||
pg().verified_stmt(sql);
|
||||
|
||||
// follows special-case array_agg code path
|
||||
let sql2 = "SELECT ARRAY_AGG(sections_tbl.*) AS sections FROM sections_tbl";
|
||||
pg().verified_stmt(sql2);
|
||||
|
||||
// handles multi-part identifier with general code path
|
||||
let sql3 = "SELECT GREATEST(my_schema.sections_tbl.*) AS sections FROM sections_tbl";
|
||||
pg().verified_stmt(sql3);
|
||||
|
||||
// handles multi-part identifier with array_agg code path
|
||||
let sql4 = "SELECT ARRAY_AGG(my_schema.sections_tbl.*) AS sections FROM sections_tbl";
|
||||
pg().verified_stmt(sql4);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue