Describe the bug
Athena parser error - alias for each element within the unnested array
Database Engine
Athena
To Reproduce
it('should parse a query with alias for each element within the unnested array', function () {
const parser = new SqlParserV2()
const query = `
SELECT id, array_agg(json_extract_scalar(elem, '$.value')) er_teams
FROM "bronze_prod"."jira_issues"
CROSS JOIN UNNEST(cast(json_extract(json_parse(fields), '$.customfield_10100') AS array(json))) t(elem)
GROUP BY id`
const parsedSql = parser.parse(query, WarehouseType.Athena)
expect(parsedSql).toBeDefined()
})
Describe the bug Athena parser error - alias for each element within the unnested array
Database Engine Athena
To Reproduce