feat(ingest): make query formatting more robust (#10678)

This commit is contained in:
Harshal Sheth 2024-06-12 01:57:36 -05:00 committed by GitHub
parent 05aee03f3f
commit 1d4977cbb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -315,8 +315,8 @@ def try_format_query(
try:
dialect = get_dialect(platform)
expression = parse_statement(expression, dialect=dialect)
return expression.sql(dialect=dialect, pretty=True)
parsed_expression = parse_statement(expression, dialect=dialect)
return parsed_expression.sql(dialect=dialect, pretty=True)
except Exception as e:
if raises:
raise