Closed brainesy closed 1 month ago
This was a bug because the FunctionUtils used to checkArgument against the signature didn't allow for function calls to match... I've added this check. The min/max functions were not checking arguments so I've added that to those functions.
I just pushed version 2.5.0 to Maven Central. It should be there in an hour or so (10:02am EDT). If you agree this problem was fixed, please close this issue. Thanks.
Thanks for your time in resolving this. I can confirm the issue is resolved in v2.5.0.
When passing an expression to the $sum function, the error "Argument 1 of function "$sum" must be an array of "number" is returned. This also occurs for the $average function, but works fine when using the $min and $max functions.
Example using jsonata4java version 2.4.9
Expected result:
3
Actual result:Error: Argument 1 of function "$sum" must be an array of "number
Result using Javascript version 2.0.5:3
Other examples using jsonata4java version 2.4.9
Other examples using javascript version 2.0.5