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


##########
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:
   So if the user uses a custom output format, they are responsible to also 
override this function to parse the key correctly? That doesn’t sound right to 
me. We need a better way to make this seamless.



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