potiuk commented on code in PR #23971:
URL: https://github.com/apache/airflow/pull/23971#discussion_r922717215
##########
airflow/providers/common/sql/hooks/sql.py:
##########
@@ -213,14 +248,17 @@ def run(self, sql, autocommit=False, parameters=None,
handler=None):
before executing the query.
:param parameters: The parameters to render the SQL query with.
:param handler: The result handler which is called with the result of
each statement.
- :return: query results if handler was provided.
+ :param split_statements: Whether to split a single SQL string into
statements and run separately
+ :return: return only result of the ALL SQL expressions if handler was
provided.
"""
- scalar = isinstance(sql, str)
- if scalar:
- sql = [sql]
+ if isinstance(sql, str):
Review Comment:
Nice!
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]