-
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
sql: add square and cube root unary operators (|/ and ||/) #47680
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. 🦉 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.
CC @yuzefovich if you want to take a quick look as well
Reviewable status: complete! 1 of 0 LGTMs obtained
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.
Very nice work! if edge cases (NULLs and NaNs) are handled correctly.
Reviewed 13 of 13 files at r1.
Reviewable status: complete! 2 of 0 LGTMs obtained (waiting on @hueypark)
pkg/sql/logictest/testdata/logic_test/operator, line 7 at r1 (raw file):
query error cannot take square root of a negative number SELECT |/ -1.0::float
I'd be curious to see test cases with NULL
s and NaN
s (not sure if those are applicable here though).
nit: I think this test belongs in sem/tree/eval
folder.
2fcc5ea
to
15c5394
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.
TFTR!
Reviewable status: complete! 0 of 0 LGTMs obtained (and 2 stale) (waiting on @yuzefovich)
pkg/sql/logictest/testdata/logic_test/operator, line 7 at r1 (raw file):
Previously, yuzefovich wrote…
I'd be curious to see test cases with
NULL
s andNaN
s (not sure if those are applicable here though).nit: I think this test belongs in
sem/tree/eval
folder.
Done.
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 your contribution!
bors r=raduberinde,yuzefovich
Reviewed 2 of 2 files at r2.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 2 stale)
Build failed (retrying...) |
Build failed (retrying...) |
Build failed (retrying...) |
Build failed |
Hey @hueypark, do you mind rebasing your PR on top of the current master? We have a fix for some infrastructure problems in there that we need to pick up before merging this. |
Fixes cockroachdb#47544 Release note (sql change): add square and cube root unary operators (|/ and ||/)
15c5394
to
96193f1
Compare
@yuzefovich Done! |
❌ The GitHub CI (Cockroach) build has failed on 96193f1a. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
Thanks! The build failure seems like a flake to me. bors r=raduberinde,yuzefovich |
Build succeeded |
Fixes #47544
Release note (sql change): add square and cube root unary operators (|/ and ||/)