Closed Bisk1 closed 11 months ago
It's been a while since I last worked with an Oracle database, but some backends had the same requirement IIRC.
@andialbrecht do you plan next release any time soon? this enhancement would unblock a bugfix in Airflow
@andialbrecht following up on this one, do you have a release data in mind for 0.5.0?
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: https://github.com/apache/airflow/issues/34828