[teiid-issues] [JBoss JIRA] (TEIID-5088) Infinispan Hotrod bigdecimal/biginteger compared as strings

Jan Stastny (JIRA) issues at jboss.org
Wed Oct 4 11:19:01 EDT 2017


Jan Stastny created TEIID-5088:
----------------------------------

             Summary: Infinispan Hotrod bigdecimal/biginteger compared as strings
                 Key: TEIID-5088
                 URL: https://issues.jboss.org/browse/TEIID-5088
             Project: Teiid
          Issue Type: Bug
          Components: JDG Connector, Misc. Connectors
    Affects Versions: 8.12.x-6.4
            Reporter: Jan Stastny
            Assignee: Ramesh Reddy


Biginteger and bigdecimal data types are being compared as strings, instead of numbers.

For a vdb with following source DDL metadata:
{code:sql|title="Source"}
             CREATE FOREIGN TABLE SmallA (
               IntKey integer,
               IntNum integer,
               DoubleNum double,
               ObjectValue object,
               BigDecimalValue bigdecimal,
               BigIntegerValue biginteger,
               CharValue char,
               StringNum string,
               StringKey string PRIMARY KEY,
               FloatNum float,
               LongNum long,
               TimeValue time,
               ShortValue short,
               ByteNum byte,
               TimeStampValue timestamp,
               BooleanValue boolean,
               DateValue date
             ) OPTIONS(UPDATABLE true, "teiid_ispn:cache" '${jdg.cache.name}');
{code}
and a view:
{code:sql|title="CRUD"}
CREATE VIEW SmallA(
               IntKey integer,
               IntNum integer,
               DoubleNum double,
               ObjectValue object,
               BigDecimalValue bigdecimal,
               BigIntegerValue biginteger,
               CharValue char,
               StringNum string,
               StringKey string PRIMARY KEY,
               FloatNum float,
               LongNum long,
               TimeValue time,
               ShortValue short,
               ByteNum byte,
               TimestampValue timestamp,
               BooleanValue boolean,
               DateValue date
            ) OPTIONS (UPDATABLE true) AS
            SELECT
               source.IntKey AS IntKey,
               source.IntNum as IntNum,
               source.DoubleNum AS DoubleNum,
               source.ObjectValue AS ObjectValue,
               source.BigDecimalValue AS BigDecimalValue,
               source.BigIntegerValue AS BigIntegerValue,
               source.CharValue AS CharValue,
               source.StringNum AS StringNum,
               source.StringKey AS StringKey,
               source.FloatNum AS FloatNum,
               source.LongNum AS LongNum,
               source.TimeValue AS TimeValue,
               source.ShortValue AS ShortValue,
               source.ByteNum AS ByteNum,
               source.TimeStampValue AS TimestampValue,
               source.BooleanValue AS BooleanValue,
               source.DateValue AS DateValue
            FROM Source.SmallA as source;
{code}

Following query:
{code}
SELECT BigIntegerValue FROM SmallA WHERE BigIntegerValue<4
{code}

returns 
|| BigIntegerValue ||
| 1,418,509 |
| 2,993,990 |
| 39,127 |
| 132,878,502 |
| 18,235,051 |
| 27,147,783 |
| 250,391,377 |
| 278,593 |
| 1,110,985,332 |
| 262,593,097 |
| 19 |
| 26,203,918 |
| 21,559,352 |
| 18,812 |

same issue applies to bigdecimal.




--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the teiid-issues mailing list