mik-laj commented on a change in pull request #8991:
URL: https://github.com/apache/airflow/pull/8991#discussion_r429614304



##########
File path: airflow/providers/odbc/hooks/odbc.py
##########
@@ -24,7 +24,23 @@
 import pyodbc
 
 from airflow.hooks.dbapi_hook import DbApiHook
-from airflow.utils.helpers import merge_dicts
+
+
+# We do not import it from airflow.utils because merge_dicts is not available 
in Airflow 1.10
+# So this operator would not be backportable
+def merge_dicts(dict1, dict2):

Review comment:
       ``{**dict1, **dict2}`` only merges the first dictionary. This function 
also merges nested dictionaries. 
   ```
   >>> dict_a = {'A': {'B': {'C': 'D'}}}
   >>> dict_b = {'A': {'B': {'E': 'F'}}}
   >>> {**dict_a, **dict_b}
   {'A': {'B': {'E': 'F'}}}
   >>> merge_dicts(dict_a, dict_b)
   {'A': {'B': {'C': 'D', 'E': 'F'}}}
   ```




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to