-
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/pgwire: change formatting of floating point infinity values #64760
Conversation
Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR. Before a member of our team reviews your PR, I have some potential action items for you:
I have added a few people who may be able to assist in reviewing: 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
@rafiss I ran the test cases but for some reason, they were not hitting |
@iAziz786 sorry for misdirecting you! it looks like the change to instead, this change needs to be done in pkg/sql/pgwire/types.go |
e33be7e
to
12b9281
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. |
12b9281
to
c649275
Compare
That's interesting -- it looks like it's because the CLI has extra parse/format logic so that it displays the value as a golang infinity. if you connect with the this likely also explains why our other SQL tests are not affected by your change. yes, please make this ready to review. before that, you will need to update the commit message (and PR message) to have a proper release note. See https://wiki.crdb.io/wiki/spaces/CRDB/pages/186548364/Release+notes also, the title of the commit message should be adjusted. cockroachdb already supports infinity values -- this is just changing the formatting. see https://wiki.crdb.io/wiki/spaces/CRDB/pages/73072807/Git+Commit+Messages so a full commit message could be:
Thanks for your work here! This is almost ready to go. |
Postgres drivers such as JDBC rely on infinite values to be formatted as full words in order to be able to parse the value. Release note (sql change): Floating point infinity values are now formatted as `Infinity` (or `-Infinity` if negative). This is for compatibility with Postgres
c649275
to
a4a8e23
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.
thank you for your contribution!
bors r+
Build succeeded: |
Fixes #62601
Postgres drivers such as JDBC rely on infinite values to be
formatted as full words in order to be able to parse the
value.
Release note (sql change): Floating point infinity values are now
formatted as
Infinity
(or-Infinity
if negative). This is forcompatibility with Postgres.