Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22450#discussion_r218765559
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/DecimalPrecision.scala
 ---
    @@ -129,16 +129,17 @@ object DecimalPrecision extends TypeCoercionRule {
             resultType)
     
         case Divide(e1 @ DecimalType.Expression(p1, s1), e2 @ 
DecimalType.Expression(p2, s2)) =>
    +      val adjP2 = if (s2 < 0) p2 - s2 else p2
    --- End diff --
    
    SGTM


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to