You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using sqloxide, the logic for testing if a CTE is a select statement doesn't account for set operations.
How to reproduce the bug
SQLLab: WITH t AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT * FROM t
Python interpreter:
importsuperset.sql_parseassql_parseassertsql_parse.sqloxide_parseisnotNone, "The case only fails when sqloxide is used"parsed_query=sql_parse.ParsedQuery("""WITH t AS (SELECT 1 UNION ALL SELECT 2)SELECT * FROM t""")
print("Is select:", parsed_query.is_select())
Expected results
Interpreter: Is select: True
Actual results
SQLLAb: Only SELECT statements are allowed against this database.
Interpreter: Is select: False
Environment
The problem arises only when sqloxide is installed.
Checklist
Make sure to follow these steps before submitting your issue - thank you!
I have checked the superset logs for python stacktraces and included it here as text if there are any.
I have reproduced the issue with at least the latest released version of superset.
I have checked the issue tracker for the same issue and I haven't found one similar.
Additional context
The text was updated successfully, but these errors were encountered:
When using sqloxide, the logic for testing if a CTE is a select statement doesn't account for set operations.
How to reproduce the bug
SQLLab:
WITH t AS ( SELECT 1 UNION ALL SELECT 2 ) SELECT * FROM t
Python interpreter:
Expected results
Interpreter:
Is select: True
Actual results
SQLLAb:
Only SELECT statements are allowed against this database.
Interpreter:
Is select: False
Environment
The problem arises only when
sqloxide
is installed.Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
The text was updated successfully, but these errors were encountered: