You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/08/04 20:34:28 UTC

DO NOT REPLY [Bug 45508] HSSFFormulaEvaluator does not short-circuit clause evaluation in IFs

https://issues.apache.org/bugzilla/show_bug.cgi?id=45508


Josh Micich <jo...@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Josh Micich <jo...@gildedtree.com>  2008-08-04 11:34:28 PST ---
This was probably fixed with the patch for bug 45289 (svn r675853).

You are right about POI doing 'eager' evaluation of function arguments.  This
is a systemic design flaw that causes both performance issues and some logical
difficulties.  These are typically related to dynamic area references like
OFFSET and INDIRECT (see documentation in the interface FreeRefFunction for
more details).  In future, the POI evaluator will probably be modified to
perform all argument evaluation as encountered, but that change will be big. 
The current evaluation model should be able to handle (Excel standard) errors
in evaluated arguments and still produce results consistent with what Excel
would do.

The problem encountered here was actually at line 338 of Offset.java@629821. 
Somehow the expression "A2-1" had evaluated to an Excel error (which is OK). 
Hoever, that Excel error should never have become a RuntimeException.  It looks
like this bug got fixed in r675853.  Under normal execution, Excel errors may
propagate up through the evaluation stack, possibly being ignored depending on
conditions higher up the execution tree.

If you still get a chance to add a spreadsheet with this problem, it would help
us augment the unit tests to make sure we have this one covered.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org