-
Bug
-
Resolution: Done
-
Major
-
8.7.1.6_2
-
None
-
Hide
Query:
SELECT intkey FROM BQT1.SmallA AS A WHERE INTKEY IN (SELECT CONVERT(STRINGKEY, INTEGER) FROM BQT1.SMALLA AS A WHERE STRINGKEY IN (SELECT CONVERT(INTKEY, STRING) FROM BQT1.SMALLA AS B WHERE A.INTNUM = B.INTNUM))Server log:
Unable to find source-code formatter for language: text. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml10:22:20,802 DEBUG [org.teiid.TRANSPORT] (New I/O worker #1) processing message:MessageHolder: key=283 contents=Invoke interface org.teiid.client.DQP.executeRequest 10:22:20,806 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) Request Thread qvJ3png5LESA.49 with state NEW 10:22:20,807 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49 Non-cachable command. 10:22:20,807 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49 executing SELECT intkey FROM BQT1.SmallA AS A WHERE INTKEY IN (SELECT CONVERT(STRINGKEY, INTEGER) FROM BQT1.SMALLA AS A WHERE STRINGKEY IN (SELECT CONVERT(INTKEY, STRING) FROM BQT1.SMALLA AS B WHERE A.INTNUM = B.INTNUM)) 10:22:20,823 DEBUG [org.teiid.PLANNER] (Worker23_QueryProcessorQueue141) [QueryAnnotation<Relational Planner, LOW,CONVERT function not supported by source Source,CONVERT(IntKey, STRING) was not pushed>, QueryAnnotation<Relational Planner, LOW,Subquery cannot be pushed down Source,SELECT CONVERT(B.IntKey, STRING) FROM BQT1.SmallA AS B WHERE B.IntNum = A.IntNum was not pushed>, QueryAnnotation<Relational Planner, LOW,CONVERT function not supported by source Source,CONVERT(SmallA__2.IntKey, STRING) was not pushed>, QueryAnnotation<Relational Planner, LOW,CONVERT function not supported by source Source,CONVERT(SmallA__2.IntKey, STRING) was not pushed>, QueryAnnotation<Relational Planner, LOW,Conditions met (hint or cost),Converting to a semi merge join Select(groups=[Source.SmallA AS SmallA__1], props={SELECT_CRITERIA=SmallA__1.StringKey IN (SELECT CONVERT(B.IntKey, STRING) FROM BQT1.SmallA AS B WHERE B.IntNum = A.IntNum), OUTPUT_COLS=[SmallA__1.StringKey], EST_CARDINALITY=16.666666, EST_COL_STATS={SmallA__1.StringKey=[-1.0, -1.0]}}>, QueryAnnotation<Relational Planner, LOW,Subquery cannot be pushed down Source,SELECT CONVERT(A.StringKey, INTEGER) FROM BQT1.SmallA AS A WHERE A.StringKey IN (SELECT CONVERT(B.IntKey, STRING) FROM BQT1.SmallA AS B WHERE B.IntNum = A.IntNum) was not pushed>, QueryAnnotation<Relational Planner, LOW,CONVERT function not supported by source Source,CONVERT(SmallA__4.StringKey, INTEGER) was not pushed>, QueryAnnotation<Relational Planner, LOW,CONVERT function not supported by source Source,CONVERT(SmallA__4.StringKey, INTEGER) was not pushed>, QueryAnnotation<Relational Planner, LOW,Conditions met (hint or cost),Converting to a semi merge join Select(groups=[Source.SmallA AS SmallA__3], props={SELECT_CRITERIA=SmallA__3.IntKey IN (SELECT CONVERT(A.StringKey, INTEGER) FROM BQT1.SmallA AS A WHERE A.StringKey IN (SELECT CONVERT(B.IntKey, STRING) FROM BQT1.SmallA AS B WHERE B.IntNum = A.IntNum)), OUTPUT_COLS=[SmallA__3.IntKey], EST_CARDINALITY=16.666666, EST_COL_STATS={SmallA__3.IntKey=[-1.0, -1.0]}}>] 10:22:20,823 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) ProcessTree for qvJ3png5LESA.49 ProjectNode(12) output=[SmallA__3.IntKey] [SmallA__3.IntKey] JoinNode(13) [MERGE JOIN (ALREADY_SORTED/ALREADY_SORTED)] [SEMI JOIN] criteria=[SmallA__3.IntKey=CONVERT(A.StringKey, INTEGER), A.StringKey IN (SELECT CONVERT(B.IntKey, STRING) FROM BQT1.SmallA AS B WHERE B.IntNum = SmallA__3.IntNum)] output=[SmallA__3.IntKey] AccessNode(14) output=[SmallA__3.IntKey, SmallA__3.IntNum] SELECT g_0.IntKey AS c_0, g_0.IntNum AS c_1 FROM Source.SmallA AS g_0 ORDER BY c_0 PlanExecutionNode(15) output=[CONVERT(A.StringKey, INTEGER), A.StringKey] 10:22:20,824 DEBUG [org.teiid.TXN_LOG] (Worker23_QueryProcessorQueue141) before getOrCreateTransactionContext:org.teiid.dqp.internal.process.TransactionServerImpl@47750939(qvJ3png5LESA) 10:22:20,824 DEBUG [org.teiid.TXN_LOG] (Worker23_QueryProcessorQueue141) after getOrCreateTransactionContext : qvJ3png5LESA NONE ID:NONE 10:22:20,824 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) Creating TupleBuffer: 58 [A.IntKey] [class java.lang.Integer] batch size 2048 of type PROCESSOR 10:22:20,824 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49.14.34 Create State 10:22:20,825 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49.11.35 Create State 10:22:20,825 DEBUG [org.teiid.PROCESSOR] (Worker24_QueryProcessorQueue142) Running task for parent thread Worker23_QueryProcessorQueue141 10:22:20,826 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Processing NEW request: SELECT g_0.IntKey AS c_0, g_0.IntNum AS c_1 FROM Source.SmallA AS g_0 ORDER BY c_0 10:22:20,827 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49.14.34 Blocking on source query qvJ3png5LESA.49.14.34 10:22:20,827 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) Source-specific command: SELECT g_0.intkey AS c_0, g_0.intnum AS c_1 FROM smalla AS g_0 ORDER BY c_0 10:22:20,827 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49 Blocking on source request(s). 10:22:20,827 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Obtained execution 10:22:20,827 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) Creating TupleBuffer: 59 [CONVERT(A.StringKey, INTEGER), A.StringKey] [class java.lang.Integer, class java.lang.String] batch size 1024 of type PROCESSOR 10:22:20,828 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) Creating TupleBuffer: 60 [CONVERT(SmallA__4.StringKey, INTEGER), SmallA__4.StringKey] [class java.lang.Integer, class java.lang.String] batch size 1024 of type PROCESSOR 10:22:20,828 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) Created intermediate sort buffer 60 10:22:20,828 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49.11.35 Blocking on source query qvJ3png5LESA.49.11.35 10:22:20,828 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49 Blocking on source request(s). 10:22:20,828 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) Request Thread qvJ3png5LESA.49 - processor blocked 10:22:20,827 DEBUG [org.teiid.PROCESSOR] (Worker25_QueryProcessorQueue143) Running task for parent thread Worker23_QueryProcessorQueue141 10:22:20,831 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Processing NEW request: SELECT g_0.StringKey FROM Source.SmallA AS g_0 10:22:20,835 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) Source-specific command: SELECT g_0.stringkey FROM smalla AS g_0 10:22:20,836 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Obtained execution 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Executed command 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Executed command 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Processing MORE request 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Processing MORE request 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Getting results from connector 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Getting results from connector 10:22:21,482 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Obtained last batch, total row count: 50 10:22:21,484 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Obtained last batch, total row count: 50 10:22:21,484 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) Request Thread qvJ3png5LESA.49 with state PROCESSING 10:22:21,485 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.14.34 Remove State 10:22:21,486 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.14.34 Processing Close : SELECT g_0.IntKey AS c_0, g_0.IntNum AS c_1 FROM Source.SmallA AS g_0 ORDER BY c_0 10:22:21,487 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.14.34 Closed execution 10:22:21,488 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.14.34 Closed connection 10:22:21,489 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.11.35 Remove State 10:22:21,489 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.11.35 Processing Close : SELECT g_0.StringKey FROM Source.SmallA AS g_0 10:22:21,491 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.11.35 Closed execution 10:22:21,491 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.11.35 Closed connection 10:22:21,492 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue144) Creating TupleBuffer: 61 [CONVERT(SmallA__4.StringKey, INTEGER), SmallA__4.StringKey] [class java.lang.Integer, class java.lang.String] batch size 1024 of type PROCESSOR 10:22:21,492 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) Created intermediate sort buffer 61 10:22:21,493 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue144) Removing TupleBuffer: 60 10:22:21,493 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue144) Removing TupleBuffer: 61 10:22:21,494 ERROR [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) TEIID30019 Unexpected exception for request qvJ3png5LESA.49: java.lang.NullPointerException at org.teiid.query.processor.relational.SubqueryAwareEvaluator.evaluateSubquery(SubqueryAwareEvaluator.java:267) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:435) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:227) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:212) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:206) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.JoinNode.matchesCriteria(JoinNode.java:337) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.MergeJoinStrategy.process(MergeJoinStrategy.java:247) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:211) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:136) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:159) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:141) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:444) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:326) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:254) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40] 10:22:21,496 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) QueryProcessor: closing processor 10:22:21,497 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue144) Removing TupleBuffer: 59 10:22:21,497 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) Removing tuplesource for the request qvJ3png5LESA.49 10:22:21,497 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue144) Removing TupleBuffer: 58 10:22:21,497 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) java.lang.NullPointerException Sending error to client qvJ3png5LESA.49 10:22:21,499 DEBUG [org.teiid.TRANSPORT] (Worker23_QueryProcessorQueue144) send message: MessageHolder: key=283 contents=ResultsMessage rowCount=0 finalRow=-1
ShowQuery: SELECT intkey FROM BQT1.SmallA AS A WHERE INTKEY IN (SELECT CONVERT(STRINGKEY, INTEGER) FROM BQT1.SMALLA AS A WHERE STRINGKEY IN (SELECT CONVERT(INTKEY, STRING) FROM BQT1.SMALLA AS B WHERE A.INTNUM = B.INTNUM)) Server log: Unable to find source-code formatter for language: text. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml 10:22:20,802 DEBUG [org.teiid.TRANSPORT] (New I/O worker #1) processing message:MessageHolder: key=283 contents=Invoke interface org.teiid.client.DQP.executeRequest 10:22:20,806 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) Request Thread qvJ3png5LESA.49 with state NEW 10:22:20,807 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49 Non-cachable command. 10:22:20,807 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49 executing SELECT intkey FROM BQT1.SmallA AS A WHERE INTKEY IN (SELECT CONVERT(STRINGKEY, INTEGER) FROM BQT1.SMALLA AS A WHERE STRINGKEY IN (SELECT CONVERT(INTKEY, STRING) FROM BQT1.SMALLA AS B WHERE A.INTNUM = B.INTNUM)) 10:22:20,823 DEBUG [org.teiid.PLANNER] (Worker23_QueryProcessorQueue141) [QueryAnnotation<Relational Planner, LOW,CONVERT function not supported by source Source,CONVERT(IntKey, STRING) was not pushed>, QueryAnnotation<Relational Planner, LOW,Subquery cannot be pushed down Source,SELECT CONVERT(B.IntKey, STRING) FROM BQT1.SmallA AS B WHERE B.IntNum = A.IntNum was not pushed>, QueryAnnotation<Relational Planner, LOW,CONVERT function not supported by source Source,CONVERT(SmallA__2.IntKey, STRING) was not pushed>, QueryAnnotation<Relational Planner, LOW,CONVERT function not supported by source Source,CONVERT(SmallA__2.IntKey, STRING) was not pushed>, QueryAnnotation<Relational Planner, LOW,Conditions met (hint or cost),Converting to a semi merge join Select(groups=[Source.SmallA AS SmallA__1], props={SELECT_CRITERIA=SmallA__1.StringKey IN (SELECT CONVERT(B.IntKey, STRING) FROM BQT1.SmallA AS B WHERE B.IntNum = A.IntNum), OUTPUT_COLS=[SmallA__1.StringKey], EST_CARDINALITY=16.666666, EST_COL_STATS={SmallA__1.StringKey=[-1.0, -1.0]}}>, QueryAnnotation<Relational Planner, LOW,Subquery cannot be pushed down Source,SELECT CONVERT(A.StringKey, INTEGER) FROM BQT1.SmallA AS A WHERE A.StringKey IN (SELECT CONVERT(B.IntKey, STRING) FROM BQT1.SmallA AS B WHERE B.IntNum = A.IntNum) was not pushed>, QueryAnnotation<Relational Planner, LOW,CONVERT function not supported by source Source,CONVERT(SmallA__4.StringKey, INTEGER) was not pushed>, QueryAnnotation<Relational Planner, LOW,CONVERT function not supported by source Source,CONVERT(SmallA__4.StringKey, INTEGER) was not pushed>, QueryAnnotation<Relational Planner, LOW,Conditions met (hint or cost),Converting to a semi merge join Select(groups=[Source.SmallA AS SmallA__3], props={SELECT_CRITERIA=SmallA__3.IntKey IN (SELECT CONVERT(A.StringKey, INTEGER) FROM BQT1.SmallA AS A WHERE A.StringKey IN (SELECT CONVERT(B.IntKey, STRING) FROM BQT1.SmallA AS B WHERE B.IntNum = A.IntNum)), OUTPUT_COLS=[SmallA__3.IntKey], EST_CARDINALITY=16.666666, EST_COL_STATS={SmallA__3.IntKey=[-1.0, -1.0]}}>] 10:22:20,823 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) ProcessTree for qvJ3png5LESA.49 ProjectNode(12) output=[SmallA__3.IntKey] [SmallA__3.IntKey] JoinNode(13) [MERGE JOIN (ALREADY_SORTED/ALREADY_SORTED)] [SEMI JOIN] criteria=[SmallA__3.IntKey=CONVERT(A.StringKey, INTEGER), A.StringKey IN (SELECT CONVERT(B.IntKey, STRING) FROM BQT1.SmallA AS B WHERE B.IntNum = SmallA__3.IntNum)] output=[SmallA__3.IntKey] AccessNode(14) output=[SmallA__3.IntKey, SmallA__3.IntNum] SELECT g_0.IntKey AS c_0, g_0.IntNum AS c_1 FROM Source.SmallA AS g_0 ORDER BY c_0 PlanExecutionNode(15) output=[CONVERT(A.StringKey, INTEGER), A.StringKey] 10:22:20,824 DEBUG [org.teiid.TXN_LOG] (Worker23_QueryProcessorQueue141) before getOrCreateTransactionContext:org.teiid.dqp.internal.process.TransactionServerImpl@47750939(qvJ3png5LESA) 10:22:20,824 DEBUG [org.teiid.TXN_LOG] (Worker23_QueryProcessorQueue141) after getOrCreateTransactionContext : qvJ3png5LESA NONE ID:NONE 10:22:20,824 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) Creating TupleBuffer: 58 [A.IntKey] [ class java.lang. Integer ] batch size 2048 of type PROCESSOR 10:22:20,824 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49.14.34 Create State 10:22:20,825 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49.11.35 Create State 10:22:20,825 DEBUG [org.teiid.PROCESSOR] (Worker24_QueryProcessorQueue142) Running task for parent thread Worker23_QueryProcessorQueue141 10:22:20,826 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Processing NEW request: SELECT g_0.IntKey AS c_0, g_0.IntNum AS c_1 FROM Source.SmallA AS g_0 ORDER BY c_0 10:22:20,827 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49.14.34 Blocking on source query qvJ3png5LESA.49.14.34 10:22:20,827 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) Source-specific command: SELECT g_0.intkey AS c_0, g_0.intnum AS c_1 FROM smalla AS g_0 ORDER BY c_0 10:22:20,827 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49 Blocking on source request(s). 10:22:20,827 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Obtained execution 10:22:20,827 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) Creating TupleBuffer: 59 [CONVERT(A.StringKey, INTEGER), A.StringKey] [ class java.lang. Integer , class java.lang. String ] batch size 1024 of type PROCESSOR 10:22:20,828 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) Creating TupleBuffer: 60 [CONVERT(SmallA__4.StringKey, INTEGER), SmallA__4.StringKey] [ class java.lang. Integer , class java.lang. String ] batch size 1024 of type PROCESSOR 10:22:20,828 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) Created intermediate sort buffer 60 10:22:20,828 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49.11.35 Blocking on source query qvJ3png5LESA.49.11.35 10:22:20,828 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue141) qvJ3png5LESA.49 Blocking on source request(s). 10:22:20,828 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue141) Request Thread qvJ3png5LESA.49 - processor blocked 10:22:20,827 DEBUG [org.teiid.PROCESSOR] (Worker25_QueryProcessorQueue143) Running task for parent thread Worker23_QueryProcessorQueue141 10:22:20,831 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Processing NEW request: SELECT g_0.StringKey FROM Source.SmallA AS g_0 10:22:20,835 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) Source-specific command: SELECT g_0.stringkey FROM smalla AS g_0 10:22:20,836 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Obtained execution 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Executed command 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Executed command 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Processing MORE request 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Processing MORE request 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Getting results from connector 10:22:21,089 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Getting results from connector 10:22:21,482 DEBUG [org.teiid.CONNECTOR] (Worker25_QueryProcessorQueue143) qvJ3png5LESA.49.11.35 Obtained last batch, total row count: 50 10:22:21,484 DEBUG [org.teiid.CONNECTOR] (Worker24_QueryProcessorQueue142) qvJ3png5LESA.49.14.34 Obtained last batch, total row count: 50 10:22:21,484 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) Request Thread qvJ3png5LESA.49 with state PROCESSING 10:22:21,485 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.14.34 Remove State 10:22:21,486 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.14.34 Processing Close : SELECT g_0.IntKey AS c_0, g_0.IntNum AS c_1 FROM Source.SmallA AS g_0 ORDER BY c_0 10:22:21,487 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.14.34 Closed execution 10:22:21,488 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.14.34 Closed connection 10:22:21,489 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.11.35 Remove State 10:22:21,489 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.11.35 Processing Close : SELECT g_0.StringKey FROM Source.SmallA AS g_0 10:22:21,491 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.11.35 Closed execution 10:22:21,491 DEBUG [org.teiid.CONNECTOR] (Worker23_QueryProcessorQueue144) qvJ3png5LESA.49.11.35 Closed connection 10:22:21,492 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue144) Creating TupleBuffer: 61 [CONVERT(SmallA__4.StringKey, INTEGER), SmallA__4.StringKey] [ class java.lang. Integer , class java.lang. String ] batch size 1024 of type PROCESSOR 10:22:21,492 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) Created intermediate sort buffer 61 10:22:21,493 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue144) Removing TupleBuffer: 60 10:22:21,493 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue144) Removing TupleBuffer: 61 10:22:21,494 ERROR [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) TEIID30019 Unexpected exception for request qvJ3png5LESA.49: java.lang.NullPointerException at org.teiid.query.processor.relational.SubqueryAwareEvaluator.evaluateSubquery(SubqueryAwareEvaluator.java:267) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:435) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:227) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:212) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:206) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.JoinNode.matchesCriteria(JoinNode.java:337) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.MergeJoinStrategy.process(MergeJoinStrategy.java:247) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:211) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:136) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:159) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:141) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:444) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:326) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:254) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.7.1.6_2-redhat-6.jar:8.7.1.6_2-redhat-6] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40] at java.lang. Thread .run( Thread .java:745) [rt.jar:1.8.0_40] 10:22:21,496 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) QueryProcessor: closing processor 10:22:21,497 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue144) Removing TupleBuffer: 59 10:22:21,497 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) Removing tuplesource for the request qvJ3png5LESA.49 10:22:21,497 DEBUG [org.teiid.BUFFER_MGR] (Worker23_QueryProcessorQueue144) Removing TupleBuffer: 58 10:22:21,497 DEBUG [org.teiid.PROCESSOR] (Worker23_QueryProcessorQueue144) java.lang.NullPointerException Sending error to client qvJ3png5LESA.49 10:22:21,499 DEBUG [org.teiid.TRANSPORT] (Worker23_QueryProcessorQueue144) send message: MessageHolder: key=283 contents=ResultsMessage rowCount=0 finalRow=-1
Teiid throws an NPE while executing query with double IN predicate. Example query:
SELECT intkey FROM BQT1.SmallA AS A WHERE INTKEY IN (SELECT CONVERT(STRINGKEY, INTEGER) FROM BQT1.SMALLA AS A WHERE STRINGKEY IN (SELECT CONVERT(INTKEY, STRING) FROM BQT1.SMALLA AS B WHERE A.INTNUM = B.INTNUM))