-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
executor: refine the precision for avg #7860
Conversation
1f25028
to
b424203
Compare
/run-all-tests tidb-test=pr/634 |
/run-common-test tidb-test=pr/634 |
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
/run-all-tests tidb-test=pr/634 |
BTW, do we need to change |
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
@winoros |
What problem does this PR solve?
This commit ports the old logic for handling decimal avg result .
What is changed and how it works?
finalResult.RetTp.Decimal
to the result of type inferring whenappendFinalResult2Chunk
foravg
.finalResult.RetTp.Decimal
to 0 when the input argument is integer type forsum
.Check List
https://github.com/pingcap/tidb-test/pull/634
Code changes
Side effects
N/A
Related changes