bujjibabukatta opened a new pull request, #70781:
URL: https://github.com/apache/airflow/pull/70781

   Temporal partition mappers (`StartOfHourMapper`, `StartOfDayMapper`, 
`StartOfWeekMapper`, `StartOfMonthMapper`, `StartOfQuarterMapper`, 
`StartOfYearMapper`) raised `ValueError` when an upstream key didn't match 
`input_format`, even if it was already at (or coarser than) the mapper's own 
granularity — e.g. `StartOfDayMapper().to_downstream("2026-07-30")` failed 
because the default `input_format` expects a full timestamp.
   
   `to_downstream` now falls back to parsing the key via `output_format` 
(through the existing `decode_downstream`) when `input_format` doesn't match, 
instead of raising immediately. This requires no `input_format` override for 
day-granularity (or any-granularity) upstream keys, and makes a mapper's own 
downstream output chainable back through another instance of itself. Keys 
matching neither format still raise a clear `ValueError` naming both formats 
tried.
   
   Closes #70762
   
   ## AI disclosure
   Used Claude (Anthropic) to help analyze the issue and draft the fix. 
Reviewed and tested by me.


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