Lee-W commented on code in PR #64571:
URL: https://github.com/apache/airflow/pull/64571#discussion_r3279601370
##########
airflow-core/docs/migrations-ref.rst:
##########
@@ -106,7 +108,7 @@ Here's the list of all the Database Migrations that are
executed via when you ru
+-------------------------+------------------+-------------------+--------------------------------------------------------------+
| ``82dbd68e6171`` | ``cc92b33c6709`` | ``3.1.8`` | Add
composite index (ti_id, id DESC) to task_reschedule. |
+-------------------------+------------------+-------------------+--------------------------------------------------------------+
-| ``cc92b33c6709`` | ``eaf332f43c7c`` | ``3.1.0`` | Add
backward compatibility for serialized DAG format v3 to |
+| ``cc92b33c6709`` | ``eaf332f43c7c`` | ``3.1.0`` | Add
backward compatibility for serialized Dag format v3 to |
Review Comment:
reverted
##########
airflow-core/src/airflow/partition_mappers/temporal.py:
##########
@@ -144,6 +238,19 @@ def format(self, dt: datetime) -> str:
quarter = (dt.month - 1) // 3 + 1
return dt.strftime(self.output_format).format(quarter=quarter)
+ def decode_downstream(self, downstream_key: str) -> datetime:
+ # output_format carries a ``{quarter}`` placeholder, so strptime
doesn't
+ # apply directly. Locate ``YYYY...Q<digit>`` and rebuild the period
start.
+ match = self._YEAR_QUARTER_RE.search(downstream_key)
+ if match is None:
Review Comment:
added a new `_compile_output_format_regex` helper that derives a named-group
regex from `output_format`, and `decode_downstream` uses that regex to recover
--
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]