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

    https://github.com/apache/spark/pull/3184#discussion_r20687030
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/GeneratedAggregate.scala 
---
    @@ -117,15 +119,15 @@ case class GeneratedAggregate(
             val updateCount = If(IsNotNull(toCount), Add(currentCount, 
Literal(1L)), currentCount)
             val updateSum = Coalesce(Add(expr, currentSum) :: currentSum :: 
Nil)
     
    -        val resultType = expr.dataType match {
    -          case DecimalType.Fixed(precision, scale) =>
    -            DecimalType(precision + 4, scale + 4)
    -          case DecimalType.Unlimited =>
    +        val calcType =
    +          if (DecimalType.isFixed(expr.dataType)) {
    --- End diff --
    
    I think I am the one who was mistaken.  I asked Matei, who originally wrote 
this code, and he agrees that this looks correct.  Sorry for the delay.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to