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 2019/08/09 12:00:35 UTC

[GitHub] [airflow] marengaz commented on a change in pull request #5766: [AIRFLOW-4230] BigQuery schema update options should be a list

marengaz commented on a change in pull request #5766: [AIRFLOW-4230] BigQuery schema update options should be a list
URL: https://github.com/apache/airflow/pull/5766#discussion_r312447223
 
 

 ##########
 File path: airflow/contrib/hooks/bigquery_hook.py
 ##########
 @@ -761,6 +761,12 @@ def run_query(self,
                 }
         :type encryption_configuration: dict
         """
+        # To provide backward compatibility
+        if isinstance(schema_update_options, tuple):
+            schema_update_options = list(schema_update_options)
+
+        if schema_update_options is None:
+            schema_update_options = []
 
 Review comment:
   you probs dont need to check
   ```list([1,2,3]) == list((1,2,3))
   True```
   
   this would save a line and keeps all the same code together:
   ```suggestion
               if schema_update_options is None:
                      schema_update_options = []
               else:
                      # To provide backward compatibility
                      schema_update_options = list(schema_update_options)
   ```
   

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


With regards,
Apache Git Services