uranusjr commented on code in PR #66030:
URL: https://github.com/apache/airflow/pull/66030#discussion_r3370756333


##########
airflow-core/src/airflow/partition_mappers/temporal.py:
##########
@@ -419,3 +422,130 @@ def normalize(self, dt: datetime) -> datetime:
             second=0,
             microsecond=0,
         )
+
+
+# Keep ``FanOutMapper.default_downstream_mapper_by_window_name`` in sync with
+# the SDK copy in
+# ``task-sdk/src/airflow/sdk/definitions/partition_mappers/temporal.py`` —
+# the SDK and core class hierarchies are independent (the SDK cannot import
+# core), so both sides carry the same defaults and the lookup is by class
+# name. When adding a new ``Window`` subclass, extend the table on both
+# sides; a missing entry raises ``ValueError`` at ``FanOutMapper.__init__``
+# (see ``FanOutMapper._resolve_default_downstream_mapper``).

Review Comment:
   Move this closer to the attribute. This is too far and will very likely be 
missed when someone changes the attribute. (A pre-commit check is of course 
better.)



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

Reply via email to