Skip to content

Multiply operation not handling nulls properly #24

@buzzluck68

Description

@buzzluck68

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions