Skip to content
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

Error message is misleading when interval is too big #62369

Closed
mneverov opened this issue Mar 22, 2021 · 2 comments · Fixed by #65377
Closed

Error message is misleading when interval is too big #62369

mneverov opened this issue Mar 22, 2021 · 2 comments · Fixed by #65377
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. E-easy Easy issue to tackle, requires little or no CockroachDB experience good first issue O-community Originated from the community T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@mneverov
Copy link
Contributor

To reproduce execute the following query:

select interval '10000000000000000000000000000000000 year';
invalid syntax: statement ignored: at or near "EOF": syntax error: could not parse "10000000000000000000000000000000000 year" as type interval: interval: missing unit at position 35: "10000000000000000000000000000000000 year"
SQLSTATE: 22007
DETAIL: source SQL:
select interval '10000000000000000000000000000000000 year'
                                                          ^

The same query in PG:

postgres=# select interval '10000000000000000000000000000000000 year -1 hour';
ERROR:  interval field value out of range: "10000000000000000000000000000000000 year -1 hour"
LINE 1: select interval '10000000000000000000000000000000000 year -1...
                        ^

Build CRDB from master branch commit fc2f2c3.

@mneverov mneverov added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Mar 22, 2021
@blathers-crl
Copy link

blathers-crl bot commented Mar 22, 2021

Hello, I am Blathers. I am here to help you get the issue triaged.

It looks like you have not filled out the issue in the format of any of our templates. To best assist you, we advise you to use one of these templates.

I was unable to automatically find someone to ping.

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@blathers-crl blathers-crl bot added O-community Originated from the community X-blathers-untriaged blathers was unable to find an owner labels Mar 22, 2021
@rafiss rafiss removed the X-blathers-untriaged blathers was unable to find an owner label Mar 22, 2021
@rafiss
Copy link
Collaborator

rafiss commented Mar 22, 2021

Thanks for the bug report @mneverov !

@rafiss rafiss added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label May 12, 2021
@rafiss rafiss added E-easy Easy issue to tackle, requires little or no CockroachDB experience good first issue labels May 18, 2021
@craig craig bot closed this as completed in b4da7ff May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. E-easy Easy issue to tackle, requires little or no CockroachDB experience good first issue O-community Originated from the community T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants