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
Is your feature request related to a problem? Please describe.
Trino is one of the few execution engines that does not accept a trailing semi-colon. sqlparse leaves the semi-colon after splitting. This means that the strings in result list of sqlparse.raw(raw) are not valid SQL for all execution engines.
Describe the solution you'd like
Semicolon at the end of statements should be omitted by default (it seems like a safe choice). Alternatively it could be done with a configuration option.
Describe alternatives you've considered
The alternative is e.g. to have a separate trimming process that post-processes the result of sqlparse.split(raw). However trimming unnecessary characters feels like a part of splitting process.
Is your feature request related to a problem? Please describe.
Trino is one of the few execution engines that does not accept a trailing semi-colon. sqlparse leaves the semi-colon after splitting. This means that the strings in result list of
sqlparse.raw(raw)
are not valid SQL for all execution engines.Describe the solution you'd like
Semicolon at the end of statements should be omitted by default (it seems like a safe choice). Alternatively it could be done with a configuration option.
Describe alternatives you've considered
The alternative is e.g. to have a separate trimming process that post-processes the result of
sqlparse.split(raw)
. However trimming unnecessary characters feels like a part of splitting process.Additional context
See related Airflow issue: apache/airflow#34828
The text was updated successfully, but these errors were encountered: