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

INT128 cast to unsigned int gives wrong value #2270

Closed
AEsir777 opened this issue Oct 25, 2023 · 2 comments · Fixed by #2314
Closed

INT128 cast to unsigned int gives wrong value #2270

AEsir777 opened this issue Oct 25, 2023 · 2 comments · Fixed by #2314
Assignees
Labels
bug Something isn't working

Comments

@AEsir777
Copy link
Contributor

RETURN TO_UINT8(TO_INT128(-1));
[2023-10-25 16:05:51.416] [error] PLAN0 NOT PASSED.
[2023-10-25 16:05:51.416] [info] PLAN:
PROJECTION[TO_UINT8(TO_INT128(NEGATE(1)))]
DUMMY_SCAN[]
[2023-10-25 16:05:51.416] [info] RESULT:

[2023-10-25 16:05:51.416] [info] 255

@ray6080 ray6080 added the bug Something isn't working label Oct 26, 2023
@AEsir777
Copy link
Contributor Author

AEsir777 commented Oct 26, 2023

Follow up:
cast negative string to int128
-170141183460469231731687303715884105728 to int128 are both causing error

@Ashleyhx
Copy link
Contributor

Ashleyhx commented Oct 31, 2023

-170141183460469231731687303715884105728 is not within int128's range (-170141183460469231731687303715884105727 to 170141183460469231731687303715884105727). reference here

so this should be the correct return?

[info] QUERY: RETURN TO_INT128("-170141183460469231731687303715884105728");
[2023-10-31 13:14:49.053] [error] Conversion exception: Cast failed. -170141183460469231731687303715884105728 is not within INT128 range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants