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:
[email protected]
With regards,
Apache Git Services