mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: remove is_select_query (#33457)
This commit is contained in:
@@ -23,7 +23,6 @@ from sqlalchemy import column
|
||||
|
||||
from superset.db_engine_specs.kusto import KustoKqlEngineSpec
|
||||
from superset.sql.parse import SQLScript
|
||||
from superset.sql_parse import ParsedQuery
|
||||
from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm
|
||||
from tests.unit_tests.fixtures.common import dttm # noqa: F401
|
||||
|
||||
@@ -53,26 +52,6 @@ def test_sql_has_mutation(sql: str, expected: bool) -> None:
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"kql,expected",
|
||||
[
|
||||
("tbl | limit 100", True),
|
||||
("let foo = 1; tbl | where bar == foo", True),
|
||||
(".show tables", False),
|
||||
],
|
||||
)
|
||||
def test_kql_is_select_query(kql: str, expected: bool) -> None:
|
||||
"""
|
||||
Make sure that KQL dialect consider only statements that do not start with "." (dot)
|
||||
as a SELECT statements
|
||||
"""
|
||||
|
||||
from superset.db_engine_specs.kusto import KustoKqlEngineSpec
|
||||
|
||||
parsed_query = ParsedQuery(kql)
|
||||
assert KustoKqlEngineSpec.is_select_query(parsed_query) == expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"kql,expected",
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user