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

    https://github.com/apache/spark/pull/5798#discussion_r29587194
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/patterns.scala
 ---
    @@ -137,30 +137,30 @@ object PartialAggregation {
           // Only do partial aggregation if supported by all aggregate 
expressions.
           if (allAggregates.size == partialAggregates.size) {
             // Create a map of expressions to their partial evaluations for 
all aggregate expressions.
    -        val partialEvaluations: Map[TreeNodeRef, SplitEvaluation] =
    -          partialAggregates.map(a => (new TreeNodeRef(a), 
a.asPartial)).toMap
    +        val partialEvaluations: Map[ExpressionEquals, SplitEvaluation] =
    +          partialAggregates.map(a => (ExpressionEquals(a), 
a.asPartial)).toMap
     
             // We need to pass all grouping expressions though so the grouping 
can happen a second
             // time. However some of them might be unnamed so we alias them 
allowing them to be
             // referenced in the second aggregation.
    -        val namedGroupingExpressions: Map[Expression, NamedExpression] =
    +        val namedGroupingExpressions: Map[AnyRef, NamedExpression] =
    --- End diff --
    
    Looks like a similar usage of `AttributeMap`. Should we create a 
`ExpressionMap`?


---
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