Zim95 commented on issue #70762:
URL: https://github.com/apache/airflow/issues/70762#issuecomment-6523682885

   Thanks for the clarification, @Patrick539. I agree that falling back to 
output_format alone wouldn’t address chaining across different mappers.
   
   What if we introduced a shared parser that recognizes the supported 
partition-key formats using strict regex matching, then fills in missing 
date/time components with defaults corresponding to the start of that period?
   
   For example:
   
   * 2026 → 2026-01-01T00:00:00
   * 2026-Q3 → 2026-07-01T00:00:00
   * 2026-07 → 2026-07-01T00:00:00
   * 2026-07-30 → 2026-07-30T00:00:00
   
   Each mapper could then operate on the normalized datetime and produce its 
own output format. This would allow us to reuse the parsing logic across all 
temporal mappers rather than introducing individual fallbacks.
   
   We’d still need to handle ISO week formats and invalid dates explicitly.
   
   One consideration is whether mapping from coarser to finer granularity 
should be supported, since a year-to-day conversion would select January 1 
rather than represent every day of that year.
   
   Would this approach make sense? If so, I’d be happy to work on the shared 
parser and add tests covering mapper chaining.


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