mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
fix: is_select with UNION (#25290)
This commit is contained in:
@@ -1623,3 +1623,13 @@ def test_is_select() -> None:
|
||||
Test `is_select`.
|
||||
"""
|
||||
assert not ParsedQuery("SELECT 1; DROP DATABASE superset").is_select()
|
||||
assert ParsedQuery(
|
||||
"with base as(select id from table1 union all select id from table2) select * from base"
|
||||
).is_select()
|
||||
assert ParsedQuery(
|
||||
"""
|
||||
WITH t AS (
|
||||
SELECT 1 UNION ALL SELECT 2
|
||||
)
|
||||
SELECT * FROM t"""
|
||||
).is_select()
|
||||
|
||||
Reference in New Issue
Block a user