You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/15 08:16:09 UTC
[GitHub] [doris] morrySnow opened a new pull request, #10882: [enhancement](Nereids)expression equals and hashCode function
morrySnow opened a new pull request, #10882:
URL: https://github.com/apache/doris/pull/10882
# Proposed changes
Issue Number: close #xxx
## Problem Summary:
review and add all missing equals and hashCode function to Expression and its sub class.
## Checklist(Required)
1. Does it affect the original behavior: (Yes/No/I Don't know)
2. Has unit tests been added: (Yes/No/No Need)
3. Has document been added or modified: (Yes/No/No Need)
4. Does it need to update dependencies: (Yes/No)
5. Are there any changes that cannot be rolled back: (Yes/No)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #10882: [enhancement](Nereids)expression equals and hashCode function
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #10882:
URL: https://github.com/apache/doris/pull/10882#issuecomment-1186763381
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morrySnow commented on a diff in pull request #10882: [enhancement](Nereids)expression equals and hashCode function
Posted by GitBox <gi...@apache.org>.
morrySnow commented on code in PR #10882:
URL: https://github.com/apache/doris/pull/10882#discussion_r925816146
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundFunction.java:
##########
@@ -77,4 +77,24 @@ public <R, C> R accept(ExpressionVisitor<R, C> visitor, C context) {
public Expression withChildren(List<Expression> children) {
return new UnboundFunction(name, isDistinct, children);
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ if (!super.equals(o)) {
+ return false;
+ }
+ UnboundFunction that = (UnboundFunction) o;
+ return isDistinct == that.isDistinct && name.equals(that.name);
Review Comment:
super.equals do this already
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #10882: [enhancement](Nereids)expression equals and hashCode function
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #10882:
URL: https://github.com/apache/doris/pull/10882#issuecomment-1186763404
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] jackwener commented on a diff in pull request #10882: [enhancement](Nereids)expression equals and hashCode function
Posted by GitBox <gi...@apache.org>.
jackwener commented on code in PR #10882:
URL: https://github.com/apache/doris/pull/10882#discussion_r924400463
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundFunction.java:
##########
@@ -77,4 +77,24 @@ public <R, C> R accept(ExpressionVisitor<R, C> visitor, C context) {
public Expression withChildren(List<Expression> children) {
return new UnboundFunction(name, isDistinct, children);
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ if (!super.equals(o)) {
+ return false;
+ }
+ UnboundFunction that = (UnboundFunction) o;
+ return isDistinct == that.isDistinct && name.equals(that.name);
Review Comment:
I'm not sure whether `equals` of `Expression` should use children `equals()`.
`Equal (1, 2)` not equals to ``Equal(1, 3)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] 924060929 merged pull request #10882: [enhancement](Nereids)expression equals and hashCode function
Posted by GitBox <gi...@apache.org>.
924060929 merged PR #10882:
URL: https://github.com/apache/doris/pull/10882
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org