Github user chenghao-intel commented on a diff in the pull request:
https://github.com/apache/spark/pull/6110#discussion_r30377329
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
@@ -198,10 +198,12 @@ class Analyzer(
g.bitmasks.foreach { bitmask =>
// get the non selected grouping attributes according to the bit
mask
- val nonSelectedGroupExprSet = buildNonSelectExprSet(bitmask,
g.groupByExprs)
+ val nonSelectedGroupExprs = buildNonSelectExprs(bitmask,
g.groupByExprs)
val substitution = (g.child.output :+ g.gid).map(expr => expr
transformDown {
- case x: Expression if nonSelectedGroupExprSet.contains(x) =>
+ case x: Expression
+ if nonSelectedGroupExprs.find(
+ ExpressionEquality(_) == ExpressionEquality(x)).isDefined
=>
--- End diff --
But you need to add `semanticEquals` for all of the non-leaf expression.
---
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]