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

   `ChainMapper.to_partition_date()` returned `None` when an identity mapper 
followed a temporal mapper, even though the identity mapper preserved the date 
key. For example, `ChainMapper(StartOfDayMapper(), IdentityMapper())` maps a 
timestamp to `"2024-03-15"`, which `StartOfDayMapper` resolves to midnight UTC 
— but the chain returned `None`.
   
   - What: skip trailing identity mappers when resolving the partition date 
anchor; return `None` if the preceding mapper cannot parse the key.
   - Why: self-discovered defect — the last mapper was assumed to own the 
anchor, but an identity mapper preserves the key rather than defining its 
format.
   - Tests: added regression coverage for a valid date key and an invalid key.
   - Verified: focused pytest reproduction (before: returned None instead of 
expected UTC datetime; after: 1 passed); `compileall` and `git diff --check` 
clean. No open PR addresses this.


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