mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix: return 422 on invalid SQL (#34303)
This commit is contained in:
@@ -644,7 +644,7 @@ class SQLStatement(BaseSQLStatement[exp.Expression]):
|
||||
# depending on the dialect (Oracle, MS SQL) the `ALTER` is parsed as a
|
||||
# command, not an expression - check at root level
|
||||
if isinstance(self._parsed, exp.Command) and self._parsed.name == "ALTER":
|
||||
return True
|
||||
return True # pragma: no cover
|
||||
|
||||
# Postgres runs DMLs prefixed by `EXPLAIN ANALYZE`, see
|
||||
# https://www.postgresql.org/docs/current/sql-explain.html
|
||||
|
||||
Reference in New Issue
Block a user