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

Integer hex-literal support for INT128 #6809

Closed
mrotteveel opened this issue May 13, 2021 · 5 comments
Closed

Integer hex-literal support for INT128 #6809

mrotteveel opened this issue May 13, 2021 · 5 comments

Comments

@mrotteveel
Copy link
Member

Currently, the integer hex-literal does not support INT128. Values with more than 8 hex pairs result in a INTEGER with value 0.

Expected behaviour:

  • Literals of 1-4 hex-pairs -> INTEGER
  • literals of 5-8 hex-pairs -> BIGINT
  • literals of 9-16 hex-pairs -> INT128
  • literals of length > 16 hex-pairs should produce an error
@AlexPeshkoff
Copy link
Member

I wonder - should this improvement go to v4.0? On my mind this can wait first service release.

@dyemanov
Copy link
Member

@AlexPeshkoff, I agree.

@mrotteveel
Copy link
Member Author

I agree as well.

@dyemanov
Copy link
Member

dyemanov commented Sep 8, 2023

Expected behaviour:

literals of length > 16 hex-pairs should produce an error

Testing with current v5 snapshot:

SQL> select 0x8000000000000000000000000000000000000000 from RDB$DATABASE;

X8000000000000000000000000000000000000000 
========================================= 
                                        0 

I definitely agree that an error should be raised, but currently it's missing.

@mrotteveel
Copy link
Member Author

@dyemanov That problem is tracked as #7594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants