You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/26 15:19:11 UTC
[GitHub] [airflow] mik-laj commented on a diff in pull request #23971: Unify DbApiHook.run() method with the methods which override it
mik-laj commented on code in PR #23971:
URL: https://github.com/apache/airflow/pull/23971#discussion_r906834059
##########
airflow/hooks/dbapi.py:
##########
@@ -178,7 +179,25 @@ def get_first(self, sql, parameters=None):
cur.execute(sql)
return cur.fetchone()
- def run(self, sql, autocommit=False, parameters=None, handler=None):
+ @staticmethod
+ def maybe_split_sql_string(sql: str) -> List[str]:
Review Comment:
We want to keep Airflow 2.2 compatible for all providers, so you need to add some code to make this change compatible with older versions of Airflow as well. Most often it is done by detecting the function and if a given version of Airflow does not have a function, then using the code that was explicitly copied to the provider's package.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org