eladkal commented on code in PR #23971:
URL: https://github.com/apache/airflow/pull/23971#discussion_r922869088


##########
airflow/providers/common/sql/hooks/sql.py:
##########
@@ -232,22 +270,19 @@ def run(self, sql, autocommit=False, parameters=None, 
handler=None):
                 results = []
                 for sql_statement in sql:
                     self._run_command(cur, sql_statement, parameters)
+
                     if handler is not None:
                         result = handler(cur)
                         results.append(result)
 
-            # If autocommit was set to False for db that supports autocommit,
-            # or if db does not supports autocommit, we do a manual commit.
+            # If autocommit was set to False or db does not support 
autocommit, we do a manual commit.
             if not self.get_autocommit(conn):
                 conn.commit()
 
         if handler is None:
             return None
-
-        if scalar:
-            return results[0]
-
-        return results
+        else:

Review Comment:
   `return_last` flag seems reasonable.
   
   I do like to point to my note 
https://github.com/apache/airflow/issues/23623#issuecomment-1122973826 but that 
ship has sailed.



-- 
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]

Reply via email to