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

    https://github.com/apache/spark/pull/12468#discussion_r60332726
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
 ---
    @@ -110,13 +110,17 @@ class CodegenContext {
       }
     
       def declareMutableStates(): String = {
    -    mutableStates.map { case (javaType, variableName, _) =>
    +    // It's possible that we add same mutable state twice, e.g. the 
`mergeExpressions` in
    +    // `TypedAggregateExpression`, we should call `distinct` here to 
remove the duplicated ones.
    --- End diff --
    
    yea, we can transform the left deserializer in `TypedAggregateExpression` 
and create new `LambdaVariable` with different names. But I'm afraid there will 
be more similar problems so I go with this approach.


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