mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-11-01 15:44:14 +00:00
Parse ARRAY_AGG for Bigquery and Snowflake (#662)
This commit is contained in:
parent
0428ac742b
commit
87b4a168cb
8 changed files with 156 additions and 4 deletions
|
|
@ -224,6 +224,17 @@ fn parse_similar_to() {
|
|||
chk(true);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_array_agg_func() {
|
||||
for sql in [
|
||||
"SELECT ARRAY_AGG(x ORDER BY x) AS a FROM T",
|
||||
"SELECT ARRAY_AGG(x ORDER BY x LIMIT 2) FROM tbl",
|
||||
"SELECT ARRAY_AGG(DISTINCT x ORDER BY x LIMIT 2) FROM tbl",
|
||||
] {
|
||||
bigquery().verified_stmt(sql);
|
||||
}
|
||||
}
|
||||
|
||||
fn bigquery() -> TestedDialects {
|
||||
TestedDialects {
|
||||
dialects: vec![Box::new(BigQueryDialect {})],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue