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

Multiply operation not handling nulls properly #24

Open
buzzluck68 opened this issue Apr 9, 2021 · 0 comments
Open

Multiply operation not handling nulls properly #24

buzzluck68 opened this issue Apr 9, 2021 · 0 comments

Comments

@buzzluck68
Copy link

buzzluck68 commented Apr 9, 2021

When doing the following operation {"*":[25,null]}, it will return 125 when it should be null. Looking at the code, the problem is within the AddOperator, the defaultValue being passed to ReduceDoubleArgs is a 1, instead of 0. It can be fixed by either using 0 as the defaultValue, or accepting nullable doubles in the Func reducer.
Also, the divide and modular operations could have the same issue since they also default the value to 1.

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

No branches or pull requests

1 participant