zml1206 commented on code in PR #8583:
URL: https://github.com/apache/incubator-gluten/pull/8583#discussion_r1928026223


##########
gluten-ut/spark32/src/test/scala/org/apache/spark/sql/GlutenDateFunctionsSuite.scala:
##########
@@ -234,10 +221,8 @@ class GlutenDateFunctionsSuite extends DateFunctionsSuite 
with GlutenSQLTestsTra
           if (legacyParserPolicy == "legacy") {
             // In Spark 2.4 and earlier, to_timestamp() parses in seconds 
precision and cuts off
             // the fractional part of seconds. The behavior was changed by 
SPARK-27438.
-            // Ignore this test case. Velox returns null for such case.
-            // val legacyFmt = "yyyy/MM/dd HH:mm:ss"
-            // checkAnswer(df.select(to_timestamp(col("s"), legacyFmt)), Seq(
-            //  Row(ts1), Row(ts2)))
+            val legacyFmt = "yyyy/MM/dd HH:mm:ss"
+            checkAnswer(df.select(to_timestamp(col("s"), legacyFmt)), 
Seq(Row(ts1), Row(ts2)))

Review Comment:
   
   You can remove testGluten "to_timestamp" and enable vanilla Spark test 
"to_timestamp" because they are already the same.



##########
gluten-ut/spark35/src/test/scala/org/apache/spark/sql/GlutenDateFunctionsSuite.scala:
##########
@@ -232,10 +220,8 @@ class GlutenDateFunctionsSuite extends DateFunctionsSuite 
with GlutenSQLTestsTra
           if (legacyParserPolicy == "legacy") {
             // In Spark 2.4 and earlier, to_timestamp() parses in seconds 
precision and cuts off
             // the fractional part of seconds. The behavior was changed by 
SPARK-27438.
-            // Ignore this test case. Velox returns null for such case.
-            // val legacyFmt = "yyyy/MM/dd HH:mm:ss"
-            // checkAnswer(df.select(to_timestamp(col("s"), legacyFmt)), Seq(
-            //  Row(ts1), Row(ts2)))
+            val legacyFmt = "yyyy/MM/dd HH:mm:ss"
+            checkAnswer(df.select(to_timestamp(col("s"), legacyFmt)), 
Seq(Row(ts1), Row(ts2)))

Review Comment:
   ditto



##########
gluten-ut/spark34/src/test/scala/org/apache/spark/sql/GlutenDateFunctionsSuite.scala:
##########
@@ -232,10 +221,8 @@ class GlutenDateFunctionsSuite extends DateFunctionsSuite 
with GlutenSQLTestsTra
           if (legacyParserPolicy == "legacy") {
             // In Spark 2.4 and earlier, to_timestamp() parses in seconds 
precision and cuts off
             // the fractional part of seconds. The behavior was changed by 
SPARK-27438.
-            // Ignore this test case. Velox returns null for such case.
-            // val legacyFmt = "yyyy/MM/dd HH:mm:ss"
-            // checkAnswer(df.select(to_timestamp(col("s"), legacyFmt)), Seq(
-            //  Row(ts1), Row(ts2)))
+            val legacyFmt = "yyyy/MM/dd HH:mm:ss"
+            checkAnswer(df.select(to_timestamp(col("s"), legacyFmt)), 
Seq(Row(ts1), Row(ts2)))

Review Comment:
   ditto



##########
gluten-ut/spark33/src/test/scala/org/apache/spark/sql/GlutenDateFunctionsSuite.scala:
##########
@@ -232,10 +220,8 @@ class GlutenDateFunctionsSuite extends DateFunctionsSuite 
with GlutenSQLTestsTra
           if (legacyParserPolicy == "legacy") {
             // In Spark 2.4 and earlier, to_timestamp() parses in seconds 
precision and cuts off
             // the fractional part of seconds. The behavior was changed by 
SPARK-27438.
-            // Ignore this test case. Velox returns null for such case.
-            // val legacyFmt = "yyyy/MM/dd HH:mm:ss"
-            // checkAnswer(df.select(to_timestamp(col("s"), legacyFmt)), Seq(
-            //  Row(ts1), Row(ts2)))
+            val legacyFmt = "yyyy/MM/dd HH:mm:ss"
+            checkAnswer(df.select(to_timestamp(col("s"), legacyFmt)), 
Seq(Row(ts1), Row(ts2)))

Review Comment:
   ditto



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