You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT
STRING_AGG(email, '') AS STRING_AGGROwner_Id_Email
FROM organizations
The above query gets converted to
SELECT
GROUP_CONCAT(owner_id_email, '') AS emails
FROM organizations
When passed through the below code,
query = """SELECT
STRING_AGG(email, '') AS emails
FROM organizations"""
expression_tree = parse_one(query, read='trino')
But GROUP_CONCAT is not a valid TRINO function (STRING_AGG is also not a valid TRINO function). The correct equivalent function is ARRAY_JOIN(ARRAY_AGG(email),',')
Can this be fixed?
The text was updated successfully, but these errors were encountered:
SudarshanVS
changed the title
STRING_
STRING_AGG wrongly being converted to GROUP_CONCAT in parse_one
Sep 27, 2023
sqlglot==13.3.0
The above query gets converted to
When passed through the below code,
But
GROUP_CONCAT
is not a valid TRINO function (STRING_AGG is also not a valid TRINO function). The correct equivalent function isARRAY_JOIN(ARRAY_AGG(email),',')
Can this be fixed?
The text was updated successfully, but these errors were encountered: