taozhi8833998 / node-sql-parser

Parse simple SQL statements into an abstract syntax tree (AST) with the visited tableList and convert it back to SQL
https://taozhi8833998.github.io/node-sql-parser/
Apache License 2.0
750 stars 172 forks source link

Snowflake - error parsing a query with multiple union all and subqueries #1974

Closed LaizaAngrest closed 1 week ago

LaizaAngrest commented 2 weeks ago

Describe the bug Snowflake - error parsing a query with multiple union all and subqueries

Database Engine Snowflake

To Reproduce it('should parse a query with multiple union all and subqueries', function () { const parser = new SqlParser() const query = select * from ( ( ( select * from some_table ) union all ( select * from some_table ) ) union all ( select * from some_table ) ) const parsedSql = parser.parse(query, WarehouseType.Snowflake) expect(parsedSql).toBeDefined() })