Bug 1254053 - Incorrect results when querying a string type attribute when using the 'LTE' operator
Incorrect results when querying a string type attribute when using the 'LTE' ...
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ER2
: 6.6.0
Assigned To: Adrian Nistor
Martin Gencur
Depends On:
Blocks: 1242999 1253660
  Show dependency treegraph
Reported: 2015-08-16 23:54 EDT by Van Halbert
Modified: 2015-11-19 11:43 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker ISPN-5923 Major Resolved Wrong results when applying the <= operator to a string attribute having a null token defined 2017-03-29 13:58 EDT
JBoss Issue Tracker TEIID-3627 Major Closed Infinispan-dsl-cache translator: comparison operators(GE,LE) problem with string 2017-03-29 13:58 EDT

  None (edit)
Comment 2 Van Halbert 2015-08-17 10:57:05 EDT
This is using the hot rod client.
Comment 3 JBoss JIRA Server 2015-08-18 08:56:48 EDT
Steven Hawkins <shawkins@redhat.com> updated the status of jira TEIID-3627 to Resolved
Comment 4 Adrian Nistor 2015-08-18 08:58:22 EDT
This cannot work if the types of the two operands are mismatched.

The correct behaviour would be to signal an error instead of failing silently.
Comment 5 Van Halbert 2015-08-18 09:08:41 EDT
I think the argument=-22 in incorrectly displayed thru debug.

The query being processed is:

SELECT g_0.stringNum FROM SmallAs.smallARemotecache AS g_0 WHERE g_0.stringNum <= '-22'

The column stringNum is of type String and the string literal of '-22' is what is being set for value:

return queryBuilder.having(columnName).lte(value);

So I think the types being compared are similar types.
Comment 7 JBoss JIRA Server 2015-10-11 15:18:37 EDT
Steven Hawkins <shawkins@redhat.com> updated the status of jira TEIID-3627 to Closed
Comment 9 Adrian Nistor 2015-10-30 08:32:43 EDT
Hi Van,

So the two operands have the same type, string. In that case please note the comparison '-55' <= '-22' is false. This is probably not what you would expect.
How does your data look like? Does it really match the comparison?

Comment 17 JBoss JIRA Server 2015-11-05 09:52:43 EST
Adrian Nistor <anistor@redhat.com> updated the status of jira ISPN-5923 to Coding In Progress
Comment 18 Sanne Grinovero 2015-11-05 13:11:46 EST
Patch was merged.

Note You need to log in before you can comment on or make changes to this bug.