]
Ramesh Reddy resolved TEIID-5088.
---------------------------------
Resolution: Done
When a Type is not natively supported by the Infinispan, then those types are artificially
defined using other types, but the transformation to/from the native type is handled at
the translator level. These types now will be annotated as NOT searchable, i.e. any
comparisons on these types will be evaluated in Teiid engine rather than pushed to the
source. So, some queries may perform very poorly because in this situation more data is
brought into the Teiid than otherwise.
For the user, it is best to keep the datatypes in the Infinispan to natively supported
ones.
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
Fix For: 10.0, 8.12.x-6.4
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.