fix(sql-lab): improved SQL statement parsing and validation (#42928)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2026-08-11 19:35:43 -07:00
committed by GitHub
co-authored by Claude Opus 4.8
parent d570335f67
commit 584466e02b
17 changed files with 787 additions and 111 deletions
+5 -2
View File
@@ -262,8 +262,11 @@ class TestSqlLabApi(SupersetTestCase):
return_value=formatter_response
)
with mock.patch("superset.commands.sql_lab.estimate.db") as mock_superset_db:
mock_superset_db.session.query().get.return_value = db_mock
with (
mock.patch("superset.commands.sql_lab.estimate.DatabaseDAO") as mock_dao,
mock.patch("superset.security_manager.raise_for_access"),
):
mock_dao.find_by_id.return_value = db_mock
data = {"database_id": 1, "sql": "SELECT 1"}
rv = self.client.post(