You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/30 06:57:20 UTC

[GitHub] [spark] AngersZhuuuu commented on a change in pull request #32001: [SPARK-34902][SQL] Support cast between LongType & DayTimeIntervalType and IntegerType & YearMonthIntervalType

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -72,6 +72,11 @@ object Cast {
 
     case (StringType, CalendarIntervalType) => true
 
+    case (LongType, DayTimeIntervalType) => true
+    case (DayTimeIntervalType, LongType) => true
+    case (IntegerType, YearMonthIntervalType) => true
+    case (YearMonthIntervalType, IntegerType) => true

Review comment:
       I encounter this when I want to write test case in last pr about DayTimeIntervalType.
   Since it store value as Long, so I think it can convert a long value to DayTimeIntervalType. But it failed.




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org