Describe the bug
Athena parser error - UNNEST function with AS
Database Engine
Athena
To Reproduce
it('should parse a query with UNNEST and AS', function () {
const parser = new SqlParserV2()
const query = `
WITH CTE AS (
SELECT * FROM test_cte
)
SELECT
organization,
date,
author_email,
t.key AS tag,
t.value AS count
FROM CTE
CROSS JOIN UNNEST(tags_counts) AS t (key, value)
ORDER BY 1, 2`
const parsedSql = parser.parse(query, WarehouseType.Athena)
expect(parsedSql).toBeDefined()
})
Describe the bug Athena parser error - UNNEST function with AS
Database Engine Athena
To Reproduce