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

    https://github.com/apache/spark/pull/20023#discussion_r160147366
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/types/DecimalType.scala ---
    @@ -117,6 +117,7 @@ object DecimalType extends AbstractDataType {
       val MAX_SCALE = 38
       val SYSTEM_DEFAULT: DecimalType = DecimalType(MAX_PRECISION, 18)
       val USER_DEFAULT: DecimalType = DecimalType(10, 0)
    +  val MINIMUM_ADJUSTED_SCALE = 6
    --- End diff --
    
    Yes, I followed Hive's implementation which works like this and applies 
this 6 digits minimum to all operations. This means that SQLServer allows to 
round more digits than us in those cases, ie. we ensure at least 6 digits for 
the scale, while SQLServer doesn't.


---

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

Reply via email to