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


##########
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:
   Sure. I totally agree that. I am working on introducing try and ANSI 
behavior to 'assertDataFrameEquals' method to make sure we don't skip any test 
case



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