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/12/03 10:25:56 UTC

[GitHub] [airflow] ashb commented on a change in pull request #6714: [AIRFLOW-6153] Allow adding Custom Fields to Serialized Operators

ashb commented on a change in pull request #6714: [AIRFLOW-6153] Allow adding Custom Fields to Serialized Operators
URL: https://github.com/apache/airflow/pull/6714#discussion_r353094794
 
 

 ##########
 File path: airflow/gcp/operators/bigquery.py
 ##########
 @@ -594,6 +594,12 @@ def on_kill(self):
             self.log.info('Cancelling running query')
             self.bq_cursor.cancel_query()
 
+    @classmethod
+    def get_serialized_fields(cls):
+        """Serialized BigQueryOperator contain exactly these fields."""
+        cls._serialized_fields = frozenset(super().get_serialized_fields() | {"sql"})
+        return cls._serialized_fields
 
 Review comment:
   These should have the `if not cls._serialied_fields` guard too. It won't break without it (as a set won't have the value more than once)

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