Bug 46647 - COUNTIF function evaluates "<>" operator incorrectly
COUNTIF function evaluates "<>" operator incorrectly
Product: POI
Classification: Unclassified
Component: HSSF
PC Windows XP
: P4 critical (vote)
: ---
Assigned To: POI Developers List
Depends on:
  Show dependency tree
Reported: 2009-02-02 11:39 UTC by Josh Micich
Modified: 2009-02-02 12:19 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Josh Micich 2009-02-02 11:39:29 UTC
Should have "case NE: return cmpResult != 0;" on line 131:

There are also problems with string to number conversion, for example:
'<>123' should always match string values, even '123' (the only thing it doesn't match is 123).
'>5' should never match any string value, even '6'

No string-to-number conversion is ever required for operators besides '=' and '' (no operator, very similar to '=')
Comment 1 Josh Micich 2009-02-02 12:19:02 UTC
Fixed in svn 740088

Junits added.

This bug was initiated due to the post 'About the evaluation of "countif"' from Miki Haruki (三木 春樹) on poi-user.

Thanks for the detailed problem description.