Uh oh!
There was an error while loading. Please reload this page.
[fix](nereids) add equals for some unbound expressions - #55060
Merged
Conversation
Thearas
commented
Aug 20, 2025
Contributor
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
yujun777
commented
Aug 20, 2025
ContributorAuthor
run buildall |
Comment on lines
+105
to
+124
| @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; | ||
| } | ||
| UnboundOneRowRelation other = (UnboundOneRowRelation) o; | ||
| return projects.equals(other.projects); | ||
| } | ||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(super.hashCode(), projects); | ||
| } | ||
Contributor
There was a problem hiding this comment.
use relation id to distinguish one row relation is enough, so override equals and hashCode for UnboundOneRowRelation is not necessary
Comment on lines
+81
to
+100
| @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; | ||
| } | ||
| UnboundTVFRelation other = (UnboundTVFRelation) o; | ||
| return functionName.equals(other.functionName) && properties.equals(other.properties); | ||
| } | ||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(super.hashCode(), functionName, properties); | ||
| } | ||
Contributor
There was a problem hiding this comment.
same as UnboundOneRowRelation
yujun777
commented
Aug 20, 2025
ContributorAuthor
run buildall |
doris-robot
commented
Aug 20, 2025
TPC-H: Total hot run time: 33615 ms |
doris-robot
commented
Aug 20, 2025
TPC-DS: Total hot run time: 185253 ms |
doris-robot
commented
Aug 20, 2025
ClickBench: Total hot run time: 33.24 s |
hello-stephen
commented
Aug 20, 2025
Contributor
FE UT Coverage ReportIncrement line coverage |
morrySnow
approved these changes
Aug 21, 2025
Contributor
PR approved by at least one committer and no changes requested. |
Contributor
PR approved by anyone and no changes requested. |
englefly
approved these changes
Aug 21, 2025
Uh oh!
There was an error while loading. Please reload this page.
github-actionsBot
pushed a commit
that referenced
this pull request
Aug 21, 2025
### What problem does this PR solve? some unbound expressions not define equals and hash, add them. for example: unbound variable not define equals, then will have bug: ```mysql set @Mystart = 1; set @Myend = 100; select * from t where a between @Mystart and @Myend ``` because unbound variable not define equals, then the unbound variable `@mystart` and `@myend` will be equals(call Expression.equals), then logical plan build will generate a filter `a = @mystart`
github-actionsBot
pushed a commit
that referenced
this pull request
Aug 21, 2025
### What problem does this PR solve? some unbound expressions not define equals and hash, add them. for example: unbound variable not define equals, then will have bug: ```mysql set @Mystart = 1; set @Myend = 100; select * from t where a between @Mystart and @Myend ``` because unbound variable not define equals, then the unbound variable `@mystart` and `@myend` will be equals(call Expression.equals), then logical plan build will generate a filter `a = @mystart`
github-actionsBot
pushed a commit
that referenced
this pull request
Aug 21, 2025
### What problem does this PR solve? some unbound expressions not define equals and hash, add them. for example: unbound variable not define equals, then will have bug: ```mysql set @Mystart = 1; set @Myend = 100; select * from t where a between @Mystart and @Myend ``` because unbound variable not define equals, then the unbound variable `@mystart` and `@myend` will be equals(call Expression.equals), then logical plan build will generate a filter `a = @mystart`
yujun777 added a commit
to yujun777/doris
that referenced
this pull request
Aug 21, 2025
### What problem does this PR solve? some unbound expressions not define equals and hash, add them. for example: unbound variable not define equals, then will have bug: ```mysql set @Mystart = 1; set @Myend = 100; select * from t where a between @Mystart and @Myend ``` because unbound variable not define equals, then the unbound variable `@mystart` and `@myend` will be equals(call Expression.equals), then logical plan build will generate a filter `a = @mystart`
yujun777 added a commit
to yujun777/doris
that referenced
this pull request
Aug 21, 2025
### What problem does this PR solve? some unbound expressions not define equals and hash, add them. for example: unbound variable not define equals, then will have bug: ```mysql set @Mystart = 1; set @Myend = 100; select * from t where a between @Mystart and @Myend ``` because unbound variable not define equals, then the unbound variable `@mystart` and `@myend` will be equals(call Expression.equals), then logical plan build will generate a filter `a = @mystart`
yujun777 added a commit
to yujun777/doris
that referenced
this pull request
Aug 21, 2025
### What problem does this PR solve? some unbound expressions not define equals and hash, add them. for example: unbound variable not define equals, then will have bug: ```mysql set @Mystart = 1; set @Myend = 100; select * from t where a between @Mystart and @Myend ``` because unbound variable not define equals, then the unbound variable `@mystart` and `@myend` will be equals(call Expression.equals), then logical plan build will generate a filter `a = @mystart`
morrySnow pushed a commit
that referenced
this pull request
Aug 24, 2025
yiguolei pushed a commit
that referenced
this pull request
Aug 27, 2025
Hastyshell pushed a commit
to Hastyshell/doris
that referenced
this pull request
Nov 12, 2025
… expressions apache#55060 (apache#4813) ## Proposed changes cherry-pick: apache#55060
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
some unbound expressions not define equals and hash, add them.
for example: unbound variable not define equals, then will have bug:
because unbound variable not define equals, then the unbound variable
@mystartand@myendwill be equals(call Expression.equals), then logical plan build will generate a filtera = @mystartCheck List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)