7 Replies Latest reply on Mar 17, 2014 9:36 AM by Ramesh Reddy

    problems with date(time) in case in whereclause

    gadeyne.bram Master

      Dear,

       

      I'm using Teiid 8.6.

       

      We're trying to execute a somewhat more advanced query that does the following things:

      -Find some catheters that have a start and endtime

      -If the endtime is unknown select either the patient dischargetime or the current time (see Case statement)

      -The temporary table #tmp_getallen contains the numbers 0 to 9 which we join multiple times to generate numbers between 0 and 499

      -Using these numbers we generate lines containing the dates between start and end (or alternative end) of these catheters.

      -These days are then used to create a list of catheterdays par patient

       

      While executing the following query (I've left out some variableids and changed some table names to anonimise the query)

       

      Select  B.patientid, B.katheterdag

      From

      (

                      select V.patientid, V.name, V.sequenceid, V.starttime, V.endtime, V.status,V.Wardabbr,V.distime, V.patientstatusid, V.Eindtijd, V.Dagnummer, V.Katheterdag

                      from

                                                              (

                                                              select CS.patientid, CS.name, CS.sequenceid, CS.starttime, CS.endtime, CS.status,PI.Wardabbr, PI.distime, PI.patientstatusid,

                                                              case when CS.status = 1

                                                                      then CS.endtime

                                                                      else

                                                                              case when PI.Distime is null then now() else PI.Distime

                                                                              end

                                                              end as Eindtijd,

                                                              Gt3.Getal+(Gt2.Getal*10)+(Gt1.Getal*100)as Dagnummer, Timestampadd(SQL_TSI_DAY, (Gt3.Getal+(Gt2.Getal*10)+(Gt1.Getal*100)),

                                                              CAST(Starttime as date)) as katheterdag

                                                              from tableXX as CS join tableYY as PI on CS.patientid= PI.patientid  , #tmp_Getallen Gt1 , #tmp_Getallen Gt2, #tmp_Getallen Gt3

                                                              Where CS.sequenceid in ( ... some numbers ...) and Gt3.Getal<5

                                                              )v

                      where V.Eindtijd   > '2013-01-01'

                      and starttime < '2014-01-01'

      )B

      where B.katheterdag >= '2013-01-01' and B.Katheterdag <= B.Eindtijd

      group by   B.patientid, B.katheterdag

       

      We see that teiid executes the following query:

       

      SELECT g_0.StartTime, g_0.Status, g_0.EndTime, g_0.PatientID

      FROM tableXX AS g_0, tableYY AS g_1

      WHERE (g_0.PatientID = g_1.PatientID)

      AND (convert(CASE WHEN g_0.Status = 1 THEN g_0.EndTime ELSE CASE WHEN g_1.DisTime IS NULL THEN {ts'2014-02-25 11:13:33.379'} ELSE g_1.DisTime END END, string)

      > '2013-01-01')

      AND (g_0.SequenceID IN (... some variableids ...))

      AND (convert(g_0.StartTime, string) < '2014-01-01')

      GROUP BY g_0.PatientID, g_0.StartTime

       

      And finally throws an exception:

       

      TEIID30019 Unexpected exception for request tNJ4CDtX2tDD.81: org.teiid.core.TeiidComponentException: TEIID30328 Unable to evaluate PI.DisTime: No value was available

              at org.teiid.query.util.CommandContext.getFromContext(CommandContext.java:486) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:639) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:614) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:480) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:229) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:212) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:206) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:1149) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:648) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:1154) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:648) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:614) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:296) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:223) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:249) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:219) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:212) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:206) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.JoinNode.matchesCriteria(JoinNode.java:336) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.MergeJoinStrategy.process(MergeJoinStrategy.java:247) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:211) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:89) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.SortUtility.initialSort(SortUtility.java:269) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.SortUtility.sort(SortUtility.java:202) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.GroupingNode.sortPhase(GroupingNode.java:392) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:331) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:102) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:136) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:159) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:141) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:435) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:320) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:248) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:273) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214) [teiid-engine-8.6.0.Final.jar:8.6.0.Final]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]

              at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

       

      If we execute the generated query separately we get the following exception:

       

      Processing exception for request 1DEKmX4nl271.8 'TEIID30492 [g_0.Status, g_0.EndTime] cannot be used outside of aggregate functions since they are not present in a GROUP BY clause.'. Originally QueryValidatorException Request.java:305. Enable more detailed logging to see the entire stacktrace.

       

       

      A workaround we're currently using is inserting the content of the inner select statement in a tmp table (that contains the column Eindtijd which contains the calculated value for the case statement) and then executing the following statements on this tmp table using this Eindtijd column.

       

       

      With kind regards

      Bram Gadeyne

        • 1. Re: problems with date(time) in case in whereclause
          Steven Hawkins Master

          I would guess that the generated query should be projecting DisTime, but is not.  The full planning log (SHOWPLAN DEBUG) will help determine where things are going astray in planning.  What's most important in the plan tree before and after rule assign output elements.  You can convert this to an issue as an exception is not expected.

           

          Steve

          1 of 1 people found this helpful
          • 2. Re: problems with date(time) in case in whereclause
            Steven Hawkins Master

            Bram,

             

            Do you have some time to look at this more?  The debug log or ideally a representative test case would help track this down.

             

            Thanks,

            Steve

            • 3. Re: problems with date(time) in case in whereclause
              gadeyne.bram Master

              HI Steven,

               

              Here's the DEBUG_LOG for the executed query.

               

               

              ============================================================================

              USER COMMAND:

              SELECT B.PatientID, B.katheterdag FROM (SELECT v.PatientID, v.Name, v.SequenceID, v.StartTime, v.EndTime, v.Status, v.WardAbbr, v.DisTime, v.PatientStatusID, v.Eindtijd, v.Dagnummer, v.katheterdag FROM (SELECT CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag FROM tableYY AS CS INNER JOIN tableXX AS PI ON CS.PatientID = PI.PatientID, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3 WHERE (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (Gt3.getal < 5)) AS v WHERE (convert(v.Eindtijd, string) > '2013-01-01') AND (convert(v.StartTime, string) < '2014-01-01')) AS B WHERE (B.katheterdag >= {d'2013-01-01'}) AND (convert(B.katheterdag, timestamp) <= B.Eindtijd) GROUP BY B.PatientID, B.katheterdag LIMIT 100

               

              ----------------------------------------------------------------------------

              OPTIMIZE:

              SELECT B.PatientID, B.katheterdag FROM (SELECT v.PatientID, v.Name, v.SequenceID, v.StartTime, v.EndTime, v.Status, v.WardAbbr, v.DisTime, v.PatientStatusID, v.Eindtijd, v.Dagnummer, v.katheterdag FROM (SELECT CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag FROM tableYY AS CS INNER JOIN tableXX AS PI ON CS.PatientID = PI.PatientID, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3 WHERE (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (Gt3.getal < 5)) AS v WHERE (convert(v.Eindtijd, string) > '2013-01-01') AND (convert(v.StartTime, string) < '2014-01-01')) AS B WHERE (B.katheterdag >= {d'2013-01-01'}) AND (convert(B.katheterdag, timestamp) <= B.Eindtijd) GROUP BY B.PatientID, B.katheterdag LIMIT 100

               

              ----------------------------------------------------------------------------

              GENERATE CANONICAL:

              SELECT B.PatientID, B.katheterdag FROM (SELECT v.PatientID, v.Name, v.SequenceID, v.StartTime, v.EndTime, v.Status, v.WardAbbr, v.DisTime, v.PatientStatusID, v.Eindtijd, v.Dagnummer, v.katheterdag FROM (SELECT CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag FROM tableYY AS CS INNER JOIN tableXX AS PI ON CS.PatientID = PI.PatientID, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3 WHERE (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (Gt3.getal < 5)) AS v WHERE (convert(v.Eindtijd, string) > '2013-01-01') AND (convert(v.StartTime, string) < '2014-01-01')) AS B WHERE (B.katheterdag >= {d'2013-01-01'}) AND (convert(B.katheterdag, timestamp) <= B.Eindtijd) GROUP BY B.PatientID, B.katheterdag LIMIT 100

               

              CANONICAL PLAN:

              TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100})

                Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag]})

                  Group(groups=[B, anon_grp0], props={GROUP_COLS=[B.PatientID, B.katheterdag], SYMBOL_MAP={anon_grp0.gcol0=B.PatientID, anon_grp0.gcol1=B.katheterdag}})

                    Select(groups=[B], props={SELECT_CRITERIA=convert(B.katheterdag, timestamp) <= B.Eindtijd})

                      Select(groups=[B], props={SELECT_CRITERIA=B.katheterdag >= {d'2013-01-01'}})

                        Source(groups=[B], props={NESTED_COMMAND=SELECT v.PatientID, v.Name, v.SequenceID, v.StartTime, v.EndTime, v.Status, v.WardAbbr, v.DisTime, v.PatientStatusID, v.Eindtijd, v.Dagnummer, v.katheterdag FROM (SELECT CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag FROM (((tableYY AS CS INNER JOIN tableXX AS PI ON CS.PatientID = PI.PatientID) CROSS JOIN #tmp_Getallen AS Gt1) CROSS JOIN #tmp_Getallen AS Gt2) CROSS JOIN #tmp_Getallen AS Gt3 WHERE (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (Gt3.getal < 5)) AS v WHERE (convert(v.Eindtijd, string) > '2013-01-01') AND (convert(v.StartTime, string) < '2014-01-01'), SYMBOL_MAP={B.PatientID=v.PatientID, B.Name=v.Name, B.SequenceID=v.SequenceID, B.StartTime=v.StartTime, B.EndTime=v.EndTime, B.Status=v.Status, B.WardAbbr=v.WardAbbr, B.DisTime=v.DisTime, B.PatientStatusID=v.PatientStatusID, B.Eindtijd=v.Eindtijd, B.Dagnummer=v.Dagnummer, B.katheterdag=v.katheterdag}})

                          Project(groups=[v], props={PROJECT_COLS=[v.PatientID, v.Name, v.SequenceID, v.StartTime, v.EndTime, v.Status, v.WardAbbr, v.DisTime, v.PatientStatusID, v.Eindtijd, v.Dagnummer, v.katheterdag]})

                            Select(groups=[v], props={SELECT_CRITERIA=convert(v.StartTime, string) < '2014-01-01'})

                              Select(groups=[v], props={SELECT_CRITERIA=convert(v.Eindtijd, string) > '2013-01-01'})

                                Source(groups=[v], props={NESTED_COMMAND=SELECT CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag FROM (((tableYY AS CS INNER JOIN tableXX AS PI ON CS.PatientID = PI.PatientID) CROSS JOIN #tmp_Getallen AS Gt1) CROSS JOIN #tmp_Getallen AS Gt2) CROSS JOIN #tmp_Getallen AS Gt3 WHERE (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (Gt3.getal < 5), SYMBOL_MAP={v.PatientID=CS.PatientID, v.Name=CS.Name, v.SequenceID=CS.SequenceID, v.StartTime=CS.StartTime, v.EndTime=CS.EndTime, v.Status=CS.Status, v.WardAbbr=PI.WardAbbr, v.DisTime=PI.DisTime, v.PatientStatusID=PI.PatientStatusID, v.Eindtijd=CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, v.Dagnummer=((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), v.katheterdag=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)}})

                                  Project(groups=[tableXX AS PI, tableYY AS CS, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt3], props={PROJECT_COLS=[CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag]})

                                    Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5})

                                      Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=CS.SequenceID IN (100,200,300,400,500,600,700)})

                                        Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[]})

                                          Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[]})

                                            Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[]})

                                              Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID]})

                                                Source(groups=[tableYY AS CS])

                                                Source(groups=[tableXX AS PI])

                                              Source(groups=[#tmp_Getallen AS Gt1])

                                            Source(groups=[#tmp_Getallen AS Gt2])

                                          Source(groups=[#tmp_Getallen AS Gt3])

               

               

              ============================================================================

              EXECUTING PlaceAccess

               

              AFTER:

              TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100})

                Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag]})

                  Group(groups=[B, anon_grp0], props={GROUP_COLS=[B.PatientID, B.katheterdag], SYMBOL_MAP={anon_grp0.gcol0=B.PatientID, anon_grp0.gcol1=B.katheterdag}})

                    Select(groups=[B], props={SELECT_CRITERIA=convert(B.katheterdag, timestamp) <= B.Eindtijd})

                      Select(groups=[B], props={SELECT_CRITERIA=B.katheterdag >= {d'2013-01-01'}})

                        Source(groups=[B], props={NESTED_COMMAND=SELECT v.PatientID, v.Name, v.SequenceID, v.StartTime, v.EndTime, v.Status, v.WardAbbr, v.DisTime, v.PatientStatusID, v.Eindtijd, v.Dagnummer, v.katheterdag FROM (SELECT CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag FROM (((tableYY AS CS INNER JOIN tableXX AS PI ON CS.PatientID = PI.PatientID) CROSS JOIN #tmp_Getallen AS Gt1) CROSS JOIN #tmp_Getallen AS Gt2) CROSS JOIN #tmp_Getallen AS Gt3 WHERE (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (Gt3.getal < 5)) AS v WHERE (convert(v.Eindtijd, string) > '2013-01-01') AND (convert(v.StartTime, string) < '2014-01-01'), SYMBOL_MAP={B.PatientID=v.PatientID, B.Name=v.Name, B.SequenceID=v.SequenceID, B.StartTime=v.StartTime, B.EndTime=v.EndTime, B.Status=v.Status, B.WardAbbr=v.WardAbbr, B.DisTime=v.DisTime, B.PatientStatusID=v.PatientStatusID, B.Eindtijd=v.Eindtijd, B.Dagnummer=v.Dagnummer, B.katheterdag=v.katheterdag}})

                          Project(groups=[v], props={PROJECT_COLS=[v.PatientID, v.Name, v.SequenceID, v.StartTime, v.EndTime, v.Status, v.WardAbbr, v.DisTime, v.PatientStatusID, v.Eindtijd, v.Dagnummer, v.katheterdag]})

                            Select(groups=[v], props={SELECT_CRITERIA=convert(v.StartTime, string) < '2014-01-01'})

                              Select(groups=[v], props={SELECT_CRITERIA=convert(v.Eindtijd, string) > '2013-01-01'})

                                Source(groups=[v], props={NESTED_COMMAND=SELECT CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag FROM (((tableYY AS CS INNER JOIN tableXX AS PI ON CS.PatientID = PI.PatientID) CROSS JOIN #tmp_Getallen AS Gt1) CROSS JOIN #tmp_Getallen AS Gt2) CROSS JOIN #tmp_Getallen AS Gt3 WHERE (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (Gt3.getal < 5), SYMBOL_MAP={v.PatientID=CS.PatientID, v.Name=CS.Name, v.SequenceID=CS.SequenceID, v.StartTime=CS.StartTime, v.EndTime=CS.EndTime, v.Status=CS.Status, v.WardAbbr=PI.WardAbbr, v.DisTime=PI.DisTime, v.PatientStatusID=PI.PatientStatusID, v.Eindtijd=CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, v.Dagnummer=((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), v.katheterdag=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)}})

                                  Project(groups=[tableXX AS PI, tableYY AS CS, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt3], props={PROJECT_COLS=[CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag]})

                                    Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5})

                                      Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=CS.SequenceID IN (100,200,300,400,500,600,700)})

                                        Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[]})

                                          Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[]})

                                            Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[]})

                                              Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID]})

                                                Access(groups=[tableYY AS CS], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca})

                                                  Source(groups=[tableYY AS CS])

                                                Access(groups=[tableXX AS PI], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca})

                                                  Source(groups=[tableXX AS PI])

                                              Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__})

                                                Source(groups=[#tmp_Getallen AS Gt1])

                                            Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__})

                                              Source(groups=[#tmp_Getallen AS Gt2])

                                          Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__})

                                            Source(groups=[#tmp_Getallen AS Gt3])

               

               

              ============================================================================

              EXECUTING AssignOutputElements

               

              AFTER:

              TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag]})

                Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag], OUTPUT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag]})

                  Group(groups=[B, anon_grp0], props={GROUP_COLS=[B.PatientID, B.katheterdag], SYMBOL_MAP={anon_grp0.gcol0=B.PatientID, anon_grp0.gcol1=B.katheterdag}, OUTPUT_COLS=[anon_grp0.gcol0, anon_grp0.gcol1]})

                    Select(groups=[B], props={SELECT_CRITERIA=convert(B.katheterdag, timestamp) <= B.Eindtijd, OUTPUT_COLS=[B.PatientID, B.katheterdag]})

                      Select(groups=[B], props={SELECT_CRITERIA=B.katheterdag >= {d'2013-01-01'}, OUTPUT_COLS=[B.katheterdag, B.Eindtijd, B.PatientID]})

                        Source(groups=[B], props={NESTED_COMMAND=SELECT v.PatientID, v.Name, v.SequenceID, v.StartTime, v.EndTime, v.Status, v.WardAbbr, v.DisTime, v.PatientStatusID, v.Eindtijd, v.Dagnummer, v.katheterdag FROM (SELECT CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag FROM (((tableYY AS CS INNER JOIN tableXX AS PI ON CS.PatientID = PI.PatientID) CROSS JOIN #tmp_Getallen AS Gt1) CROSS JOIN #tmp_Getallen AS Gt2) CROSS JOIN #tmp_Getallen AS Gt3 WHERE (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (Gt3.getal < 5)) AS v WHERE (convert(v.Eindtijd, string) > '2013-01-01') AND (convert(v.StartTime, string) < '2014-01-01'), SYMBOL_MAP={B.katheterdag=v.katheterdag, B.Eindtijd=v.Eindtijd, B.PatientID=v.PatientID}, OUTPUT_COLS=[B.katheterdag, B.Eindtijd, B.PatientID]})

                          Project(groups=[v], props={PROJECT_COLS=[v.katheterdag, v.Eindtijd, v.PatientID], OUTPUT_COLS=[v.katheterdag, v.Eindtijd, v.PatientID]})

                            Select(groups=[v], props={SELECT_CRITERIA=convert(v.StartTime, string) < '2014-01-01', OUTPUT_COLS=[v.katheterdag, v.Eindtijd, v.PatientID]})

                              Select(groups=[v], props={SELECT_CRITERIA=convert(v.Eindtijd, string) > '2013-01-01', OUTPUT_COLS=[v.StartTime, v.katheterdag, v.Eindtijd, v.PatientID]})

                                Source(groups=[v], props={NESTED_COMMAND=SELECT CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag FROM (((tableYY AS CS INNER JOIN tableXX AS PI ON CS.PatientID = PI.PatientID) CROSS JOIN #tmp_Getallen AS Gt1) CROSS JOIN #tmp_Getallen AS Gt2) CROSS JOIN #tmp_Getallen AS Gt3 WHERE (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (Gt3.getal < 5), SYMBOL_MAP={v.Eindtijd=CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, v.StartTime=CS.StartTime, v.katheterdag=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), v.PatientID=CS.PatientID}, OUTPUT_COLS=[v.Eindtijd, v.StartTime, v.katheterdag, v.PatientID]})

                                  Project(groups=[tableXX AS PI, tableYY AS CS, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt3], props={PROJECT_COLS=[CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, CS.StartTime, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag, CS.PatientID], OUTPUT_COLS=[CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, CS.StartTime, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag, CS.PatientID]})

                                    Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=[CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt3.getal, Gt2.getal, Gt1.getal, CS.PatientID]})

                                      Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=CS.SequenceID IN (100,200,300,400,500,600,700), OUTPUT_COLS=[Gt3.getal, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt2.getal, Gt1.getal, CS.PatientID]})

                                        Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=[CS.SequenceID, Gt3.getal, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt2.getal, Gt1.getal, CS.PatientID]})

                                          Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=[CS.SequenceID, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt2.getal, Gt1.getal, CS.PatientID]})

                                            Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=[CS.SequenceID, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt1.getal, CS.PatientID]})

                                              Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID], OUTPUT_COLS=[CS.SequenceID, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, CS.PatientID]})

                                                Access(groups=[tableYY AS CS], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=[CS.PatientID, CS.SequenceID, CS.Status, CS.EndTime, CS.StartTime]})

                                                  Source(groups=[tableYY AS CS], props={OUTPUT_COLS=[CS.PatientID, CS.SequenceID, CS.Status, CS.EndTime, CS.StartTime]})

                                                Access(groups=[tableXX AS PI], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=[PI.PatientID, PI.DisTime]})

                                                  Source(groups=[tableXX AS PI], props={OUTPUT_COLS=[PI.PatientID, PI.DisTime]})

                                              Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt1.getal]})

                                                Source(groups=[#tmp_Getallen AS Gt1], props={OUTPUT_COLS=[Gt1.getal]})

                                            Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt2.getal]})

                                              Source(groups=[#tmp_Getallen AS Gt2], props={OUTPUT_COLS=[Gt2.getal]})

                                          Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt3.getal]})

                                            Source(groups=[#tmp_Getallen AS Gt3], props={OUTPUT_COLS=[Gt3.getal]})

               

               

              ============================================================================

              EXECUTING PushSelectCriteria

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0])

                  Group(groups=[B, anon_grp0])

                    Select(groups=[B], props={SELECT_CRITERIA=convert(B.katheterdag, timestamp) <= B.Eindtijd, OUTPUT_COLS=[B.PatientID, B.katheterdag], IS_PHANTOM=true})

                      Select(groups=[B], props={SELECT_CRITERIA=B.katheterdag >= {d'2013-01-01'}, OUTPUT_COLS=[B.katheterdag, B.Eindtijd, B.PatientID], IS_PHANTOM=true})

                        Source(groups=[B], props={NESTED_COMMAND=SELECT v.PatientID, v.Name, v.SequenceID, v.StartTime, v.EndTime, v.Status, v.WardAbbr, v.DisTime, v.PatientStatusID, v.Eindtijd, v.Dagnummer, v.katheterdag FROM (SELECT CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag FROM (((tableYY AS CS INNER JOIN tableXX AS PI ON CS.PatientID = PI.PatientID AND convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01') CROSS JOIN #tmp_Getallen AS Gt1) CROSS JOIN #tmp_Getallen AS Gt2) CROSS JOIN #tmp_Getallen AS Gt3 WHERE (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (Gt3.getal < 5)) AS v WHERE (convert(v.Eindtijd, string) > '2013-01-01') AND (convert(v.StartTime, string) < '2014-01-01'), SYMBOL_MAP={B.katheterdag=v.katheterdag, B.Eindtijd=v.Eindtijd, B.PatientID=v.PatientID}, OUTPUT_COLS=[B.katheterdag, B.Eindtijd, B.PatientID]})

                          Project(groups=[v], props={PROJECT_COLS=[v.katheterdag, v.Eindtijd, v.PatientID], OUTPUT_COLS=[v.katheterdag, v.Eindtijd, v.PatientID]})

                            Select(groups=[v], props={SELECT_CRITERIA=convert(v.katheterdag, timestamp) <= v.Eindtijd, IS_PHANTOM=true})

                              Select(groups=[v], props={SELECT_CRITERIA=v.katheterdag >= {d'2013-01-01'}, IS_PHANTOM=true})

                                Select(groups=[v], props={SELECT_CRITERIA=convert(v.StartTime, string) < '2014-01-01', OUTPUT_COLS=[v.katheterdag, v.Eindtijd, v.PatientID], IS_PHANTOM=true})

                                  Select(groups=[v], props={SELECT_CRITERIA=convert(v.Eindtijd, string) > '2013-01-01', OUTPUT_COLS=[v.StartTime, v.katheterdag, v.Eindtijd, v.PatientID], IS_PHANTOM=true})

                                    Source(groups=[v], props={NESTED_COMMAND=SELECT CS.PatientID, CS.Name, CS.SequenceID, CS.StartTime, CS.EndTime, CS.Status, PI.WardAbbr, PI.DisTime, PI.PatientStatusID, CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)) AS Dagnummer, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag FROM (((tableYY AS CS INNER JOIN tableXX AS PI ON CS.PatientID = PI.PatientID AND convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01') CROSS JOIN #tmp_Getallen AS Gt1) CROSS JOIN #tmp_Getallen AS Gt2) CROSS JOIN #tmp_Getallen AS Gt3 WHERE (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (Gt3.getal < 5), SYMBOL_MAP={v.Eindtijd=CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, v.StartTime=CS.StartTime, v.katheterdag=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), v.PatientID=CS.PatientID}, OUTPUT_COLS=[v.Eindtijd, v.StartTime, v.katheterdag, v.PatientID]})

                                      Project(groups=[tableXX AS PI, tableYY AS CS, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt3], props={PROJECT_COLS=[CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, CS.StartTime, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag, CS.PatientID], OUTPUT_COLS=[CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END AS Eindtijd, CS.StartTime, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) AS katheterdag, CS.PatientID]})

                                        Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END], OUTPUT_COLS=[CS.SequenceID, Gt3.getal, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt2.getal, Gt1.getal, CS.PatientID]})

                                          Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=[CS.SequenceID, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt2.getal, Gt1.getal, CS.PatientID]})

                                            Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=[CS.SequenceID, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt1.getal, CS.PatientID]})

                                              Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID, convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01'], OUTPUT_COLS=[CS.SequenceID, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, CS.PatientID]})

                                                Access(groups=[tableYY AS CS], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=[CS.PatientID, CS.SequenceID, CS.Status, CS.EndTime, CS.StartTime]})

                                                  Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=(CS.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(CS.StartTime, string) < '2014-01-01')})

                                                    Source(groups=[tableYY AS CS], props={OUTPUT_COLS=[CS.PatientID, CS.SequenceID, CS.Status, CS.EndTime, CS.StartTime]})

                                                Access(groups=[tableXX AS PI])

                                                  Source(groups=[tableXX AS PI])

                                              Access(groups=[#tmp_Getallen AS Gt1])

                                                Source(groups=[#tmp_Getallen AS Gt1])

                                            Access(groups=[#tmp_Getallen AS Gt2])

                                              Source(groups=[#tmp_Getallen AS Gt2])

                                          Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=[CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt3.getal, Gt2.getal, Gt1.getal, CS.PatientID]})

                                            Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt3.getal]})

                                              Source(groups=[#tmp_Getallen AS Gt3])

               

               

              ============================================================================

              EXECUTING MergeVirtual

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag], OUTPUT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag]})

                  Group(groups=[tableYY AS CS, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0], props={GROUP_COLS=[CS.PatientID, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)], SYMBOL_MAP={anon_grp0.gcol0=CS.PatientID, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)}, OUTPUT_COLS=[anon_grp0.gcol0, anon_grp0.gcol1]})

                    Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS, tableXX AS PI], props={SELECT_CRITERIA=convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, OUTPUT_COLS=[B.PatientID, B.katheterdag], IS_PHANTOM=true})

                      Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS], props={SELECT_CRITERIA=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, OUTPUT_COLS=[B.katheterdag, B.Eindtijd, B.PatientID], IS_PHANTOM=true})

                        Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS, tableXX AS PI], props={SELECT_CRITERIA=convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, IS_PHANTOM=true})

                          Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS], props={SELECT_CRITERIA=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, IS_PHANTOM=true})

                            Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=convert(CS.StartTime, string) < '2014-01-01', OUTPUT_COLS=[v.katheterdag, v.Eindtijd, v.PatientID], IS_PHANTOM=true})

                              Select(groups=[tableYY AS CS, tableXX AS PI], props={SELECT_CRITERIA=convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01', OUTPUT_COLS=[v.StartTime, v.katheterdag, v.Eindtijd, v.PatientID], IS_PHANTOM=true})

                                Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END], OUTPUT_COLS=[CS.SequenceID, Gt3.getal, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt2.getal, Gt1.getal, CS.PatientID]})

                                  Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2])

                                    Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1])

                                      Join(groups=[tableYY AS CS, tableXX AS PI])

                                        Access(groups=[tableYY AS CS])

                                          Select(groups=[tableYY AS CS])

                                            Source(groups=[tableYY AS CS])

                                        Access(groups=[tableXX AS PI])

                                          Source(groups=[tableXX AS PI])

                                      Access(groups=[#tmp_Getallen AS Gt1])

                                        Source(groups=[#tmp_Getallen AS Gt1])

                                    Access(groups=[#tmp_Getallen AS Gt2])

                                      Source(groups=[#tmp_Getallen AS Gt2])

                                  Select(groups=[#tmp_Getallen AS Gt3])

                                    Access(groups=[#tmp_Getallen AS Gt3])

                                      Source(groups=[#tmp_Getallen AS Gt3])

               

               

              ============================================================================

              EXECUTING PushNonJoinCriteria

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0])

                  Group(groups=[tableYY AS CS, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0])

                    Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS, tableXX AS PI])

                      Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS])

                        Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS, tableXX AS PI])

                          Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS])

                            Select(groups=[tableYY AS CS])

                              Select(groups=[tableYY AS CS, tableXX AS PI])

                                Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END], OUTPUT_COLS=[CS.SequenceID, Gt3.getal, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt2.getal, Gt1.getal, CS.PatientID]})

                                  Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=[CS.SequenceID, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt2.getal, Gt1.getal, CS.PatientID]})

                                    Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=[CS.SequenceID, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, Gt1.getal, CS.PatientID]})

                                      Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID, convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01'], OUTPUT_COLS=[CS.SequenceID, CS.Status, CS.EndTime, PI.DisTime, CS.StartTime, CS.PatientID]})

                                        Access(groups=[tableYY AS CS])

                                          Select(groups=[tableYY AS CS])

                                            Source(groups=[tableYY AS CS])

                                        Access(groups=[tableXX AS PI])

                                          Source(groups=[tableXX AS PI])

                                      Access(groups=[#tmp_Getallen AS Gt1])

                                        Source(groups=[#tmp_Getallen AS Gt1])

                                    Access(groups=[#tmp_Getallen AS Gt2])

                                      Source(groups=[#tmp_Getallen AS Gt2])

                                  Select(groups=[#tmp_Getallen AS Gt3])

                                    Access(groups=[#tmp_Getallen AS Gt3])

                                      Source(groups=[#tmp_Getallen AS Gt3])

               

               

              ============================================================================

              EXECUTING CleanCriteria

               

              AFTER:

              TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=null})

                Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag], OUTPUT_COLS=null})

                  Group(groups=[tableYY AS CS, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0], props={GROUP_COLS=[CS.PatientID, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)], SYMBOL_MAP={anon_grp0.gcol0=CS.PatientID, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)}, OUTPUT_COLS=null})

                    Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS, tableXX AS PI], props={SELECT_CRITERIA=convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, OUTPUT_COLS=null, IS_PHANTOM=true})

                      Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS], props={SELECT_CRITERIA=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, OUTPUT_COLS=null, IS_PHANTOM=true})

                        Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS, tableXX AS PI], props={SELECT_CRITERIA=convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, IS_PHANTOM=true, OUTPUT_COLS=null})

                          Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS], props={SELECT_CRITERIA=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, IS_PHANTOM=true, OUTPUT_COLS=null})

                            Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=convert(CS.StartTime, string) < '2014-01-01', OUTPUT_COLS=null, IS_PHANTOM=true})

                              Select(groups=[tableYY AS CS, tableXX AS PI], props={SELECT_CRITERIA=convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01', OUTPUT_COLS=null, IS_PHANTOM=true})

                                Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END], OUTPUT_COLS=null})

                                  Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=null})

                                    Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=null})

                                      Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID, convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01'], OUTPUT_COLS=null})

                                        Access(groups=[tableYY AS CS], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=null})

                                          Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=(CS.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(CS.StartTime, string) < '2014-01-01'), OUTPUT_COLS=null})

                                            Source(groups=[tableYY AS CS], props={OUTPUT_COLS=null})

                                        Access(groups=[tableXX AS PI], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=null})

                                          Source(groups=[tableXX AS PI], props={OUTPUT_COLS=null})

                                      Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null})

                                        Source(groups=[#tmp_Getallen AS Gt1], props={OUTPUT_COLS=null})

                                    Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null})

                                      Source(groups=[#tmp_Getallen AS Gt2], props={OUTPUT_COLS=null})

                                  Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=null})

                                    Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null})

                                      Source(groups=[#tmp_Getallen AS Gt3], props={OUTPUT_COLS=null})

               

               

              ============================================================================

              EXECUTING RaiseAccess

              LOW Relational Planner Negation is not supported by source __TEMP__ - Gt3.getal < 5 was not pushed

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0])

                  Group(groups=[tableYY AS CS, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0])

                    Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS, tableXX AS PI])

                      Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS])

                        Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS, tableXX AS PI])

                          Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS])

                            Select(groups=[tableYY AS CS])

                              Select(groups=[tableYY AS CS, tableXX AS PI])

                                Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END], OUTPUT_COLS=null})

                                  Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=null})

                                    Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=null})

                                      Access(groups=[tableYY AS CS, tableXX AS PI], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=null, CONFORMED_SOURCES=null})

                                        Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID, convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01'], OUTPUT_COLS=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca})

                                          Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=(CS.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(CS.StartTime, string) < '2014-01-01'), OUTPUT_COLS=null})

                                            Source(groups=[tableYY AS CS])

                                          Source(groups=[tableXX AS PI], props={OUTPUT_COLS=null})

                                      Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null})

                                        Source(groups=[#tmp_Getallen AS Gt1])

                                    Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null})

                                      Source(groups=[#tmp_Getallen AS Gt2])

                                  Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=null})

                                    Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null})

                                      Source(groups=[#tmp_Getallen AS Gt3])

               

               

              ============================================================================

              EXECUTING CopyCriteria

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0])

                  Group(groups=[tableYY AS CS, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0])

                    Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS, tableXX AS PI], props={SELECT_CRITERIA=convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, OUTPUT_COLS=null, IS_PHANTOM=true, IS_COPIED=true})

                      Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS], props={SELECT_CRITERIA=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, OUTPUT_COLS=null, IS_PHANTOM=true, IS_COPIED=true})

                        Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS, tableXX AS PI], props={SELECT_CRITERIA=convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, IS_PHANTOM=true, OUTPUT_COLS=null, IS_COPIED=true})

                          Select(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, tableYY AS CS], props={SELECT_CRITERIA=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, IS_PHANTOM=true, OUTPUT_COLS=null, IS_COPIED=true})

                            Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=convert(CS.StartTime, string) < '2014-01-01', OUTPUT_COLS=null, IS_PHANTOM=true, IS_COPIED=true})

                              Select(groups=[tableYY AS CS, tableXX AS PI], props={SELECT_CRITERIA=convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01', OUTPUT_COLS=null, IS_PHANTOM=true, IS_COPIED=true})

                                Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END], OUTPUT_COLS=null, IS_COPIED=true})

                                  Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=null, IS_COPIED=true})

                                    Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=null, IS_COPIED=true})

                                      Access(groups=[tableYY AS CS, tableXX AS PI])

                                        Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID, convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01'], OUTPUT_COLS=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, IS_COPIED=true})

                                          Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=(CS.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(CS.StartTime, string) < '2014-01-01'), OUTPUT_COLS=null, IS_COPIED=true})

                                            Source(groups=[tableYY AS CS])

                                          Source(groups=[tableXX AS PI])

                                      Access(groups=[#tmp_Getallen AS Gt1])

                                        Source(groups=[#tmp_Getallen AS Gt1])

                                    Access(groups=[#tmp_Getallen AS Gt2])

                                      Source(groups=[#tmp_Getallen AS Gt2])

                                  Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=null, IS_COPIED=true})

                                    Access(groups=[#tmp_Getallen AS Gt3])

                                      Source(groups=[#tmp_Getallen AS Gt3])

               

               

              ============================================================================

              EXECUTING CleanCriteria

               

              AFTER:

              TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=null})

                Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag], OUTPUT_COLS=null})

                  Group(groups=[tableYY AS CS, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0], props={GROUP_COLS=[CS.PatientID, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)], SYMBOL_MAP={anon_grp0.gcol0=CS.PatientID, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)}, OUTPUT_COLS=null})

                    Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt3], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END], OUTPUT_COLS=null, IS_COPIED=true})

                      Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=null, IS_COPIED=true})

                        Join(groups=[tableYY AS CS, tableXX AS PI, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[], OUTPUT_COLS=null, IS_COPIED=true})

                          Access(groups=[tableYY AS CS, tableXX AS PI], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=null, CONFORMED_SOURCES=null})

                            Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID, convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01'], OUTPUT_COLS=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, IS_COPIED=true})

                              Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=(CS.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(CS.StartTime, string) < '2014-01-01'), OUTPUT_COLS=null, IS_COPIED=true})

                                Source(groups=[tableYY AS CS], props={OUTPUT_COLS=null})

                              Source(groups=[tableXX AS PI], props={OUTPUT_COLS=null})

                          Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null})

                            Source(groups=[#tmp_Getallen AS Gt1], props={OUTPUT_COLS=null})

                        Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null})

                          Source(groups=[#tmp_Getallen AS Gt2], props={OUTPUT_COLS=null})

                      Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=null, IS_COPIED=true})

                        Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null})

                          Source(groups=[#tmp_Getallen AS Gt3], props={OUTPUT_COLS=null})

               

               

              ============================================================================

              EXECUTING PlanJoins

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0])

                  Group(groups=[tableYY AS CS, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0], props={GROUP_COLS=[CS.PatientID, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)], SYMBOL_MAP={anon_grp0.gcol0=CS.PatientID, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)}, OUTPUT_COLS=null})

                    Select(groups=[tableXX AS PI, tableYY AS CS, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt3], props={SELECT_CRITERIA=convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, EST_SELECTIVITY=0.33333334})

                      Select(groups=[tableYY AS CS, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt3], props={SELECT_CRITERIA=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, EST_SELECTIVITY=0.33333334})

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP})

                          Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP})

                            Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP})

                              Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=null, IS_COPIED=true, EST_CARDINALITY=3.3333333, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}})

                                Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}})

                                  Source(groups=[#tmp_Getallen AS Gt3], props={OUTPUT_COLS=null, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}, EST_CARDINALITY=10.0})

                              Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt1.getal=[-1.0, -1.0]}})

                                Source(groups=[#tmp_Getallen AS Gt1], props={OUTPUT_COLS=null, EST_COL_STATS={Gt1.getal=[-1.0, -1.0]}, EST_CARDINALITY=10.0})

                            Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt2.getal=[-1.0, -1.0]}})

                              Source(groups=[#tmp_Getallen AS Gt2], props={OUTPUT_COLS=null, EST_COL_STATS={Gt2.getal=[-1.0, -1.0]}, EST_CARDINALITY=10.0})

                          Access(groups=[tableYY AS CS, tableXX AS PI], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=null, CONFORMED_SOURCES=null, EST_CARDINALITY=-1.0})

                            Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID, convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01'], OUTPUT_COLS=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, IS_COPIED=true, EST_CARDINALITY=-1.0})

                              Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=(CS.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(CS.StartTime, string) < '2014-01-01'), OUTPUT_COLS=null, IS_COPIED=true, EST_CARDINALITY=-1.0})

                                Source(groups=[tableYY AS CS], props={OUTPUT_COLS=null, EST_COL_STATS={CS.EndActorID=[-1.0, -1.0], CS.EndTime=[-1.0, -1.0], CS.Instructions=[-1.0, -1.0], CS."Interval"=[-1.0, -1.0], ...}, EST_CARDINALITY=-1.0})

                              Source(groups=[tableXX AS PI], props={OUTPUT_COLS=null, EST_COL_STATS={PI.PatientID=[-1.0, -1.0], PI.PatientCode=[-1.0, -1.0], PI.PatientNumber=[-1.0, -1.0], PI.PatientSSN=[-1.0, -1.0], ...}, EST_CARDINALITY=-1.0})

               

               

              ============================================================================

              EXECUTING PushSelectCriteria

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0])

                  Group(groups=[tableYY AS CS, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0], props={GROUP_COLS=[CS.PatientID, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)], SYMBOL_MAP={anon_grp0.gcol0=CS.PatientID, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date)}, OUTPUT_COLS=null})

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END]})

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2])

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1])

                          Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=null, IS_COPIED=true, EST_CARDINALITY=3.3333333, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}})

                            Access(groups=[#tmp_Getallen AS Gt3])

                              Source(groups=[#tmp_Getallen AS Gt3])

                          Access(groups=[#tmp_Getallen AS Gt1])

                            Source(groups=[#tmp_Getallen AS Gt1])

                        Access(groups=[#tmp_Getallen AS Gt2])

                          Source(groups=[#tmp_Getallen AS Gt2])

                      Access(groups=[tableYY AS CS, tableXX AS PI])

                        Join(groups=[tableYY AS CS, tableXX AS PI])

                          Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=(CS.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(CS.StartTime, string) < '2014-01-01'), OUTPUT_COLS=null, IS_COPIED=true, EST_CARDINALITY=-1.0})

                            Source(groups=[tableYY AS CS])

                          Source(groups=[tableXX AS PI])

               

               

              ============================================================================

              EXECUTING RaiseAccess

              LOW Relational Planner Negation is not supported by source __TEMP__ - Gt3.getal < 5 was not pushed

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0])

                  Group(groups=[tableYY AS CS, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0])

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END]})

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP})

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP})

                          Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=null, IS_COPIED=true, EST_CARDINALITY=3.3333333, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}})

                            Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}})

                              Source(groups=[#tmp_Getallen AS Gt3])

                          Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt1.getal=[-1.0, -1.0]}})

                            Source(groups=[#tmp_Getallen AS Gt1])

                        Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt2.getal=[-1.0, -1.0]}})

                          Source(groups=[#tmp_Getallen AS Gt2])

                      Access(groups=[tableYY AS CS, tableXX AS PI], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=null, CONFORMED_SOURCES=null, EST_CARDINALITY=-1.0})

                        Join(groups=[tableYY AS CS, tableXX AS PI])

                          Select(groups=[tableYY AS CS])

                            Source(groups=[tableYY AS CS])

                          Source(groups=[tableXX AS PI])

               

               

              ============================================================================

              EXECUTING ChooseJoinStrategy

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0])

                  Group(groups=[tableYY AS CS, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0])

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END]})

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP})

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP})

                          Select(groups=[#tmp_Getallen AS Gt3])

                            Access(groups=[#tmp_Getallen AS Gt3])

                              Source(groups=[#tmp_Getallen AS Gt3])

                          Access(groups=[#tmp_Getallen AS Gt1])

                            Source(groups=[#tmp_Getallen AS Gt1])

                        Access(groups=[#tmp_Getallen AS Gt2])

                          Source(groups=[#tmp_Getallen AS Gt2])

                      Access(groups=[tableYY AS CS, tableXX AS PI])

                        Join(groups=[tableYY AS CS, tableXX AS PI])

                          Select(groups=[tableYY AS CS])

                            Source(groups=[tableYY AS CS])

                          Source(groups=[tableXX AS PI])

               

               

              ============================================================================

              EXECUTING ChooseDependent

              LOW Relational Planner parent join has no equa-join predicates - Rejecting dependent join Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP}

              LOW Relational Planner parent join has no equa-join predicates - Rejecting dependent join Access(groups=[tableYY AS CS, tableXX AS PI], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=null, CONFORMED_SOURCES=null, EST_CARDINALITY=-1.0}

              LOW Relational Planner parent join is CROSS - Rejecting dependent join Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP}

              LOW Relational Planner parent join is CROSS - Rejecting dependent join Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt2.getal=[-1.0, -1.0]}}

              LOW Relational Planner parent join is CROSS - Rejecting dependent join Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}}

              LOW Relational Planner parent join is CROSS - Rejecting dependent join Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt1.getal=[-1.0, -1.0]}}

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0])

                  Group(groups=[tableYY AS CS, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0])

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(CS.StartTime, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END]})

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP})

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP})

                          Select(groups=[#tmp_Getallen AS Gt3])

                            Access(groups=[#tmp_Getallen AS Gt3])

                              Source(groups=[#tmp_Getallen AS Gt3])

                          Access(groups=[#tmp_Getallen AS Gt1])

                            Source(groups=[#tmp_Getallen AS Gt1])

                        Access(groups=[#tmp_Getallen AS Gt2])

                          Source(groups=[#tmp_Getallen AS Gt2])

                      Access(groups=[tableYY AS CS, tableXX AS PI])

                        Join(groups=[tableYY AS CS, tableXX AS PI])

                          Select(groups=[tableYY AS CS])

                            Source(groups=[tableYY AS CS])

                          Source(groups=[tableXX AS PI])

               

               

              ============================================================================

              EXECUTING PushAggregates

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag], OUTPUT_COLS=null})

                  Group(groups=[anon_grp1, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0], props={GROUP_COLS=[anon_grp1.gcol0, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)], SYMBOL_MAP={anon_grp0.gcol0=anon_grp1.gcol0, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)}, OUTPUT_COLS=null})

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, anon_grp1], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END]})

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2])

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1])

                          Select(groups=[#tmp_Getallen AS Gt3])

                            Access(groups=[#tmp_Getallen AS Gt3])

                              Source(groups=[#tmp_Getallen AS Gt3])

                          Access(groups=[#tmp_Getallen AS Gt1])

                            Source(groups=[#tmp_Getallen AS Gt1])

                        Access(groups=[#tmp_Getallen AS Gt2])

                          Source(groups=[#tmp_Getallen AS Gt2])

                      Access(groups=[tableYY AS CS, anon_grp1], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=null, CONFORMED_SOURCES=null})

                        Group(groups=[tableYY AS CS, anon_grp1], props={GROUP_COLS=[CS.PatientID, CS.StartTime], SYMBOL_MAP={anon_grp1.gcol0=CS.PatientID, anon_grp1.gcol1=CS.StartTime}})

                          Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID, convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01'], OUTPUT_COLS=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, IS_COPIED=true, EST_CARDINALITY=-1.0})

                            Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=(CS.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(CS.StartTime, string) < '2014-01-01'), OUTPUT_COLS=null, IS_COPIED=true, EST_CARDINALITY=-1.0})

                              Source(groups=[tableYY AS CS], props={OUTPUT_COLS=null, EST_COL_STATS={CS.EndActorID=[-1.0, -1.0], CS.EndTime=[-1.0, -1.0], CS.Instructions=[-1.0, -1.0], CS."Interval"=[-1.0, -1.0], ...}, EST_CARDINALITY=-1.0})

                            Source(groups=[tableXX AS PI], props={OUTPUT_COLS=null, EST_COL_STATS={PI.PatientID=[-1.0, -1.0], PI.PatientCode=[-1.0, -1.0], PI.PatientNumber=[-1.0, -1.0], PI.PatientSSN=[-1.0, -1.0], ...}, EST_CARDINALITY=-1.0})

               

               

              ============================================================================

              EXECUTING ChooseDependent

              LOW Relational Planner parent join has no equa-join predicates - Rejecting dependent join Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP}

              LOW Relational Planner parent join has no equa-join predicates - Rejecting dependent join Access(groups=[tableYY AS CS, anon_grp1], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=null, CONFORMED_SOURCES=null}

              LOW Relational Planner parent join is CROSS - Rejecting dependent join Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP}

              LOW Relational Planner parent join is CROSS - Rejecting dependent join Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt2.getal=[-1.0, -1.0]}}

              LOW Relational Planner parent join is CROSS - Rejecting dependent join Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}}

              LOW Relational Planner parent join is CROSS - Rejecting dependent join Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=null, EST_CARDINALITY=10.0, EST_COL_STATS={Gt1.getal=[-1.0, -1.0]}}

               

              AFTER:

              TupleLimit(groups=[])

                Project(groups=[anon_grp0])

                  Group(groups=[anon_grp1, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0])

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, anon_grp1], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END]})

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP})

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP})

                          Select(groups=[#tmp_Getallen AS Gt3])

                            Access(groups=[#tmp_Getallen AS Gt3])

                              Source(groups=[#tmp_Getallen AS Gt3])

                          Access(groups=[#tmp_Getallen AS Gt1])

                            Source(groups=[#tmp_Getallen AS Gt1])

                        Access(groups=[#tmp_Getallen AS Gt2])

                          Source(groups=[#tmp_Getallen AS Gt2])

                      Access(groups=[tableYY AS CS, anon_grp1])

                        Group(groups=[tableYY AS CS, anon_grp1])

                          Join(groups=[tableYY AS CS, tableXX AS PI])

                            Select(groups=[tableYY AS CS])

                              Source(groups=[tableYY AS CS])

                            Source(groups=[tableXX AS PI])

               

               

              ============================================================================

              EXECUTING PushLimit

               

              AFTER:

              Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag], OUTPUT_COLS=null, SOURCE_HINT=null})

                TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=null})

                  Group(groups=[anon_grp1, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0], props={GROUP_COLS=[anon_grp1.gcol0, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)], SYMBOL_MAP={anon_grp0.gcol0=anon_grp1.gcol0, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)}, OUTPUT_COLS=null})

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, anon_grp1])

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2])

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1])

                          Select(groups=[#tmp_Getallen AS Gt3])

                            Access(groups=[#tmp_Getallen AS Gt3])

                              Source(groups=[#tmp_Getallen AS Gt3])

                          Access(groups=[#tmp_Getallen AS Gt1])

                            Source(groups=[#tmp_Getallen AS Gt1])

                        Access(groups=[#tmp_Getallen AS Gt2])

                          Source(groups=[#tmp_Getallen AS Gt2])

                      Access(groups=[tableYY AS CS, anon_grp1])

                        Group(groups=[tableYY AS CS, anon_grp1])

                          Join(groups=[tableYY AS CS, tableXX AS PI])

                            Select(groups=[tableYY AS CS])

                              Source(groups=[tableYY AS CS])

                            Source(groups=[tableXX AS PI])

               

               

              ============================================================================

              EXECUTING AssignOutputElements

               

              AFTER:

              Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag], OUTPUT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag], SOURCE_HINT=null})

                TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=[anon_grp0.gcol0, anon_grp0.gcol1]})

                  Group(groups=[anon_grp1, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0], props={GROUP_COLS=[anon_grp1.gcol0, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)], SYMBOL_MAP={anon_grp0.gcol0=anon_grp1.gcol0, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)}, OUTPUT_COLS=[anon_grp0.gcol0, anon_grp0.gcol1]})

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, anon_grp1], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END], OUTPUT_COLS=[anon_grp1.gcol0, Gt3.getal, Gt2.getal, Gt1.getal, anon_grp1.gcol1]})

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, OUTPUT_COLS=[Gt3.getal, Gt2.getal, Gt1.getal]})

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, OUTPUT_COLS=[Gt3.getal, Gt1.getal]})

                          Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=[Gt3.getal], IS_COPIED=true, EST_CARDINALITY=3.3333333, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}})

                            Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt3.getal], EST_CARDINALITY=10.0, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}})

                              Source(groups=[#tmp_Getallen AS Gt3], props={OUTPUT_COLS=[Gt3.getal], EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}, EST_CARDINALITY=10.0})

                          Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt1.getal], EST_CARDINALITY=10.0, EST_COL_STATS={Gt1.getal=[-1.0, -1.0]}})

                            Source(groups=[#tmp_Getallen AS Gt1], props={OUTPUT_COLS=[Gt1.getal], EST_COL_STATS={Gt1.getal=[-1.0, -1.0]}, EST_CARDINALITY=10.0})

                        Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt2.getal], EST_CARDINALITY=10.0, EST_COL_STATS={Gt2.getal=[-1.0, -1.0]}})

                          Source(groups=[#tmp_Getallen AS Gt2], props={OUTPUT_COLS=[Gt2.getal], EST_COL_STATS={Gt2.getal=[-1.0, -1.0]}, EST_CARDINALITY=10.0})

                      Access(groups=[tableYY AS CS, anon_grp1], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=[anon_grp1.gcol1, CS.Status, CS.EndTime, anon_grp1.gcol0], CONFORMED_SOURCES=null})

                        Group(groups=[tableYY AS CS, anon_grp1], props={GROUP_COLS=[CS.PatientID, CS.StartTime], SYMBOL_MAP={anon_grp1.gcol0=CS.PatientID, anon_grp1.gcol1=CS.StartTime}, OUTPUT_COLS=[anon_grp1.gcol1, CS.Status, CS.EndTime, anon_grp1.gcol0]})

                          Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID, convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01'], OUTPUT_COLS=[CS.PatientID, CS.StartTime], MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, IS_COPIED=true, EST_CARDINALITY=-1.0})

                            Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=(CS.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(CS.StartTime, string) < '2014-01-01'), OUTPUT_COLS=[CS.PatientID, CS.Status, CS.EndTime, CS.StartTime], IS_COPIED=true, EST_CARDINALITY=-1.0})

                              Source(groups=[tableYY AS CS], props={OUTPUT_COLS=[CS.SequenceID, CS.StartTime, CS.PatientID, CS.Status, CS.EndTime], EST_COL_STATS={CS.EndActorID=[-1.0, -1.0], CS.EndTime=[-1.0, -1.0], CS.Instructions=[-1.0, -1.0], CS."Interval"=[-1.0, -1.0], ...}, EST_CARDINALITY=-1.0})

                            Source(groups=[tableXX AS PI], props={OUTPUT_COLS=[PI.PatientID, PI.DisTime], EST_COL_STATS={PI.PatientID=[-1.0, -1.0], PI.PatientCode=[-1.0, -1.0], PI.PatientNumber=[-1.0, -1.0], PI.PatientSSN=[-1.0, -1.0], ...}, EST_CARDINALITY=-1.0})

               

               

              ============================================================================

              EXECUTING CalculateCost

               

              AFTER:

              Project(groups=[anon_grp0], props={PROJECT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag], OUTPUT_COLS=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag], SOURCE_HINT=null, EST_CARDINALITY=100.0, EST_COL_STATS={anon_grp0.gcol0 AS PatientID=[100.0, 1.0], anon_grp0.gcol1 AS katheterdag=[100.0, 1.0]}})

                TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=[anon_grp0.gcol0, anon_grp0.gcol1], EST_CARDINALITY=100.0, EST_COL_STATS={anon_grp0.gcol0=[100.0, 0.0], anon_grp0.gcol1=[100.0, 0.0]}})

                  Group(groups=[anon_grp1, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0], props={GROUP_COLS=[anon_grp1.gcol0, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)], SYMBOL_MAP={anon_grp0.gcol0=anon_grp1.gcol0, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)}, OUTPUT_COLS=[anon_grp0.gcol0, anon_grp0.gcol1], EST_CARDINALITY=-1.0})

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, anon_grp1], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END], OUTPUT_COLS=[anon_grp1.gcol0, Gt3.getal, Gt2.getal, Gt1.getal, anon_grp1.gcol1], EST_CARDINALITY=-1.0})

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, OUTPUT_COLS=[Gt3.getal, Gt2.getal, Gt1.getal], EST_CARDINALITY=333.3333, EST_COL_STATS={Gt3.getal=[-1.0, -1.0], Gt2.getal=[-1.0, -1.0], Gt1.getal=[-1.0, -1.0]}})

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, OUTPUT_COLS=[Gt3.getal, Gt1.getal], EST_CARDINALITY=33.333332, EST_COL_STATS={Gt3.getal=[-1.0, -1.0], Gt1.getal=[-1.0, -1.0]}})

                          Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=[Gt3.getal], IS_COPIED=true, EST_CARDINALITY=3.3333333, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}})

                            Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt3.getal], EST_CARDINALITY=10.0, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}})

                              Source(groups=[#tmp_Getallen AS Gt3], props={OUTPUT_COLS=[Gt3.getal], EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}, EST_CARDINALITY=10.0})

                          Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt1.getal], EST_CARDINALITY=10.0, EST_COL_STATS={Gt1.getal=[-1.0, -1.0]}})

                            Source(groups=[#tmp_Getallen AS Gt1], props={OUTPUT_COLS=[Gt1.getal], EST_COL_STATS={Gt1.getal=[-1.0, -1.0]}, EST_CARDINALITY=10.0})

                        Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt2.getal], EST_CARDINALITY=10.0, EST_COL_STATS={Gt2.getal=[-1.0, -1.0]}})

                          Source(groups=[#tmp_Getallen AS Gt2], props={OUTPUT_COLS=[Gt2.getal], EST_COL_STATS={Gt2.getal=[-1.0, -1.0]}, EST_CARDINALITY=10.0})

                      Access(groups=[tableYY AS CS, anon_grp1], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=[anon_grp1.gcol1, CS.Status, CS.EndTime, anon_grp1.gcol0], CONFORMED_SOURCES=null, EST_CARDINALITY=-1.0})

                        Group(groups=[tableYY AS CS, anon_grp1], props={GROUP_COLS=[CS.PatientID, CS.StartTime], SYMBOL_MAP={anon_grp1.gcol0=CS.PatientID, anon_grp1.gcol1=CS.StartTime}, OUTPUT_COLS=[anon_grp1.gcol1, CS.Status, CS.EndTime, anon_grp1.gcol0], EST_CARDINALITY=-1.0})

                          Join(groups=[tableYY AS CS, tableXX AS PI], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[CS.PatientID = PI.PatientID, convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01'], OUTPUT_COLS=[CS.PatientID, CS.StartTime], MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, IS_COPIED=true, EST_CARDINALITY=-1.0})

                            Select(groups=[tableYY AS CS], props={SELECT_CRITERIA=(CS.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(CS.StartTime, string) < '2014-01-01'), OUTPUT_COLS=[CS.PatientID, CS.Status, CS.EndTime, CS.StartTime], IS_COPIED=true, EST_CARDINALITY=-1.0})

                              Source(groups=[tableYY AS CS], props={OUTPUT_COLS=[CS.SequenceID, CS.StartTime, CS.PatientID, CS.Status, CS.EndTime], EST_COL_STATS={CS.EndActorID=[-1.0, -1.0], CS.EndTime=[-1.0, -1.0], CS.Instructions=[-1.0, -1.0], CS."Interval"=[-1.0, -1.0], ...}, EST_CARDINALITY=-1.0})

                            Source(groups=[tableXX AS PI], props={OUTPUT_COLS=[PI.PatientID, PI.DisTime], EST_COL_STATS={PI.PatientID=[-1.0, -1.0], PI.PatientCode=[-1.0, -1.0], PI.PatientNumber=[-1.0, -1.0], PI.PatientSSN=[-1.0, -1.0], ...}, EST_CARDINALITY=-1.0})

               

               

              ============================================================================

              EXECUTING ImplementJoinStrategy

               

              AFTER:

              Project(groups=[anon_grp0])

                TupleLimit(groups=[])

                  Group(groups=[anon_grp1, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0])

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, anon_grp1], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END], OUTPUT_COLS=[anon_grp1.gcol0, Gt3.getal, Gt2.getal, Gt1.getal, anon_grp1.gcol1], EST_CARDINALITY=-1.0})

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, OUTPUT_COLS=[Gt3.getal, Gt2.getal, Gt1.getal], EST_CARDINALITY=333.3333, EST_COL_STATS={Gt3.getal=[-1.0, -1.0], Gt2.getal=[-1.0, -1.0], Gt1.getal=[-1.0, -1.0]}})

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, OUTPUT_COLS=[Gt3.getal, Gt1.getal], EST_CARDINALITY=33.333332, EST_COL_STATS={Gt3.getal=[-1.0, -1.0], Gt1.getal=[-1.0, -1.0]}})

                          Select(groups=[#tmp_Getallen AS Gt3])

                            Access(groups=[#tmp_Getallen AS Gt3])

                              Source(groups=[#tmp_Getallen AS Gt3])

                          Access(groups=[#tmp_Getallen AS Gt1])

                            Source(groups=[#tmp_Getallen AS Gt1])

                        Access(groups=[#tmp_Getallen AS Gt2])

                          Source(groups=[#tmp_Getallen AS Gt2])

                      Access(groups=[tableYY AS CS, anon_grp1])

                        Group(groups=[tableYY AS CS, anon_grp1])

                          Join(groups=[tableYY AS CS, tableXX AS PI])

                            Select(groups=[tableYY AS CS])

                              Source(groups=[tableYY AS CS])

                            Source(groups=[tableXX AS PI])

               

               

              ============================================================================

              EXECUTING MergeCriteria

               

              AFTER:

              Project(groups=[anon_grp0])

                TupleLimit(groups=[])

                  Group(groups=[anon_grp1, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0])

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, anon_grp1])

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2])

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1])

                          Select(groups=[#tmp_Getallen AS Gt3], props={SELECT_CRITERIA=Gt3.getal < 5, OUTPUT_COLS=[Gt3.getal], IS_COPIED=true, EST_CARDINALITY=3.3333333, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}})

                            Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt3.getal], EST_CARDINALITY=10.0, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}})

                              Source(groups=[#tmp_Getallen AS Gt3], props={OUTPUT_COLS=[Gt3.getal], EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}, EST_CARDINALITY=10.0})

                          Access(groups=[#tmp_Getallen AS Gt1])

                            Source(groups=[#tmp_Getallen AS Gt1])

                        Access(groups=[#tmp_Getallen AS Gt2])

                          Source(groups=[#tmp_Getallen AS Gt2])

                      Access(groups=[tableYY AS CS, anon_grp1])

                        Group(groups=[tableYY AS CS, anon_grp1])

                          Join(groups=[tableYY AS CS, tableXX AS PI])

                            Select(groups=[tableYY AS CS])

                              Source(groups=[tableYY AS CS])

                            Source(groups=[tableXX AS PI])

               

               

              ============================================================================

              EXECUTING PlanSorts

               

              AFTER:

              Project(groups=[anon_grp0])

                TupleLimit(groups=[])

                  Group(groups=[anon_grp1, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0], props={GROUP_COLS=[anon_grp1.gcol0, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)], SYMBOL_MAP={anon_grp0.gcol0=anon_grp1.gcol0, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)}, OUTPUT_COLS=[anon_grp0.gcol0, anon_grp0.gcol1], EST_CARDINALITY=-1.0})

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, anon_grp1], props={JOIN_TYPE=INNER JOIN, JOIN_STRATEGY=NESTED_LOOP, JOIN_CRITERIA=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END], OUTPUT_COLS=[anon_grp1.gcol0, Gt3.getal, Gt2.getal, Gt1.getal, anon_grp1.gcol1], EST_CARDINALITY=-1.0})

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, OUTPUT_COLS=[Gt3.getal, Gt2.getal, Gt1.getal], EST_CARDINALITY=333.3333, EST_COL_STATS={Gt3.getal=[-1.0, -1.0], Gt2.getal=[-1.0, -1.0], Gt1.getal=[-1.0, -1.0]}})

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1], props={JOIN_TYPE=CROSS JOIN, JOIN_STRATEGY=NESTED_LOOP, OUTPUT_COLS=[Gt3.getal, Gt1.getal], EST_CARDINALITY=33.333332, EST_COL_STATS={Gt3.getal=[-1.0, -1.0], Gt1.getal=[-1.0, -1.0]}})

                          Select(groups=[#tmp_Getallen AS Gt3])

                            Access(groups=[#tmp_Getallen AS Gt3])

                              Source(groups=[#tmp_Getallen AS Gt3])

                          Access(groups=[#tmp_Getallen AS Gt1])

                            Source(groups=[#tmp_Getallen AS Gt1])

                        Access(groups=[#tmp_Getallen AS Gt2])

                          Source(groups=[#tmp_Getallen AS Gt2])

                      Access(groups=[tableYY AS CS, anon_grp1])

                        Group(groups=[tableYY AS CS, anon_grp1])

                          Join(groups=[tableYY AS CS, tableXX AS PI])

                            Select(groups=[tableYY AS CS])

                              Source(groups=[tableYY AS CS])

                            Source(groups=[tableXX AS PI])

               

               

              ============================================================================

              EXECUTING CollapseSource

               

              AFTER:

              Project(groups=[anon_grp0])

                TupleLimit(groups=[])

                  Group(groups=[anon_grp1, #tmp_Getallen AS Gt3, #tmp_Getallen AS Gt2, #tmp_Getallen AS Gt1, anon_grp0])

                    Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2, anon_grp1])

                      Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1, #tmp_Getallen AS Gt2])

                        Join(groups=[#tmp_Getallen AS Gt3, #tmp_Getallen AS Gt1])

                          Select(groups=[#tmp_Getallen AS Gt3])

                            Access(groups=[#tmp_Getallen AS Gt3], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt3.getal], EST_CARDINALITY=10.0, EST_COL_STATS={Gt3.getal=[-1.0, -1.0]}, ATOMIC_REQUEST=SELECT Gt3.getal FROM #tmp_Getallen AS Gt3})

                          Access(groups=[#tmp_Getallen AS Gt1], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt1.getal], EST_CARDINALITY=10.0, EST_COL_STATS={Gt1.getal=[-1.0, -1.0]}, ATOMIC_REQUEST=SELECT Gt1.getal FROM #tmp_Getallen AS Gt1})

                        Access(groups=[#tmp_Getallen AS Gt2], props={SOURCE_HINT=null, MODEL_ID=__TEMP__, OUTPUT_COLS=[Gt2.getal], EST_CARDINALITY=10.0, EST_COL_STATS={Gt2.getal=[-1.0, -1.0]}, ATOMIC_REQUEST=SELECT Gt2.getal FROM #tmp_Getallen AS Gt2})

                      Access(groups=[tableYY AS CS, anon_grp1], props={SOURCE_HINT=null, MODEL_ID=Schema name=izisprod, nameInSource=null, uuid=mmuuid:b363a5ba-79cc-4fd3-b987-6cab174224ca, OUTPUT_COLS=[anon_grp1.gcol1, CS.Status, CS.EndTime, anon_grp1.gcol0], CONFORMED_SOURCES=null, EST_CARDINALITY=-1.0, ATOMIC_REQUEST=SELECT CS.StartTime AS gcol1, CS.Status, CS.EndTime, CS.PatientID AS gcol0 FROM tableYY AS CS, tableXX AS PI WHERE (CS.PatientID = PI.PatientID) AND (convert(CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END, string) > '2013-01-01') AND (CS.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(CS.StartTime, string) < '2014-01-01') GROUP BY CS.PatientID, CS.StartTime})

               

               

              ============================================================================

              CONVERTING PLAN TREE TO PROCESS TREE

               

              PROCESS PLAN =

              ProjectNode(2) output=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag] [anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag]

                LimitNode(3) output=[anon_grp0.gcol0, anon_grp0.gcol1] limit 100

                  GroupingNode(4) output=[anon_grp0.gcol0, anon_grp0.gcol1] [anon_grp1.gcol0, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)]{anon_grp0.gcol0=anon_grp1.gcol0, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)}

                    JoinNode(5) [NESTED LOOP JOIN] [INNER JOIN] criteria=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END] output=[anon_grp1.gcol0, Gt3.getal, Gt2.getal, Gt1.getal, anon_grp1.gcol1]

                      JoinNode(6) [NESTED LOOP JOIN] [CROSS JOIN] output=[Gt3.getal, Gt2.getal, Gt1.getal]

                        JoinNode(7) [NESTED LOOP JOIN] [CROSS JOIN] output=[Gt3.getal, Gt1.getal]

                          SelectNode(8) output=[Gt3.getal] Gt3.getal < 5

                            AccessNode(9) output=[Gt3.getal] SELECT #tmp_Getallen.getal FROM #tmp_Getallen

                          AccessNode(10) output=[Gt1.getal] SELECT #tmp_Getallen.getal FROM #tmp_Getallen

                        AccessNode(11) output=[Gt2.getal] SELECT #tmp_Getallen.getal FROM #tmp_Getallen

                      AccessNode(12) output=[anon_grp1.gcol1, CS.Status, CS.EndTime, anon_grp1.gcol0] SELECT g_0.StartTime, g_0.Status, g_0.EndTime, g_0.PatientID FROM tableYY AS g_0, tableXX AS g_1 WHERE (g_0.PatientID = g_1.PatientID) AND (convert(CASE WHEN g_0.Status = 1 THEN g_0.EndTime ELSE CASE WHEN g_1.DisTime IS NULL THEN now() ELSE g_1.DisTime END END, string) > '2013-01-01') AND (g_0.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(g_0.StartTime, string) < '2014-01-01') GROUP BY g_0.PatientID, g_0.StartTime

               

              ============================================================================

               

              ----------------------------------------------------------------------------

              OPTIMIZATION COMPLETE:

              PROCESSOR PLAN:

              ProjectNode(2) output=[anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag] [anon_grp0.gcol0 AS PatientID, anon_grp0.gcol1 AS katheterdag]

                LimitNode(3) output=[anon_grp0.gcol0, anon_grp0.gcol1] limit 100

                  GroupingNode(4) output=[anon_grp0.gcol0, anon_grp0.gcol1] [anon_grp1.gcol0, convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)]{anon_grp0.gcol0=anon_grp1.gcol0, anon_grp0.gcol1=convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date)}

                    JoinNode(5) [NESTED LOOP JOIN] [INNER JOIN] criteria=[convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date) >= {d'2013-01-01'}, convert(convert(Timestampadd(SQL_TSI_DAY, ((Gt3.getal + (Gt2.getal * 10)) + (Gt1.getal * 100)), convert(convert(anon_grp1.gcol1, date), timestamp)), date), timestamp) <= CASE WHEN CS.Status = 1 THEN CS.EndTime ELSE CASE WHEN PI.DisTime IS NULL THEN now() ELSE PI.DisTime END END] output=[anon_grp1.gcol0, Gt3.getal, Gt2.getal, Gt1.getal, anon_grp1.gcol1]

                      JoinNode(6) [NESTED LOOP JOIN] [CROSS JOIN] output=[Gt3.getal, Gt2.getal, Gt1.getal]

                        JoinNode(7) [NESTED LOOP JOIN] [CROSS JOIN] output=[Gt3.getal, Gt1.getal]

                          SelectNode(8) output=[Gt3.getal] Gt3.getal < 5

                            AccessNode(9) output=[Gt3.getal] SELECT #tmp_Getallen.getal FROM #tmp_Getallen

                          AccessNode(10) output=[Gt1.getal] SELECT #tmp_Getallen.getal FROM #tmp_Getallen

                        AccessNode(11) output=[Gt2.getal] SELECT #tmp_Getallen.getal FROM #tmp_Getallen

                      AccessNode(12) output=[anon_grp1.gcol1, CS.Status, CS.EndTime, anon_grp1.gcol0] SELECT g_0.StartTime, g_0.Status, g_0.EndTime, g_0.PatientID FROM tableYY AS g_0, tableXX AS g_1 WHERE (g_0.PatientID = g_1.PatientID) AND (convert(CASE WHEN g_0.Status = 1 THEN g_0.EndTime ELSE CASE WHEN g_1.DisTime IS NULL THEN now() ELSE g_1.DisTime END END, string) > '2013-01-01') AND (g_0.SequenceID IN (100,200,300,400,500,600,700)) AND (convert(g_0.StartTime, string) < '2014-01-01') GROUP BY g_0.PatientID, g_0.StartTime

               

              ============================================================================

              • 4. Re: problems with date(time) in case in whereclause
                Steven Hawkins Master

                Thanks for providing this.  It looks like there is an issue with the aggregate pushdown through the join.  I'll see if I can reproduce something locally.

                 

                Steve

                • 5. Re: problems with date(time) in case in whereclause
                  Steven Hawkins Master

                  This seems similar to [TEIID-2822] Not a Group By expression witn non-equi join - JBoss Issue Tracker, can you try your scenario with 8.7 Beta2 to confirm if there is still an issue?

                   

                  Steve

                  • 6. Re: problems with date(time) in case in whereclause
                    gadeyne.bram Master

                    Hi Steven,

                     

                    I'm sorry that I didn't reply to this earlier.

                     

                    Do you have some schedule for the release for teiid 8.7? I'd like to test this but I don't have a lot of time currently.

                    • 7. Re: problems with date(time) in case in whereclause
                      Ramesh Reddy Master

                      Bram,

                       

                      8.7.Final would be in next 3~4 weeks, the date is alway mentioned on JIRA system. You can download the 8.7.Beta2 right now. If you are not already subscribed, you can subscribe to teiid's mailing list, twitter, blog feed to keep up on the latest news.

                       

                       

                      Ramesh..