-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
util,executor: use MutableString as key for DecimalSet #9913
Conversation
|
Codecov Report
@@ Coverage Diff @@
## master #9913 +/- ##
================================================
+ Coverage 77.5399% 77.5447% +0.0047%
================================================
Files 404 403 -1
Lines 81772 81678 -94
================================================
- Hits 63406 63337 -69
+ Misses 13666 13642 -24
+ Partials 4700 4699 -1 |
/run-all-tests tidb-test=pr/582 |
1 similar comment
/run-all-tests tidb-test=pr/582 |
/run-all-tests tidb-test=pr/582 |
@@ -38,7 +39,7 @@ type partialResult4SumDistinctFloat64 struct { | |||
|
|||
type partialResult4SumDistinctDecimal struct { | |||
partialResult4SumDecimal | |||
valSet set.DecimalSet |
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.
How about keep DecimalSet
and use MyDecimal.ToHashKey
to make DecimalSet.Exist
correct.
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.
If we keep DecimalSet here, we'll call ToHashKey twice if DecimalSet.Exist()
returns false. One in DecimalSet.Exist()
, another in DecimalSet.Insert()
. @qw4990
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.
Maybe we can add one method like InsertIfNotExists
and return whether it's a value to be inserted.
One question is that, is the behavior of the current DecimalSet
right?
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.
One question is that, is the behavior of the current DecimalSet right?
Do you find anything wrong? @winoros
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.
No, since the DecimalSet
only be in used in the places you changed in this pr.
I just wonder that whether there'll be some cases in the future that will need the original DecimalSet
.
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.
DecimalSet will not be used by other places now. It was introduced when we were refactoring the agg. @winoros
/run-all-tests |
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.
LGTM
PTAL @winoros |
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.
LGTM
@XuHuaiyu please cherry pick this PR to release-2.1 |
What problem does this PR solve?
fix #9900 (comment)
What is changed and how it works?
Using MutableString as key for DecimalSet.
The root reason is the same as #9901.
Check List
Tests
Code changes
Side effects
I've tested it using tpch 10G dataset.
Related changes