Fix sum() function to return zero instead of NULL when no values are summed
@@ -79,7 +79,7 @@ public class OSQLFunctionSum extends OSQLFunctionMathAbstract {
@Override
public Object getResult() {
- return sum;
+ return sum == null ? 0 : sum;
}
@Override
