-
Notifications
You must be signed in to change notification settings - Fork 3.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
builtins: fix incorrect sqrdiff evaluation due to reuse of the results from previous iterations when used as a window function #55957
Conversation
Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. I was unable to automatically find a reviewer. You can try CCing one of the following members:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
Thank you for updating your pull request. Before a member of our team reviews your PR, I have some potential action items for you:
I was unable to automatically find a reviewer. You can try CCing one of the following members:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
8be3cec
to
afc91f7
Compare
Thank you for updating your pull request. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. I was unable to automatically find a reviewer. You can try CCing one of the following members:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
@yuzefovich could you please take a look? |
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.
Thanks for finding the bug and fixing it! I only have some nits, but it
Re: ordering: yeah, ORDER BY
within OVER()
clause doesn't guarantee the ordering of the results, we need to have a query level ORDER BY
clause for that.
nit: it'd be nice to include a short description of the bug into the commit message, and we also should add a release note (it'll be something like Release note (bug fix): CockroachDB previously could incorrectly evaluate sqrdiff function when used as a window function in some cases, and now it is fixed.
).
Reviewed 3 of 3 files at r1.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @mneverov)
pkg/sql/logictest/testdata/logic_test/aggregate, line 2862 at r1 (raw file):
0.522232967867094 3 # Regression test for window aggregate functions for decimals reuse the results
nit: this test should go into window
logic test file.
nit: I'd slightly reword the comment to be a bit more specific - Regression test for window aggregate functions not making a deep copy of decimals on each iteration (#55944).
afc91f7
to
f6eefbe
Compare
Thank you for updating your pull request. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @yuzefovich)
pkg/sql/logictest/testdata/logic_test/aggregate, line 2862 at r1 (raw file):
Previously, yuzefovich wrote…
nit: this test should go into
window
logic test file.nit: I'd slightly reword the comment to be a bit more specific -
Regression test for window aggregate functions not making a deep copy of decimals on each iteration (#55944).
moved to window
, replaced the comment, thanks!
@yuzefovich thanks for the review. |
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.
Thanks, one last nit.
Reviewed 2 of 2 files at r2.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @mneverov)
pkg/sql/logictest/testdata/logic_test/window, line 3866 at r2 (raw file):
{"1": "1", "2": "2", "3": "3", "4": "4", "5": "5"} Regression test for window aggregate functions not making a deep copy of decimals on each iteration (#55944)
nit: missing #
in the beginning and a period in the end.
…s from previous iterations when used as a window function fixes cockroachdb#55944 Release note (bug fix): CockroachDB previously could incorrectly evaluate sqrdiff function when used as a window function in some cases, and now it is fixed.
f6eefbe
to
4bf1804
Compare
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @yuzefovich)
pkg/sql/logictest/testdata/logic_test/window, line 3866 at r2 (raw file):
Previously, yuzefovich wrote…
nit: missing
#
in the beginning and a period in the end.
fixed thx
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.
Thanks!
bors r=yuzefovich
Reviewed 1 of 1 files at r3.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale)
Build succeeded: |
builtins: fix incorrect sqrdiff evaluation due to reuse of the results from previous iterations when used as a window function
fixes #55944
Release note (bug fix): CockroachDB previously could incorrectly evaluate sqrdiff function when used as a window function in some cases, and now it is fixed.