andygrove opened a new pull request, #4040:
URL: https://github.com/apache/datafusion-comet/pull/4040

   ## Which issue does this PR close?
   
   Closes #.
   
   ## Rationale for this change
   
   Comet's native `date_trunc` is currently marked `Incompatible` for non-UTC 
session timezones and falls back to Spark by default. When a user opts into the 
native path via `spark.comet.expression.TruncTimestamp.allowIncompatible=true`, 
there is no SQL-level regression coverage that exercises DST transition 
boundaries. This gap makes it easy for well-intentioned DST-related changes in 
the Rust kernel to introduce subtle correctness regressions that CI will not 
catch.
   
   ## What changes are included in this PR?
   
   Adds one SQL file-based test: 
`spark/src/test/resources/sql-tests/expressions/datetime/trunc_timestamp_dst.sql`.
   
   The file sets the session timezone to `America/Los_Angeles`, enables 
`allowIncompatible` for `TruncTimestamp`, and runs `date_trunc` at every 
supported level (DAY, HOUR, WEEK, MONTH, QUARTER, YEAR) against a small table 
that includes the 2024 spring-forward day (March 10), the 2024 fall-back day 
(November 3), and baseline non-DST days.
   
   ## How are these changes tested?
   
   The test itself is the change. Run it with:
   
   ```
   ./mvnw test -Dsuites='org.apache.comet.CometSqlFileTestSuite 
trunc_timestamp_dst' -Dtest=none
   ```
   
   On current `main`, the test passes, verifying that the existing native 
`date_trunc` implementation matches Spark across the full DST matrix.


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