Skip to content

Commit

Permalink
reafctor
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Sep 5, 2023
1 parent 2fa2a06 commit 3371fa5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions superset/sql_lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,7 @@ def execute_sql_statements(

# Commit the connection so CTA queries will create the table and any DML.
should_commit = (
any(
not db_engine_spec.is_select_query(statement)
for statement in parsed_query.get_statements()
)
not db_engine_spec.is_select_query(parsed_query) # check if query is DML
or apply_ctas
)
if should_commit:
Expand Down

0 comments on commit 3371fa5

Please sign in to comment.