fix(sqllab): quote CTAS target identifiers and validate tmp_table_name format (#40245)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Shaitan
2026-06-03 12:55:25 +01:00
committed by GitHub
parent 725f5ed2a9
commit f7f50a7977
6 changed files with 56 additions and 118 deletions

View File

@@ -18,6 +18,7 @@
import pytest
from superset.sql.parse import CTASMethod
from superset.sqllab.sqllab_execution_context import (
CreateTableAsSelect,
SqlJsonExecutionContext,
@@ -97,6 +98,6 @@ def test_create_table_as_select():
"tmp_table_name": "temp_table",
}
ctas = CreateTableAsSelect.create_from(query_params)
assert ctas.ctas_method == "TABLE"
assert ctas.ctas_method == CTASMethod.TABLE
assert ctas.target_schema_name == "public"
assert ctas.target_table_name == "temp_table"