mirror of
https://github.com/apache/superset.git
synced 2026-04-12 20:57:55 +00:00
fix: handle comments in has_table_query (#23882)
This commit is contained in:
@@ -1217,6 +1217,14 @@ def test_sqlparse_issue_652():
|
||||
("extract(HOUR from from_unixtime(hour_ts)", False),
|
||||
("(SELECT * FROM table)", True),
|
||||
("(SELECT COUNT(DISTINCT name) from birth_names)", True),
|
||||
(
|
||||
"(SELECT table_name FROM information_schema.tables WHERE table_name LIKE '%user%' LIMIT 1)",
|
||||
True,
|
||||
),
|
||||
(
|
||||
"(SELECT table_name FROM /**/ information_schema.tables WHERE table_name LIKE '%user%' LIMIT 1)",
|
||||
True,
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_has_table_query(sql: str, expected: bool) -> None:
|
||||
|
||||
Reference in New Issue
Block a user