[JBoss JIRA] (TEIID-5088) Infinispan Hotrod bigdecimal/biginteger compared as strings
by Jan Stastny (JIRA)
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)
7 years, 2 months
[JBoss JIRA] (TEIID-5087) Infinispan Hotrod error for date/time/timestamp literal in where criteria
by Jan Stastny (JIRA)
Jan Stastny created TEIID-5087:
----------------------------------
Summary: Infinispan Hotrod error for date/time/timestamp literal in where criteria
Key: TEIID-5087
URL: https://issues.jboss.org/browse/TEIID-5087
Project: Teiid
Issue Type: Bug
Components: JDG Connector, Misc. Connectors
Affects Versions: 8.12.x-6.4
Reporter: Jan Stastny
Assignee: Ramesh Reddy
Priority: Critical
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 fails:
{code:sql}
SELECT TimeValue FROM CRUD.SmallA WHERE TimeValue = {t '02:52:21'}
{code}
and the same applies to date/timestamp alternatives.
{code:title=error}
16:58:10,318 WARN [org.infinispan.client.hotrod.impl.protocol.Codec21] (Worker3_QueryProcessorQueue21) ISPN004005: Error received from the server: org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.TimeValue FROM Source.SmallA g_0 WHERE g_0.TimeValue = {t '02:52:21'} ; Parser error messages: [[statement, selectStatement, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression, relationalExpression, additiveExpression]: line 1:66 state 0 (decision=42) no viable alt; token=[@22,66:66='{',<74>,1:66], [statement]: line 1:67 mismatched token: [@23,67:67='t',<59>,1:67]; expecting type EOF].
16:58:10,319 ERROR [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue21) Connector worker process failed for atomic-request=7H/tbl4yNCGQ.7.0.36: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=97 returned server error (status=0x85): org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.TimeValue FROM Source.SmallA g_0 WHERE g_0.TimeValue = {t '02:52:21'} ; Parser error messages: [[statement, selectStatement, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression, relationalExpression, additiveExpression]: line 1:66 state 0 (decision=42) no viable alt; token=[@22,66:66='{',<74>,1:66], [statement]: line 1:67 mismatched token: [@23,67:67='t',<59>,1:67]; expecting type EOF].
at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:363) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:152) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:138) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:60) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:68) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:30) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:57) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
at org.infinispan.client.hotrod.impl.query.RemoteQuery.executeQuery(RemoteQuery.java:68) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
at org.infinispan.client.hotrod.impl.query.RemoteQuery.list(RemoteQuery.java:53) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
at org.teiid.translator.infinispan.hotrod.InfinispanResponse.fetchNextBatch(InfinispanResponse.java:76) [translator-infinispan-hotrod-8.12.11.6_4.jar:8.12.11.6_4]
at org.teiid.translator.infinispan.hotrod.InfinispanResponse.getNextRow(InfinispanResponse.java:92) [translator-infinispan-hotrod-8.12.11.6_4.jar:8.12.11.6_4]
at org.teiid.translator.infinispan.hotrod.InfinispanQueryExecution.next(InfinispanQueryExecution.java:138) [translator-infinispan-hotrod-8.12.11.6_4.jar:8.12.11.6_4]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:433) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:236) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source) [:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at com.sun.proxy.$Proxy79.more(Unknown Source)
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:309) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_121]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
16:58:10,322 WARN [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue22) TEIID30020 Processing exception for request 7H/tbl4yNCGQ.7 'TEIID30504 jdg7-source: org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.TimeValue FROM Source.SmallA g_0 WHERE g_0.TimeValue = {t '02:52:21'} ; Parser error messages: [[statement, selectStatement, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression, relationalExpression, additiveExpression]: line 1:66 state 0 (decision=42) no viable alt; token=[@22,66:66='{',<74>,1:66], [statement]: line 1:67 mismatched token: [@23,67:67='t',<59>,1:67]; expecting type EOF].'. Originally TeiidProcessingException Codec20.java:363. Enable more detailed logging to see the entire stacktrace.
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 2 months
[JBoss JIRA] (TEIID-4208) Increase plan parallelism
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4208?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4208:
---------------------------------------
Taking another look at this we have:
1. Algorithmic parallelism - namely parallelSort in the sortutility. This has no effect for small row counts < 8k - which can also occur in memory constrained situations. It also has a significant performance degradation the more the input is in reverse order. But it is straight-forward to include. We could consider a hint or a system flag to disable if needed.
2. Targeted multi-threading / blocking - adding blocking tasks to SortUtility and/or temp/system tuplesources (similar to datatiertuplesource). This allows those to proceed while other plan work in the event of a union/join continues. However just as before what I see is of limited benefit performance-wise and introduces performance degradation with increased client load - even just 2 concurrent user queries. It looks like this should only be introduced in parallel plans and only for large temp table access or window function project nodes (both of which have non-blocking sortutility usage).
3. Increased parallelism at branching points, such as unions and non-dependent joins. This actually results in real performance gains, but as mentioned before requires more thread safety for things like the CommandContext.
I have the changes for #1 ready and will focus on #3 at least for unions.
> Increase plan parallelism
> -------------------------
>
> Key: TEIID-4208
> URL: https://issues.jboss.org/browse/TEIID-4208
> Project: Teiid
> Issue Type: Sub-task
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.0
>
>
> Increased parallelism within the plan, which includes parallelization of source queries via partitioning beyond multi-source and parallelizing the execution of union branches.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 2 months