Jan Stastny created TEIID-5199:
----------------------------------
Summary: Infinispan hotrod translator correlated subquery with where criteria
issue
Key: TEIID-5199
URL:
https://issues.jboss.org/browse/TEIID-5199
Project: Teiid
Issue Type: Bug
Components: JDG Connector, Misc. Connectors
Affects Versions: 8.12.x-6.4
Reporter: Jan Stastny
Assignee: Steven Hawkins
Priority: Critical
There is an issue for particular correlated subquery:
{code:sql}
SELECT INTKEY, FLOATNUM FROM BQT1.SMALLA AS A WHERE FLOATNUM = (SELECT MIN(FLOATNUM) FROM
BQT1.SMALLA AS B WHERE (INTKEY >= 9) AND (A.INTKEY = B.INTKEY))
{code}
results in:
{code}
10:56:06,272 WARN [org.infinispan.client.hotrod.impl.protocol.Codec21]
(Worker3_QueryProcessorQueue211) ISPN004005: Error received from the server:
org.infinispan.objectfilter.ParsingException: ISPN028524: Left side argument must be a
property path
10:56:06,274 ERROR [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue211) Connector worker
process failed for atomic-request=R4LPSIZO3MG1.16.1.92:
org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=163
returned server error (status=0x85): org.infinispan.objectfilter.ParsingException:
ISPN028524: Left side argument must be a property path
at
org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:363)
[infinispan-client-hotrod.jar:8.4.1.Final-redhat-1]
at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:152)
[infinispan-client-hotrod.jar:8.4.1.Final-redhat-1]
at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:138)
[infinispan-client-hotrod.jar:8.4.1.Final-redhat-1]
at
org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:60)
[infinispan-client-hotrod.jar:8.4.1.Final-redhat-1]
at
org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:68)
[infinispan-client-hotrod.jar:8.4.1.Final-redhat-1]
at
org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:30)
[infinispan-client-hotrod.jar:8.4.1.Final-redhat-1]
at
org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:57)
[infinispan-client-hotrod.jar:8.4.1.Final-redhat-1]
at org.infinispan.client.hotrod.impl.query.RemoteQuery.executeQuery(RemoteQuery.java:68)
[infinispan-client-hotrod.jar:8.4.1.Final-redhat-1]
at org.infinispan.client.hotrod.impl.query.RemoteQuery.list(RemoteQuery.java:53)
[infinispan-client-hotrod.jar:8.4.1.Final-redhat-1]
at
org.teiid.translator.infinispan.hotrod.InfinispanResponse.fetchNextBatch(InfinispanResponse.java:76)
[translator-infinispan-hotrod-8.12.11.6_4-redhat-10.jar:8.12.11.6_4-redhat-10]
at
org.teiid.translator.infinispan.hotrod.InfinispanResponse.getNextRow(InfinispanResponse.java:99)
[translator-infinispan-hotrod-8.12.11.6_4-redhat-10.jar:8.12.11.6_4-redhat-10]
at
org.teiid.translator.infinispan.hotrod.InfinispanQueryExecution.next(InfinispanQueryExecution.java:142)
[translator-infinispan-hotrod-8.12.11.6_4-redhat-10.jar:8.12.11.6_4-redhat-10]
at
org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:431)
[teiid-engine-8.12.11.6_4-redhat-64-10.jar:8.12.11.6_4-redhat-64-10]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:234)
[teiid-engine-8.12.11.6_4-redhat-64-10.jar:8.12.11.6_4-redhat-64-10]
at sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source) [:1.8.0_151]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.8.0_151]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_151]
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
[teiid-engine-8.12.11.6_4-redhat-64-10.jar:8.12.11.6_4-redhat-64-10]
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-10.jar:8.12.11.6_4-redhat-64-10]
at
org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
[teiid-engine-8.12.11.6_4-redhat-64-10.jar:8.12.11.6_4-redhat-64-10]
at
org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
[teiid-engine-8.12.11.6_4-redhat-64-10.jar:8.12.11.6_4-redhat-64-10]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_151]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
[teiid-engine-8.12.11.6_4-redhat-64-10.jar:8.12.11.6_4-redhat-64-10]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284)
[teiid-engine-8.12.11.6_4-redhat-64-10.jar:8.12.11.6_4-redhat-64-10]
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
[teiid-engine-8.12.11.6_4-redhat-64-10.jar:8.12.11.6_4-redhat-64-10]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
[teiid-engine-8.12.11.6_4-redhat-64-10.jar:8.12.11.6_4-redhat-64-10]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[rt.jar:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[rt.jar:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_151]
10:56:06,286 WARN [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue212) TEIID30020
Processing exception for request R4LPSIZO3MG1.16 'TEIID30312 Unable to evaluate right
expression of source__1.floatNum = (SELECT MIN(B.FloatNum) FROM BQT1.SmallA AS B WHERE
(B.IntKey >= 9) AND (B.IntKey = A.IntKey))'. Originally
ExpressionEvaluationException 'org.infinispan.objectfilter.ParsingException:
ISPN028524: Left side argument must be a property path' Codec20.java:363. Enable more
detailed logging to see the entire stacktrace.
{code}
There is command log:
{code}
10:56:02,675 INFO [org.teiid.COMMAND_LOG] (New I/O worker #1) R4LPSIZO3MG1 START USER
COMMAND: startTime=2018-01-04
10:56:02.675 requestID=R4LPSIZO3MG1.16 txID=null sessionID=R4LPSIZO3MG1 applicationName=JDBC principal=user@teiid-security vdbName=jdg71 vdbVersion=1 sql=SELECT
INTKEY, FLOATNUM FROM BQT1.SMALLA AS A WHERE FLOATNUM = (SELECT MIN(FLOATNUM) FROM
BQT1.SMALLA AS B WHERE (INTKEY >= 9) AND (A.INTKEY = B.INTKEY))
10:56:02,684 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue193) R4LPSIZO3MG1
START DATA SRC COMMAND: startTime=2018-01-04
10:56:02.683 requestID=R4LPSIZO3MG1.16 sourceCommandID=7 executionID=83 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security sql=SELECT
g_0.floatNum, g_0.intKey FROM s_smallA.SmallA AS g_0
10:56:03,425 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue194) R4LPSIZO3MG1
END SRC COMMAND: endTime=2018-01-04
10:56:03.425 requestID=R4LPSIZO3MG1.16 sourceCommandID=7 executionID=83 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security finalRowCount=50 cpuTime(ns)=2289655
10:56:03,428 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue195) R4LPSIZO3MG1
START DATA SRC COMMAND: startTime=2018-01-04
10:56:03.428 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=84 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security sql=SELECT
MIN(g_0.floatNum) FROM s_smallA.SmallA AS g_0 WHERE g_0.intKey = 49
10:56:03,938 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue196) R4LPSIZO3MG1
END SRC COMMAND: endTime=2018-01-04
10:56:03.938 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=84 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security finalRowCount=1 cpuTime(ns)=2950052
10:56:03,941 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue197) R4LPSIZO3MG1
START DATA SRC COMMAND: startTime=2018-01-04
10:56:03.941 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=85 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security sql=SELECT
MIN(g_0.floatNum) FROM s_smallA.SmallA AS g_0 WHERE g_0.intKey = 48
10:56:04,213 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue198) R4LPSIZO3MG1
END SRC COMMAND: endTime=2018-01-04
10:56:04.213 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=85 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security finalRowCount=1 cpuTime(ns)=2580568
10:56:04,214 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue199) R4LPSIZO3MG1
START DATA SRC COMMAND: startTime=2018-01-04
10:56:04.214 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=86 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security sql=SELECT
MIN(g_0.floatNum) FROM s_smallA.SmallA AS g_0 WHERE g_0.intKey = 47
10:56:04,435 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue200) R4LPSIZO3MG1
END SRC COMMAND: endTime=2018-01-04
10:56:04.435 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=86 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security finalRowCount=1 cpuTime(ns)=900091
10:56:04,436 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue201) R4LPSIZO3MG1
START DATA SRC COMMAND: startTime=2018-01-04
10:56:04.436 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=87 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security sql=SELECT
MIN(g_0.floatNum) FROM s_smallA.SmallA AS g_0 WHERE g_0.intKey = 46
10:56:04,736 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue202) R4LPSIZO3MG1
END SRC COMMAND: endTime=2018-01-04
10:56:04.736 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=87 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security finalRowCount=1 cpuTime(ns)=1297007
10:56:04,739 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue203) R4LPSIZO3MG1
START DATA SRC COMMAND: startTime=2018-01-04
10:56:04.739 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=88 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security sql=SELECT
MIN(g_0.floatNum) FROM s_smallA.SmallA AS g_0 WHERE g_0.intKey = 45
10:56:04,977 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue204) R4LPSIZO3MG1
END SRC COMMAND: endTime=2018-01-04
10:56:04.977 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=88 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security finalRowCount=1 cpuTime(ns)=3238629
10:56:04,981 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue205) R4LPSIZO3MG1
START DATA SRC COMMAND: startTime=2018-01-04
10:56:04.981 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=89 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security sql=SELECT
MIN(g_0.floatNum) FROM s_smallA.SmallA AS g_0 WHERE g_0.intKey = 44
10:56:05,240 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue206) R4LPSIZO3MG1
END SRC COMMAND: endTime=2018-01-04
10:56:05.24 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=89 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security finalRowCount=1 cpuTime(ns)=3692883
10:56:05,244 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue207) R4LPSIZO3MG1
START DATA SRC COMMAND: startTime=2018-01-04
10:56:05.244 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=90 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security sql=SELECT
MIN(g_0.floatNum) FROM s_smallA.SmallA AS g_0 WHERE g_0.intKey = 43
10:56:05,496 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue208) R4LPSIZO3MG1
END SRC COMMAND: endTime=2018-01-04
10:56:05.496 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=90 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security finalRowCount=1 cpuTime(ns)=3104929
10:56:05,499 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue209) R4LPSIZO3MG1
START DATA SRC COMMAND: startTime=2018-01-04
10:56:05.499 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=91 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security sql=SELECT
MIN(g_0.floatNum) FROM s_smallA.SmallA AS g_0 WHERE g_0.intKey = 42
10:56:05,746 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue210) R4LPSIZO3MG1
END SRC COMMAND: endTime=2018-01-04
10:56:05.746 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=91 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security finalRowCount=1 cpuTime(ns)=2468255
10:56:05,749 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue211) R4LPSIZO3MG1
START DATA SRC COMMAND: startTime=2018-01-04
10:56:05.749 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=92 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security sql=SELECT
MIN(g_0.floatNum) FROM s_smallA.SmallA AS g_0 WHERE 1 = 0
10:56:06,274 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue211) R4LPSIZO3MG1
ERROR SRC COMMAND: endTime=2018-01-04
10:56:06.273 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=92 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security
10:56:06,284 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue212) R4LPSIZO3MG1
END SRC COMMAND: endTime=2018-01-04
10:56:06.284 requestID=R4LPSIZO3MG1.16 sourceCommandID=1 executionID=92 txID=null modelName=s_smallA translatorName=infinispan-hotrod sessionID=R4LPSIZO3MG1 principal=user@teiid-security finalRowCount=0 cpuTime(ns)=12513821
10:56:06,286 INFO [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue212) R4LPSIZO3MG1
ERROR USER COMMAND: endTime=2018-01-04
10:56:06.285 requestID=R4LPSIZO3MG1.16 txID=null sessionID=R4LPSIZO3MG1 principal=user@teiid-security vdbName=jdg71 vdbVersion=1 finalRowCount=null
10:56:06,298 INFO [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue212) R4LPSIZO3MG1
END USER COMMAND: endTime=2018-01-04
10:56:06.298 requestID=R4LPSIZO3MG1.16 txID=null sessionID=R4LPSIZO3MG1 principal=user@teiid-security vdbName=jdg71 vdbVersion=1 finalRowCount=0
{code}
There are values 0,...,49 for IntKey column, so the fact, that processing stops at 42 is
weird. The root cause is in my view that during processing, when the ordering of first
source command is arbitrary, after IntKey=42 there comes result with IntKey=0, which does
not match the criteria. In such case the {code}SELECT MIN(g_0.floatNum) FROM
s_smallA.SmallA AS g_0 WHERE 1 = 0 {code} is pushed and processing fails.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)