AngersZhuuuu commented on a change in pull request #32975:
URL: https://github.com/apache/spark/pull/32975#discussion_r655032524



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
##########
@@ -664,6 +665,29 @@ class CastSuite extends CastSuiteBase {
     }
   }
 
+  test("SPARK-35820: Support cast DayTimeIntervalType in different fields") {
+    val ymPositive = Literal.create(
+      Duration.ofSeconds(12345678L, 123456789),
+      DayTimeIntervalType(DAY, SECOND))
+    val ymNegative = Literal.create(
+      Duration.ofSeconds(-12345678L, -123456789),

Review comment:
       > You can store `Duration.ofSeconds(12345678L, 123456789)` to a val, and 
call `.negated()`
   
   Done

##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
##########
@@ -664,6 +665,29 @@ class CastSuite extends CastSuiteBase {
     }
   }
 
+  test("SPARK-35820: Support cast DayTimeIntervalType in different fields") {
+    val ymPositive = Literal.create(

Review comment:
       > `ymPositive`, I think `ym` shold be replaced. Also fix below values.
   
   DOne




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

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