-
Notifications
You must be signed in to change notification settings - Fork 609
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
The result types in sumOfPrimitiveProcedure.stg need to be widened to prevent overflow #1453
Comments
Hi, I would like to take up this issue. Could you assign it to me? Thank you! |
Thanks for volunteering @rzrobin213 ! I have assigned the issue to you. |
@donraab File |
Hi! Could you assign this issue to me, since rzrobin123 do not seem to be working on this. |
hello!! I have made a pull request regarding this issue..please review it. |
I discovered there is an overflow error using
sumOfInt
in the following code when the batch size exceeded 536This code returned the correct sum:
This code returned the incorrect sum:
I tracked the problem down to
SumOfIntProcedure
returningint
instead oflong
for the result. This Procedure must be used in the individual batches and if a batch gets large enough with large values being summed, overflow is occurring.https://github.com/eclipse/eclipse-collections/blob/master/eclipse-collections-code-generator/src/main/resources/impl/block/procedure/sumOfPrimitiveProcedure.stg#L33
The text was updated successfully, but these errors were encountered: