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

"cast to int" now rounds half to even #40

Merged
merged 4 commits into from
Oct 21, 2022
Merged

Conversation

lziq
Copy link
Contributor

@lziq lziq commented Oct 21, 2022

Change the behavior of "casting a number to int" to round half to even. Related issue: partiql/partiql-lang-kotlin#783

@lziq lziq requested a review from alancai98 October 21, 2022 19:36
Copy link
Member

@alancai98 alancai98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the correction. Think these modified tests should be moved to the partiql-tests-data-extended until #39 is resolved.

@@ -310,7 +310,7 @@ basic::[
output:$bag::[
0,
1,
1,
2,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this test and the tests adjusted in cast.ion to partiql-tests-data-extended? As part of #39, we'll define the numeric modeling semantics (including rounding behavior) in the conformance tests.

@lziq lziq merged commit 966c877 into main Oct 21, 2022
@lziq lziq deleted the cast-to-int-rounds-half-to-even branch October 21, 2022 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants