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 2020/12/21 11:41:08 UTC

[GitHub] [spark] yaooqinn commented on a change in pull request #30833: [SPARK-33834][SQL] Verify ALTER TABLE CHANGE COLUMN with Char and Varchar

yaooqinn commented on a change in pull request #30833:
URL: https://github.com/apache/spark/pull/30833#discussion_r546659762



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -137,6 +137,10 @@ object Cast {
     case (_: CalendarIntervalType, StringType) => true
     case (NullType, _) => true
 
+    case (CharType(l1), CharType(l2)) => l1 == l2
+    case (CharType(l1), VarcharType(l2)) => l1 <= l2
+    case (VarcharType(l1), VarcharType(l2)) => l1 <= l2

Review comment:
       OK




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