-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-7269] [SQL] Incorrect analysis for aggregation(use semanticEquals) #6173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,6 +76,12 @@ abstract class Expression extends TreeNode[Expression] { | |
| case u: UnresolvedAttribute => PrettyAttribute(u.name) | ||
| }.toString | ||
| } | ||
|
|
||
| def semanticEquals(other: Expression): Boolean = this.getClass == other.getClass && | ||
| this.productIterator.zip(other.asInstanceOf[Product].productIterator).forall { | ||
| case (e1: Expression, e2: Expression) => e1 semanticEquals e2 | ||
| case (i1, i2) => i1 == i2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The difficulty here is we probably never knows |
||
| } | ||
| } | ||
|
|
||
| abstract class BinaryExpression extends Expression with trees.BinaryNode[Expression] { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Existing: does this need to be wrapped?