Bug 1254053 - Incorrect results when querying a string type attribute when using the 'LTE' operator
Summary: Incorrect results when querying a string type attribute when using the 'LTE' ...
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.4.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER2
: 6.6.0
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks: 1242999 1253660
TreeView+ depends on / blocked
 
Reported: 2015-08-17 03:54 UTC by Van Halbert
Modified: 2023-09-30 08:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-5923 0 Major Resolved Wrong results when applying the <= operator to a string attribute having a null token defined 2017-03-29 17:58:20 UTC
Red Hat Issue Tracker TEIID-3627 0 Major Closed Infinispan-dsl-cache translator: comparison operators(GE,LE) problem with string 2017-03-29 17:58:20 UTC

Comment 2 Van Halbert 2015-08-17 14:57:05 UTC
This is using the hot rod client.

Comment 3 JBoss JIRA Server 2015-08-18 12:56:48 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3627 to Resolved

Comment 4 Adrian Nistor 2015-08-18 12:58:22 UTC
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 13:08:41 UTC
I think the argument=-22 in incorrectly displayed thru debug.

The query being processed is:

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

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

{code}
return queryBuilder.having(columnName).lte(value);
{code}

So I think the types being compared are similar types.

Comment 7 JBoss JIRA Server 2015-10-11 19:18:37 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3627 to Closed

Comment 9 Adrian Nistor 2015-10-30 12:32:43 UTC
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?

Adrian

Comment 17 JBoss JIRA Server 2015-11-05 14:52:43 UTC
Adrian Nistor <anistor> updated the status of jira ISPN-5923 to Coding In Progress

Comment 18 Sanne Grinovero 2015-11-05 18:11:46 UTC
Patch was merged.


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