uranusjr commented on code in PR #64571:
URL: https://github.com/apache/airflow/pull/64571#discussion_r3159834293
##########
airflow-core/src/airflow/serialization/encoders.py:
##########
@@ -461,6 +480,31 @@ def _(self, partition_mapper: ProductMapper) -> dict[str,
Any]:
def _(self, partition_mapper: AllowedKeyMapper) -> dict[str, Any]:
return {"allowed_keys": partition_mapper.allowed_keys}
+ @serialize_partition_mapper.register
+ def _(self, partition_mapper: RollupMapper) -> dict[str, Any]:
+ return {
+ "source_mapper":
encode_partition_mapper(partition_mapper.source_mapper),
+ "window": encode_window(partition_mapper.window),
+ }
+
+ @functools.singledispatchmethod
+ def serialize_window(self, window) -> dict[str, Any]:
+ if hasattr(window, "serialize"):
+ return window.serialize()
+ return {}
Review Comment:
This differs from e.g. timetable serialization. Why do we need to accept
arbitrary objects here?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]