[JBoss JIRA] (TEIID-4412) Incorrectly handling when trying to update attribute that is the primar key
by Van Halbert (JIRA)
Van Halbert created TEIID-4412:
----------------------------------
Summary: Incorrectly handling when trying to update attribute that is the primar key
Key: TEIID-4412
URL: https://issues.jboss.org/browse/TEIID-4412
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 9.1
Reporter: Van Halbert
Assignee: Steven Hawkins
Priority: Critical
The current logic doesn't handle when the attribute being updated is also the primary key. The metadata from a dynamic vdb indicates this attribute to be updatable.
(1) I'm thinking the problem is that the attribute that is the primary key should not be updatable, but in order to be changed, the object should be deleted and re-added.
(2) Or, would the preferred way to handle this is to allow it to be updatable, but change the logic to check when this attribute is changing and internally perform a delete and re-add.
I like option (1) because the user is in control, where (2) is done under the covers.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 4 months
[JBoss JIRA] (TEIID-4412) Incorrectly handling when trying to update attribute that is the primar key
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4412?page=com.atlassian.jira.plugin... ]
Van Halbert reassigned TEIID-4412:
----------------------------------
Assignee: Van Halbert (was: Steven Hawkins)
> Incorrectly handling when trying to update attribute that is the primar key
> ---------------------------------------------------------------------------
>
> Key: TEIID-4412
> URL: https://issues.jboss.org/browse/TEIID-4412
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.1
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Critical
>
> The current logic doesn't handle when the attribute being updated is also the primary key. The metadata from a dynamic vdb indicates this attribute to be updatable.
> (1) I'm thinking the problem is that the attribute that is the primary key should not be updatable, but in order to be changed, the object should be deleted and re-added.
> (2) Or, would the preferred way to handle this is to allow it to be updatable, but change the logic to check when this attribute is changing and internally perform a delete and re-add.
> I like option (1) because the user is in control, where (2) is done under the covers.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 4 months
[JBoss JIRA] (TEIID-4235) dynamic sql recursion check not valid after caught exception
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4235?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-4235.
---------------------------------
> dynamic sql recursion check not valid after caught exception
> ------------------------------------------------------------
>
> Key: TEIID-4235
> URL: https://issues.jboss.org/browse/TEIID-4235
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.5
>
>
> With a procedure like:
> begin
> execute immediate
> exception e
> ...
> execute immediate ...
> An exception on the second execute immediate will be seen like:
> org.teiid.api.exception.query.QueryProcessingException: TEIID30168 Couldn't execute the dynamic SQL command "EXECUTE IMMEDIATE ..." due to: TEIID30347 There is a recursive invocation of group 'proc'. Please correct the SQL.
> Even when the dynamic sql does not re-invoke the proc. The issue is that when catching the initial exception thrown doesn't clear the entry from the recursion stack.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 4 months
[JBoss JIRA] (TEIID-4406) group by cast(... as date) results in NullPointException
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4406?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4406:
---------------------------------------
The issue is happening when a dependent join is pushed to a source that does not support expressions as grouping columns. We compensate by creating an inline view, but then don't associate the value set with the the dependent predicate.
> group by cast(... as date) results in NullPointException
> --------------------------------------------------------
>
> Key: TEIID-4406
> URL: https://issues.jboss.org/browse/TEIID-4406
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 9.0.2
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Attachments: plan_cast.txt, plan_nocast.txt
>
>
> example query:
> select oc.patientid, cast(oc.StartOfPeriod as date) as periodstart,
> max(case when variableid = 10001001 then oc.Value end) as sofa_resp,
> max(case when variableid = 10001002 then oc.Value end) as sofa_cardio,
> max(case when variableid = 10001003 then oc.Value end) as sofa_liver,
> max(case when variableid = 10001004 then oc.Value end) as sofa_coag,
> max(case when variableid = 10001005 then oc.Value end) as sofa_cns,
> max(case when variableid = 10001006 then oc.Value end) as sofa_renal,
> max(case when variableid = 30010000 then oc.Value end) as sofa_total
> from #tmp_cohort10 c
> join oldcos_scores oc on oc.PatientID = c.patientid
> group by oc.patientid, cast(oc.StartOfPeriod as date)
> stacktrace:
> 2016-08-23 11:46:25,263 ERROR [org.teiid.PROCESSOR] (Worker50_QueryProcessorQueue784) BCXKsyPCGz6r TEIID30019 Unexpected exception for request BCXKsyPCGz6r.148: java.lang.NullPointerException
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:426)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:418)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:281)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:226)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:386)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:344)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:276)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:184)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.<init>(ConnectorWorkItem.java:175)
> at org.teiid.dqp.internal.datamgr.ConnectorManager.registerRequest(ConnectorManager.java:203)
> at org.teiid.dqp.internal.process.DataTierManagerImpl.registerRequest(DataTierManagerImpl.java:1011)
> at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:179)
> at org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:500)
> at org.teiid.query.processor.relational.AccessNode.openInternal(AccessNode.java:268)
> at org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:171)
> at org.teiid.query.processor.relational.JoinStrategy.openRight(JoinStrategy.java:105)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:223)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:94)
> at org.teiid.query.processor.relational.GroupingNode.groupSortPhase(GroupingNode.java:490)
> at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:366)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:150)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> 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)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 4 months
[JBoss JIRA] (TEIID-4406) group by cast(... as date) results in NullPointException
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4406?page=com.atlassian.jira.plugin... ]
Work on TEIID-4406 started by Steven Hawkins.
---------------------------------------------
> group by cast(... as date) results in NullPointException
> --------------------------------------------------------
>
> Key: TEIID-4406
> URL: https://issues.jboss.org/browse/TEIID-4406
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 9.0.2
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Attachments: plan_cast.txt, plan_nocast.txt
>
>
> example query:
> select oc.patientid, cast(oc.StartOfPeriod as date) as periodstart,
> max(case when variableid = 10001001 then oc.Value end) as sofa_resp,
> max(case when variableid = 10001002 then oc.Value end) as sofa_cardio,
> max(case when variableid = 10001003 then oc.Value end) as sofa_liver,
> max(case when variableid = 10001004 then oc.Value end) as sofa_coag,
> max(case when variableid = 10001005 then oc.Value end) as sofa_cns,
> max(case when variableid = 10001006 then oc.Value end) as sofa_renal,
> max(case when variableid = 30010000 then oc.Value end) as sofa_total
> from #tmp_cohort10 c
> join oldcos_scores oc on oc.PatientID = c.patientid
> group by oc.patientid, cast(oc.StartOfPeriod as date)
> stacktrace:
> 2016-08-23 11:46:25,263 ERROR [org.teiid.PROCESSOR] (Worker50_QueryProcessorQueue784) BCXKsyPCGz6r TEIID30019 Unexpected exception for request BCXKsyPCGz6r.148: java.lang.NullPointerException
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:426)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:418)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:281)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:226)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:386)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:344)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:276)
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:184)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.<init>(ConnectorWorkItem.java:175)
> at org.teiid.dqp.internal.datamgr.ConnectorManager.registerRequest(ConnectorManager.java:203)
> at org.teiid.dqp.internal.process.DataTierManagerImpl.registerRequest(DataTierManagerImpl.java:1011)
> at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:179)
> at org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:500)
> at org.teiid.query.processor.relational.AccessNode.openInternal(AccessNode.java:268)
> at org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:171)
> at org.teiid.query.processor.relational.JoinStrategy.openRight(JoinStrategy.java:105)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:223)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:94)
> at org.teiid.query.processor.relational.GroupingNode.groupSortPhase(GroupingNode.java:490)
> at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:366)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:150)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> 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)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 4 months
[JBoss JIRA] (TEIID-4235) dynamic sql recursion check not valid after caught exception
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4235?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-4235:
------------------------------------------------
Andrej Smigala <asmigala(a)redhat.com> changed the Status of [bug 1341654|https://bugzilla.redhat.com/show_bug.cgi?id=1341654] from ON_QA to VERIFIED
> dynamic sql recursion check not valid after caught exception
> ------------------------------------------------------------
>
> Key: TEIID-4235
> URL: https://issues.jboss.org/browse/TEIID-4235
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.5
>
>
> With a procedure like:
> begin
> execute immediate
> exception e
> ...
> execute immediate ...
> An exception on the second execute immediate will be seen like:
> org.teiid.api.exception.query.QueryProcessingException: TEIID30168 Couldn't execute the dynamic SQL command "EXECUTE IMMEDIATE ..." due to: TEIID30347 There is a recursive invocation of group 'proc'. Please correct the SQL.
> Even when the dynamic sql does not re-invoke the proc. The issue is that when catching the initial exception thrown doesn't clear the entry from the recursion stack.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 4 months