betodealmeida commented on a change in pull request #11904:
URL:
https://github.com/apache/incubator-superset/pull/11904#discussion_r535456196
##########
File path: superset/sql_lab.py
##########
@@ -322,9 +322,15 @@ def execute_sql_statements( # pylint:
disable=too-many-arguments, too-many-loca
raise SqlLabException("Results backend isn't configured.")
# Breaking down into multiple statements
- parsed_query = ParsedQuery(rendered_query)
- statements = parsed_query.get_statements()
- logger.info("Query %s: Executing %i statement(s)", str(query_id),
len(statements))
+ if not db_engine_spec.run_multiple_statements_as_one:
+ parsed_query = ParsedQuery(rendered_query)
+ statements = parsed_query.get_statements()
+ logger.info(
+ "Query %s: Executing %i statement(s)", str(query_id),
len(statements)
+ )
+ else:
+ statements = [rendered_query]
+ logger.info("Query %s: Executing query as a single statement(s)",
str(query_id))
Review comment:
Good catch!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]