Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/15668#discussion_r86730984
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RewriteDistinctAggregates.scala
---
@@ -261,9 +275,9 @@ object RewriteDistinctAggregates extends
Rule[LogicalPlan] {
private def nullify(e: Expression) = Literal.create(null, e.dataType)
private def expressionAttributePair(e: Expression) =
- // We are creating a new reference here instead of reusing the
attribute in case of a
- // NamedExpression. This is done to prevent collisions between
distinct and regular aggregate
- // children, in this case attribute reuse causes the input of the
regular aggregate to bound to
- // the (nulled out) input of the distinct aggregate.
+ // We are creating a new reference here instead of reusing the attribute
in case of a
--- End diff --
Revert this change
---
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]