-
Bug
-
Resolution: Done
-
Major
-
10.1
-
None
2018-02-12 09:10:44,905 ERROR [org.teiid.PROCESSOR] (Worker35_QueryProcessorQueue538707) Jtb6gbxGtFZG TEIID30019 Unexpected exception for request Jtb6gbxGtFZG.42: java.lang.AssertionError: Assertion failed.
at org.teiid.core.util.Assertion.failed(Assertion.java:69)
at org.teiid.core.util.Assertion.assertTrue(Assertion.java:64)
at org.teiid.core.util.Assertion.assertTrue(Assertion.java:56)
at org.teiid.query.processor.relational.MergeJoinStrategy.setProcessingSortRight(MergeJoinStrategy.java:381)
...
In the code for this I see this comment:
//it is possible that a delayed open will be called after the parent open
//for now we'll just throw an assertion
The exception occurs while executing this query:
insert into rep38_results(admissionid, vargroup, vartype, vartime, varenttime, varstrvalue, vardoublevalue, vartimevalue,validated) select patientid, Labogroep, v.name, sampletime, entertime, stringvalue, varvalue,null,false from ( select lc.patientid, lm.Labogroep, lm.name, lc.sampletime, lc.entertime, lc.stringvalue, lc.varvalue, lc.resultid, lc.ResultNo, row_number() over(partition by lc.patientid, lc.variableid_nieuw, lc.SampleTime order by lc.ResultID, lc.ResultNo desc) as rang from rep38_cohort coh join izisprod.P_GeneralData gd on gd.PatientID = cast(coh.admissionid as integer) and gd.Status >= 4 and gd.status <> 5 join izisprod.U_PV_LabCorrectValues lc on lc.PatientID = gd.patientid and BITAND(lc.status, 8) = 8 and BITAND(lc.status, 2) <> 2 and lc.sampletime > PARSETIMESTAMP('2013-01-01','yyyy-MM-dd') and lc.sampletime between coh.studystart and coh.studyend join izisprod.U_P_LabMapping lm on lm.labogroep in ('WBC-b','INR','crp-s','Thrombocyten','Lactaat-s') and lm.VariableID = lc.variableid_oud UNION ALL select lc.patientid, lm.Labogroep, lm.name, lc.sampletime, lc.entertime, lc.stringvalue, lc.varvalue, lc.resultid, lc.ResultNo, row_number() over(partition by lc.patientid, lc.variableid_nieuw, lc.SampleTime order by lc.ResultID, lc.ResultNo desc) as rang from rep38_cohort coh join iziswh.P_GeneralData gd on gd.PatientID = cast(coh.admissionid as integer) join iziswh.U_PV_LabCorrectValues lc on lc.PatientID = gd.patientid and BITAND(lc.status, 8) = 8 and BITAND(lc.status, 2) <> 2 and lc.sampletime > PARSETIMESTAMP('2013-01-01','yyyy-MM-dd') and lc.sampletime between coh.studystart and coh.studyend join izisprod.U_P_LabMapping lm on lm.labogroep in ('WBC-b','INR','crp-s','Thrombocyten','Lactaat-s') and lm.VariableID = lc.variableid_oud ) v where v.rang = 1 order by patientid, Labogroep, SampleTime;
While writing down this issue, I restarted our server and the issue is now gone so I can't reproduce it at this time. I was also planning on retrieving the SHOWPLAN contents...