Github user dilipbiswal commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22448#discussion_r218310175
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
 ---
    @@ -89,10 +91,10 @@ object TypeCoercion {
         case (NullType, t1) => Some(t1)
         case (t1, NullType) => Some(t1)
     
    -    case (t1: IntegralType, t2: DecimalType) if t2.isWiderThan(t1) =>
    -      Some(t2)
    -    case (t1: DecimalType, t2: IntegralType) if t1.isWiderThan(t2) =>
    -      Some(t1)
    +    case (t1: IntegralType, t2: DecimalType) =>
    --- End diff --
    
    @cloud-fan Would we need a guard here to be safe ? like 
    ``` case (t1: IntegralType, t2: DecimalType) if 
findWiderDecimalType(DecimalType.forType(t1), t2)).isdefined => ```


---

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

Reply via email to