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


##########
spark/src/test/scala/org/apache/comet/CometCastSuite.scala:
##########
@@ -560,9 +567,16 @@ class CometCastSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
     castTest(withNulls(values).toDF("a"), DataTypes.StringType)
   }
 
-  ignore("cast DoubleType to TimestampType") {
-    // java.lang.ArithmeticException: long overflow
-    castTest(generateDoubles(), DataTypes.TimestampType)
+  test("cast DoubleType to TimestampType") {
+    compatibleTimezones.foreach { tz =>
+      withSQLConf(SQLConf.SESSION_LOCAL_TIMEZONE.key -> tz) {
+        withTable("t1") {
+          generateDoubles().write.saveAsTable("t1")
+          val df = spark.sql("select a, cast(a as timestamp) from t1")
+          assertDataFrameEquals(df)

Review Comment:
   Comet currently has the correct ANSI behavior because it falls back to 
Spark. I don't think we should merge this PR until we have confirmed that 
removing the fallback isn't introducing any correctness issues.



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