https://bz.apache.org/bugzilla/show_bug.cgi?id=60848

Greg Woolsey <gwool...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.15-FINAL                  |3.16-dev

--- Comment #5 from Greg Woolsey <gwool...@apache.org> ---
Thanks for the simple test case.  This is deeper than just the SUMPRODUCT()
function.  By the time it gets to evaluating the function, the argument has
already evaluated to an error.

The problem is that the "Unary Minus" operator, "-", doesn't properly handle an
array argument.  This is actually a problem with the underlying utility class
OperandResolver, which needs to return an array instead of a single value when
the input is an array for cases like this, but perhaps not for some other
functions.

This will require some digging to fully define.  To start with, the unary
functions should at least call a new operand static method that can return an
array of values.  UnaryPlusEval has the same bug as UnaryMinusEval, although
the plus and minus evaluation logic is slightly different according to the
comments in the code.

It will take someone digging through the Excel function specs to see what other
functions can silently operate on an array and return an array for use by array
functions like SUMPRODUCT, and testing/checking the POI handling of each.

Patches are always welcome.  If one of my users indicates we need this it will
end up in my queue, but otherwise it's a bit too big for me to tackle at the
moment.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to