andygrove commented on code in PR #6348:
URL: https://github.com/apache/datafusion-comet/pull/6348#discussion_r4149062806


##########
spark/src/test/scala/org/apache/comet/CometTemporalExpressionSuite.scala:
##########
@@ -823,8 +823,8 @@ class CometTemporalExpressionSuite extends CometTestBase 
with AdaptiveSparkPlanH
                 java.sql.Timestamp.valueOf("2024-06-15 10:30:00"),
                 DataTypes.TimestampType)))),
         dummyDF.selectExpr(
-          "unix_date(cast(TIMESTAMP('1970-01-01 00:00:00') as date))",
-          "unix_date(cast(TIMESTAMP('2024-06-15 10:30:00') as date))"))
+          "cast(floor(unix_micros(TIMESTAMP('1970-01-01 00:00:00')) / 
86400000000D) as int)",
+          "cast(floor(unix_micros(TIMESTAMP('2024-06-15 10:30:00')) / 
86400000000D) as int)"))

Review Comment:
   Added in 899cb5a53: `Days(Literal(-1L, TimestampType))` under `Asia/Tokyo`, 
expecting `-1`. With the serde switched back to the session timezone it fails 
with `[0]` vs `[-1]`, and it passes with this change. One detail: 
`SparkFunSuite` pins the JVM default zone to `America/Los_Angeles`, so that 
block runs in LA rather than UTC on CI. Neither literal is near an LA day 
boundary, so as you expected it passed with the old serde too.
   



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