fix: add comments to SQL clause validation (#39167)

(cherry picked from commit 0b419a07f5)
This commit is contained in:
Luiz Otavio
2026-04-16 09:19:39 -03:00
committed by Michael S. Molina
parent 954902db1d
commit 3cbc83449f
2 changed files with 13 additions and 3 deletions

View File

@@ -1557,7 +1557,7 @@ def sanitize_clause(clause: str, engine: str) -> str:
return Dialect.get_or_raise(dialect).generate(
statement._parsed, # pylint: disable=protected-access
copy=True,
comments=False,
comments=True,
pretty=False,
)
except SupersetParseError as ex: