Abhishek-Mohan opened a new issue, #7821:
URL: https://github.com/apache/datafusion-comet/issues/7821

   ### Describe the bug
   
   `CAST(date AS TIMESTAMP)` is marked `Compatible()` in `CometCast.scala` 
(runs in Rust by default), but can return a later instant than Spark when a DST 
spring-forward gap starts before midnight and ends after it.
   
   ### Example
   
   For `1919-03-31` in `America/Toronto` (clocks jumped from `23:30` to 
`00:30`):
   - Spark's `LocalDate.atStartOfDay(zoneId)` selects `00:30` local (`04:30Z`).
   - Comet's `resolve_local_datetime` (`native/spark-expr/src/utils.rs`) 
handles `LocalResult::None` by applying the pre-gap offset (3 hours earlier) to 
`00:00`, yielding `05:00Z`.
   
   The existing unit test in `native/spark-expr/src/kernels/temporal.rs` 
(around line 2350) pins this transition and notes the difference from 
`atStartOfDay`.
   
   ### Expected behavior
   
   Match Spark's `LocalDate.atStartOfDay(zoneId)` instant (the first valid 
instant after the gap) when midnight falls inside a spring-forward gap.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to