[JBoss JIRA] (TEIID-5335) "No value was available" in ROW_NUMBER while inserting in foreign temporary table
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5335?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5335.
-----------------------------------
Resolution: Done
This affected both 10.2+ from the additional commit under TEIID-5260. The fix made the view removal less specific to project into, but ensured that the removal would still be valid.
> "No value was available" in ROW_NUMBER while inserting in foreign temporary table
> ---------------------------------------------------------------------------------
>
> Key: TEIID-5335
> URL: https://issues.jboss.org/browse/TEIID-5335
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 10.2.1
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Fix For: 10.3, 10.2.2
>
> Attachments: TEIID-5335.debugplan.txt
>
>
> while executing the following query the following error occurs:
> {code:sql}
> insert into rep149_variables (patientid,variableid,scoretime,varvalue)
> select patientid, code, entertime, 1 as varvalue
> from (
> select cr.code, ci.patientid, ci.entertime, row_number() over(partition by ci.patientid, ci.codeid order by ci.entertime) as rang
> from izisprod.S_CodeSystemRef csr
> join izisprod.S_CodeGroupRef cgr on cgr.CodeSysID = csr.CodeSysID
> join izisprod.S_CodeRef cr on cr.GroupID = cgr.GroupID and cr.code not in ('HK_GEEN','MZ_GEEN','zMG_fout')
> join iziswh.P_CodedItem ci on ci.CodeID = cr.CodeID and ci.ItemStatus = 0
> join rep149_cohort c on c.patientid = ci.patientid
> where csr.CodeSysID in (16,33)
> ) v
> where v.rang = 1;
> {code}
> 2018-05-02 14:03:56,206 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue142) MPLUURNpwXk3 TEIID30019 Unexpected exception for request MPLUURNpwXk3.36: org.teiid.core.TeiidComponentException: TEIID30328 Unable to evaluate ROW_NUMBER() OVER (PARTITION BY ci.PatientID, ci.CodeID ORDER BY ci.EnterTime): No value was available
> at org.teiid.query.util.CommandContext.getFromContext(CommandContext.java:519)
> at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:732)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:707)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:331)
> at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:185)
> at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:174)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:168)
> at org.teiid.query.processor.relational.SelectNode.nextBatchDirect(SelectNode.java:106)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.query.processor.relational.SourceState.getTupleBuffer(SourceState.java:244)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.loadLeft(EnhancedSortMergeJoinStrategy.java:227)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:228)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:200)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.query.processor.relational.SourceState.getTupleBuffer(SourceState.java:244)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.loadLeft(EnhancedSortMergeJoinStrategy.java:227)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:228)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:200)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectIntoNode.nextBatchDirect(ProjectIntoNode.java:140)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:480)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:350)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:277)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:115)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:206)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> When I only execute the query itself then the results are shown without any error.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5335) "No value was available" in ROW_NUMBER while inserting in foreign temporary table
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5335?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5335:
----------------------------------
Component/s: Query Engine
Fix Version/s: 10.3
10.2.2
> "No value was available" in ROW_NUMBER while inserting in foreign temporary table
> ---------------------------------------------------------------------------------
>
> Key: TEIID-5335
> URL: https://issues.jboss.org/browse/TEIID-5335
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 10.2.1
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Fix For: 10.3, 10.2.2
>
> Attachments: TEIID-5335.debugplan.txt
>
>
> while executing the following query the following error occurs:
> {code:sql}
> insert into rep149_variables (patientid,variableid,scoretime,varvalue)
> select patientid, code, entertime, 1 as varvalue
> from (
> select cr.code, ci.patientid, ci.entertime, row_number() over(partition by ci.patientid, ci.codeid order by ci.entertime) as rang
> from izisprod.S_CodeSystemRef csr
> join izisprod.S_CodeGroupRef cgr on cgr.CodeSysID = csr.CodeSysID
> join izisprod.S_CodeRef cr on cr.GroupID = cgr.GroupID and cr.code not in ('HK_GEEN','MZ_GEEN','zMG_fout')
> join iziswh.P_CodedItem ci on ci.CodeID = cr.CodeID and ci.ItemStatus = 0
> join rep149_cohort c on c.patientid = ci.patientid
> where csr.CodeSysID in (16,33)
> ) v
> where v.rang = 1;
> {code}
> 2018-05-02 14:03:56,206 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue142) MPLUURNpwXk3 TEIID30019 Unexpected exception for request MPLUURNpwXk3.36: org.teiid.core.TeiidComponentException: TEIID30328 Unable to evaluate ROW_NUMBER() OVER (PARTITION BY ci.PatientID, ci.CodeID ORDER BY ci.EnterTime): No value was available
> at org.teiid.query.util.CommandContext.getFromContext(CommandContext.java:519)
> at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:732)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:707)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:331)
> at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:185)
> at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:174)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:168)
> at org.teiid.query.processor.relational.SelectNode.nextBatchDirect(SelectNode.java:106)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.query.processor.relational.SourceState.getTupleBuffer(SourceState.java:244)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.loadLeft(EnhancedSortMergeJoinStrategy.java:227)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:228)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:200)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.query.processor.relational.SourceState.getTupleBuffer(SourceState.java:244)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.loadLeft(EnhancedSortMergeJoinStrategy.java:227)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:228)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:200)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectIntoNode.nextBatchDirect(ProjectIntoNode.java:140)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:480)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:350)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:277)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:115)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:206)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> When I only execute the query itself then the results are shown without any error.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5335) "No value was available" in ROW_NUMBER while inserting in foreign temporary table
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5335?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5335:
---------------------------------------
This is a regression from TEIID-5260 when the insert target doesn't have the query expression pushed down as well. After the virtual layer is merged it isn't properly marked as having a window function.
> "No value was available" in ROW_NUMBER while inserting in foreign temporary table
> ---------------------------------------------------------------------------------
>
> Key: TEIID-5335
> URL: https://issues.jboss.org/browse/TEIID-5335
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 10.2.1
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Attachments: TEIID-5335.debugplan.txt
>
>
> while executing the following query the following error occurs:
> {code:sql}
> insert into rep149_variables (patientid,variableid,scoretime,varvalue)
> select patientid, code, entertime, 1 as varvalue
> from (
> select cr.code, ci.patientid, ci.entertime, row_number() over(partition by ci.patientid, ci.codeid order by ci.entertime) as rang
> from izisprod.S_CodeSystemRef csr
> join izisprod.S_CodeGroupRef cgr on cgr.CodeSysID = csr.CodeSysID
> join izisprod.S_CodeRef cr on cr.GroupID = cgr.GroupID and cr.code not in ('HK_GEEN','MZ_GEEN','zMG_fout')
> join iziswh.P_CodedItem ci on ci.CodeID = cr.CodeID and ci.ItemStatus = 0
> join rep149_cohort c on c.patientid = ci.patientid
> where csr.CodeSysID in (16,33)
> ) v
> where v.rang = 1;
> {code}
> 2018-05-02 14:03:56,206 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue142) MPLUURNpwXk3 TEIID30019 Unexpected exception for request MPLUURNpwXk3.36: org.teiid.core.TeiidComponentException: TEIID30328 Unable to evaluate ROW_NUMBER() OVER (PARTITION BY ci.PatientID, ci.CodeID ORDER BY ci.EnterTime): No value was available
> at org.teiid.query.util.CommandContext.getFromContext(CommandContext.java:519)
> at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:732)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:707)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:331)
> at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:185)
> at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:174)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:168)
> at org.teiid.query.processor.relational.SelectNode.nextBatchDirect(SelectNode.java:106)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.query.processor.relational.SourceState.getTupleBuffer(SourceState.java:244)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.loadLeft(EnhancedSortMergeJoinStrategy.java:227)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:228)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:200)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.query.processor.relational.SourceState.getTupleBuffer(SourceState.java:244)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.loadLeft(EnhancedSortMergeJoinStrategy.java:227)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:228)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:200)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectIntoNode.nextBatchDirect(ProjectIntoNode.java:140)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:480)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:350)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:277)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:115)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:206)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> When I only execute the query itself then the results are shown without any error.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5330) FIRST_VALUE/LAST_VALUE/LEAD/LAG functions always try to return integer
by Johnathon Lee (JIRA)
[ https://issues.jboss.org/browse/TEIID-5330?page=com.atlassian.jira.plugin... ]
Johnathon Lee updated TEIID-5330:
---------------------------------
Fix Version/s: 8.12.13.6_4
> FIRST_VALUE/LAST_VALUE/LEAD/LAG functions always try to return integer
> ----------------------------------------------------------------------
>
> Key: TEIID-5330
> URL: https://issues.jboss.org/browse/TEIID-5330
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.13.6_4
> Reporter: Jan Martiska
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 10.3, 8.12.13.6_4, 10.1.4, 10.2.2
>
>
> The FIRST_VALUE/LAST_VALUE/LEAD/LAG functions always try to return integer, no matter what the type of the column is.
> If integer can be cast to the target type, the query will successfully return, but the return type will be integer instead of the expected one. If integer cannot be cast to the requested type, the query will fail.
> For example, when running this against a CSV source and a string column:
> {noformat}
> SELECT FIRST_VALUE(stringkey) OVER (ORDER BY stringkey) FROM BQT1.smallA
> {noformat}
> This fails with:
> {noformat}
> 14:54:49,328 ERROR [org.teiid.TRANSPORT] (New I/O worker #2) TEIID40113 Unhandled exception, aborting operation: org.teiid.transport.ObjectEncoder$FailedWriteException: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype integer for column 0 doesn't match the runtime type "java.lang.String". Please ensure that the column's modeled datatype matches the expected data.
> at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:136) [teiid-runtime-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.6.10.Final-redhat-1.jar:3.6.10.Final-redhat-1]
> at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.6.10.Final-redhat-1.jar:3.6.10.Final-redhat-1]
> at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) [netty-3.6.10.Final-redhat-1.jar:3.6.10.Final-redhat-1]
> at org.teiid.transport.SSLAwareChannelHandler$ObjectChannelImpl.write(SSLAwareChannelHandler.java:94) [teiid-runtime-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.transport.SocketClientInstance.send(SocketClientInstance.java:94) [teiid-runtime-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.transport.ServerWorkItem.sendResult(ServerWorkItem.java:135) [teiid-runtime-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.transport.ServerWorkItem$1.onCompletion(ServerWorkItem.java:105) [teiid-runtime-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135) [teiid-client-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40) [teiid-client-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79) [teiid-client-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.sendResultsIfNeeded(RequestWorkItem.java:996) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.dqp.internal.process.RequestWorkItem$1.flushBatchDirect(RequestWorkItem.java:676) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.query.processor.BatchCollector.flushBatch(BatchCollector.java:223) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:194) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> 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]
> Caused by: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype integer for column 0 doesn't match the runtime type "java.lang.String". Please ensure that the column's modeled datatype matches the expected data.
> at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:878) [teiid-client-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.client.ResultsMessage.writeExternal(ResultsMessage.java:319) [teiid-client-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459) [rt.jar:1.8.0_151]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430) [rt.jar:1.8.0_151]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) [rt.jar:1.8.0_151]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) [rt.jar:1.8.0_151]
> at org.teiid.net.socket.Message.writeExternal(Message.java:61) [teiid-client-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459) [rt.jar:1.8.0_151]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430) [rt.jar:1.8.0_151]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) [rt.jar:1.8.0_151]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) [rt.jar:1.8.0_151]
> at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:131) [teiid-runtime-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> ... 25 more
> Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
> at org.teiid.client.BatchSerializer$IntColumnSerializer.writeObject(BatchSerializer.java:563) [teiid-client-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.client.BatchSerializer$ColumnSerializer.writeColumn(BatchSerializer.java:534) [teiid-client-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:867) [teiid-client-8.12.13.6_4-redhat-64-1.jar:8.12.13.6_4-redhat-64-1]
> ... 36 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5335) "No value was available" in ROW_NUMBER while inserting in foreign temporary table
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5335?page=com.atlassian.jira.plugin... ]
Work on TEIID-5335 started by Steven Hawkins.
---------------------------------------------
> "No value was available" in ROW_NUMBER while inserting in foreign temporary table
> ---------------------------------------------------------------------------------
>
> Key: TEIID-5335
> URL: https://issues.jboss.org/browse/TEIID-5335
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 10.2.1
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Attachments: TEIID-5335.debugplan.txt
>
>
> while executing the following query the following error occurs:
> {code:sql}
> insert into rep149_variables (patientid,variableid,scoretime,varvalue)
> select patientid, code, entertime, 1 as varvalue
> from (
> select cr.code, ci.patientid, ci.entertime, row_number() over(partition by ci.patientid, ci.codeid order by ci.entertime) as rang
> from izisprod.S_CodeSystemRef csr
> join izisprod.S_CodeGroupRef cgr on cgr.CodeSysID = csr.CodeSysID
> join izisprod.S_CodeRef cr on cr.GroupID = cgr.GroupID and cr.code not in ('HK_GEEN','MZ_GEEN','zMG_fout')
> join iziswh.P_CodedItem ci on ci.CodeID = cr.CodeID and ci.ItemStatus = 0
> join rep149_cohort c on c.patientid = ci.patientid
> where csr.CodeSysID in (16,33)
> ) v
> where v.rang = 1;
> {code}
> 2018-05-02 14:03:56,206 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue142) MPLUURNpwXk3 TEIID30019 Unexpected exception for request MPLUURNpwXk3.36: org.teiid.core.TeiidComponentException: TEIID30328 Unable to evaluate ROW_NUMBER() OVER (PARTITION BY ci.PatientID, ci.CodeID ORDER BY ci.EnterTime): No value was available
> at org.teiid.query.util.CommandContext.getFromContext(CommandContext.java:519)
> at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:732)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:707)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:331)
> at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:185)
> at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:174)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:168)
> at org.teiid.query.processor.relational.SelectNode.nextBatchDirect(SelectNode.java:106)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.query.processor.relational.SourceState.getTupleBuffer(SourceState.java:244)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.loadLeft(EnhancedSortMergeJoinStrategy.java:227)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:228)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:200)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.query.processor.relational.SourceState.getTupleBuffer(SourceState.java:244)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.loadLeft(EnhancedSortMergeJoinStrategy.java:227)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:228)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:200)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectIntoNode.nextBatchDirect(ProjectIntoNode.java:140)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:480)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:350)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:47)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:277)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:115)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:206)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> When I only execute the query itself then the results are shown without any error.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-4784) Provide functionality to perform RENAME table in DDL scripts
by Bram Gadeyne (JIRA)
[ https://issues.jboss.org/browse/TEIID-4784?page=com.atlassian.jira.plugin... ]
Bram Gadeyne edited comment on TEIID-4784 at 5/2/18 8:16 AM:
-------------------------------------------------------------
Hi,
Nice to see that this feature will be included.
Is there already some documentation available? I'd like to test the 10.3 version.
Does this allow the original tablename to contain the schema name?
E.g.
{code:sql}
ALTER TABLE izisprod.P_GeneralData RENAME TO 'prod_P_GeneralData';
ALTER TABLE iziswh.P_GeneralData RENAME TO 'wh_P_GeneralData';
{code}
With izisprod and iziswh being the schema names.
was (Author: gadeyne.bram):
Hi,
Nice to see that this feature will be included.
Is there already some documentation available? I'd like to test the 10.3 version.
Does this allow the original tablename to contain the schema name?
E.g.
ALTER TABLE izisprod.P_GeneralData RENAME TO 'prod_P_GeneralData';
ALTER TABLE iziswh.P_GeneralData RENAME TO 'wh_P_GeneralData';
With izisprod and iziswh being the schema names.
> Provide functionality to perform RENAME table in DDL scripts
> ------------------------------------------------------------
>
> Key: TEIID-4784
> URL: https://issues.jboss.org/browse/TEIID-4784
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Affects Versions: 9.3
> Reporter: Bram Gadeyne
> Assignee: Ramesh Reddy
> Labels: Beta3
> Fix For: 10.0
>
>
> Allow rename commands like:
> ALTER TABLE "teiidtest" RENAME TO "tmptbl_teiidtest";
> This should rename the table name teiidtest in the current schema to tmptbl_teiidtest.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-4784) Provide functionality to perform RENAME table in DDL scripts
by Bram Gadeyne (JIRA)
[ https://issues.jboss.org/browse/TEIID-4784?page=com.atlassian.jira.plugin... ]
Bram Gadeyne commented on TEIID-4784:
-------------------------------------
Hi,
Nice to see that this feature will be included.
Is there already some documentation available? I'd like to test the 10.3 version.
Does this allow the original tablename to contain the schema name?
E.g.
ALTER TABLE izisprod.P_GeneralData RENAME TO 'prod_P_GeneralData';
ALTER TABLE iziswh.P_GeneralData RENAME TO 'wh_P_GeneralData';
With izisprod and iziswh being the schema names.
> Provide functionality to perform RENAME table in DDL scripts
> ------------------------------------------------------------
>
> Key: TEIID-4784
> URL: https://issues.jboss.org/browse/TEIID-4784
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Affects Versions: 9.3
> Reporter: Bram Gadeyne
> Assignee: Ramesh Reddy
> Labels: Beta3
> Fix For: 10.0
>
>
> Allow rename commands like:
> ALTER TABLE "teiidtest" RENAME TO "tmptbl_teiidtest";
> This should rename the table name teiidtest in the current schema to tmptbl_teiidtest.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5323) info logging of commands is too high by default for teiid embedded
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5323?page=com.atlassian.jira.plugin... ]
Work on TEIID-5323 started by Steven Hawkins.
---------------------------------------------
> info logging of commands is too high by default for teiid embedded
> ------------------------------------------------------------------
>
> Key: TEIID-5323
> URL: https://issues.jboss.org/browse/TEIID-5323
> Project: Teiid
> Issue Type: Task
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.3
>
>
> From TEIID-5007 we had not resolved: Another issue that affects non-Wildfly usage are the defaults for command logging. For backwards compatibility the splitting of logging source/user level queries means that the user queries are logged at an info level - this may be too verbose. We could introduce a breaking/configurable change to alter this behavior.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months