mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-09 13:40:22 +00:00
snowflake: PIVOT on derived table factors (#1027)
This commit is contained in:
parent
5a3f19310e
commit
dc2ceedeea
2 changed files with 20 additions and 2 deletions
|
@ -1140,3 +1140,10 @@ fn parse_division_correctly() {
|
|||
"SELECT tbl1.field / tbl2.field FROM tbl1 JOIN tbl2 ON tbl1.id = tbl2.entity_id",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_pivot_of_table_factor_derived() {
|
||||
snowflake().verified_stmt(
|
||||
"SELECT * FROM (SELECT place_id, weekday, open FROM times AS p) PIVOT(max(open) FOR weekday IN (0, 1, 2, 3, 4, 5, 6)) AS p (place_id, open_sun, open_mon, open_tue, open_wed, open_thu, open_fri, open_sat)"
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue