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/08/18 07:22:04 UTC

[GitHub] [spark] gengliangwang commented on a change in pull request #33775: [SPARK-36428][SQL][FOLLOWUP] Simplify the implementation of make_timestamp

gengliangwang commented on a change in pull request #33775:
URL: https://github.com/apache/spark/pull/33775#discussion_r690970257



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala
##########
@@ -178,6 +178,10 @@ object AnsiTypeCoercion extends TypeCoercionBase {
       case (StringType, DecimalType) if isInputFoldable =>
         Some(DecimalType.SYSTEM_DEFAULT)
 
+      // If the target type is Decimal type and it wider than input, cast the input to decimal.

Review comment:
       On second thought. This code should not be needed.
   It will be covered by line 189
   ```
   case (n1: NumericType, n2: NumericType) =>
           val widerType = findWiderTypeForTwo(n1, n2)
            ....
   ```
   
   We don't need to touch `AnsiTypeCoercion.scala`




-- 
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: reviews-unsubscribe@spark.apache.org

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