Ejemplo n.º 1
0
        public override ExecNode MakeExec(
            string statementName,
            string statementId,
            Attribute[] annotations,
            IDictionary <TableLookupIndexReqKey, EventTable>[] indexPerStream,
            EventType[] streamTypes,
            Viewable[] streamViews,
            HistoricalStreamIndexList[] historicalStreamIndexList,
            VirtualDWView[] viewExternal,
            ILockable[] tableSecondaryIndexLocks)
        {
            if (_childNodes.IsEmpty())
            {
                throw new IllegalStateException("Zero child nodes for nested iteration");
            }

            var execNode = new NestedIterationExecNode(_nestingOrder);

            foreach (QueryPlanNode child in _childNodes)
            {
                ExecNode childExec = child.MakeExec(
                    statementName, statementId, annotations, indexPerStream, streamTypes, streamViews,
                    historicalStreamIndexList, viewExternal, tableSecondaryIndexLocks);
                execNode.AddChildNode(childExec);
            }
            return(execNode);
        }
        public void SetUp()
        {
            UnindexedEventTable[] indexes = new UnindexedEventTable[4];
            for (int i = 0; i < indexes.Length; i++)
            {
                indexes[i] = new UnindexedEventTableImpl(0);
            }

            _exec = new NestedIterationExecNode(new int[] { 3, 0, 1 });
            _exec.AddChildNode(new TableLookupExecNode(3, new FullTableScanLookupStrategy(indexes[3])));
            _exec.AddChildNode(new TableLookupExecNode(0, new FullTableScanLookupStrategy(indexes[0])));
            _exec.AddChildNode(new TableLookupExecNode(1, new FullTableScanLookupStrategy(indexes[1])));

            _streamEvents    = new EventBean[4][];
            _streamEvents[0] = SupportEventBeanFactory.MakeEvents_A(new String[] { "a1", "a2" });
            _streamEvents[1] = SupportEventBeanFactory.MakeEvents_B(new String[] { "b1", "b2" });
            _streamEvents[2] = SupportEventBeanFactory.MakeEvents_C(new String[] { "c1", "c2" });
            _streamEvents[3] = SupportEventBeanFactory.MakeEvents_D(new String[] { "d1", "d2" });

            // Fill with data
            indexes[0].Add(_streamEvents[0]);
            indexes[1].Add(_streamEvents[1]);
            indexes[2].Add(_streamEvents[2]);
            indexes[3].Add(_streamEvents[3]);
        }
Ejemplo n.º 3
0
        public override ExecNode MakeExec(
            AgentInstanceContext agentInstanceContext,
            IDictionary<TableLookupIndexReqKey, EventTable>[] indexesPerStream,
            EventType[] streamTypes,
            Viewable[] streamViews,
            VirtualDWView[] viewExternal,
            ILockable[] tableSecondaryIndexLocks)
        {
            var execNode = new NestedIterationExecNode(nestingOrder);
            foreach (var child in childNodes) {
                var childExec = child.MakeExec(
                    agentInstanceContext,
                    indexesPerStream,
                    streamTypes,
                    streamViews,
                    viewExternal,
                    tableSecondaryIndexLocks);
                execNode.AddChildNode(childExec);
            }

            return execNode;
        }