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

 ##########
 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:
   The problem is when calling `super().get_serialized_fields()` it would set 
`cls._serialized_fields` from the BaseOperator, hence it would not have 
`{"sql"}` in it

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to