uranusjr commented on code in PR #67537:
URL: https://github.com/apache/airflow/pull/67537#discussion_r3411701989
##########
airflow-core/src/airflow/timetables/base.py:
##########
@@ -258,6 +258,22 @@ def get_partition_mapper(self, *, name: str = "", uri: str
= "") -> PartitionMap
)
raise NotImplementedError(msg)
+ def iter_partition_dagrun_infos(
+ self,
+ *,
+ earliest_date: datetime.date,
+ latest_date: datetime.date,
+ ) -> Iterable[DagRunInfo]:
+ """
+ Yield one DagRunInfo per partition for calendar days in
``[earliest_date, latest_date]`` (both inclusive).
+
+ Only called for partitioned timetables (``partitioned is True``). The
default
+ implementation raises :exc:`NotImplementedError`; timetables that set
+ ``partitioned = True`` must override this.
+ """
+ msg = f"{type(self).__name__} is partitioned but does not implement
iter_partition_dagrun_infos."
+ raise NotImplementedError(msg)
Review Comment:
Should this check `self.partitioned`? If this is called on a timetable is
not partitioned, the error would still say the timetable is partitioned but
does not implement the function, which is confusing.
--
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]