Пример #1
0
        public void ProcessJoin(ISet <MultiKey <EventBean> > newEvents, ISet <MultiKey <EventBean> > oldEvents, bool isGenerateSynthetic)
        {
            if (_processor.Prototype.IsSelectRStream && _lastEventRStreamForOutputLast == null)
            {
                _lastEventRStreamForOutputLast = _processor.GetSelectListEvents(false, isGenerateSynthetic, true);
            }

            ResultSetProcessorUtil.ApplyAggJoinResult(_processor.AggregationService, _processor.ExprEvaluatorContext, newEvents, oldEvents);
        }
        public void ProcessJoin(ISet <MultiKey <EventBean> > newEvents, ISet <MultiKey <EventBean> > oldEvents, bool isGenerateSynthetic)
        {
            if (processor.Prototype.IsSelectRStream)
            {
                EventBean[] eventsX = processor.GetSelectListEvents(false, isGenerateSynthetic, true);
                EventBeanUtility.AddToCollection(eventsX, eventsOld);
            }

            ResultSetProcessorUtil.ApplyAggJoinResult(processor.AggregationService, processor._exprEvaluatorContext, newEvents, oldEvents);

            EventBean[] events = processor.GetSelectListEvents(true, isGenerateSynthetic, true);
            EventBeanUtility.AddToCollection(events, eventsNew);
        }
Пример #3
0
        public UniformPair <EventBean[]> ProcessJoinResult(ISet <MultiKey <EventBean> > newEvents, ISet <MultiKey <EventBean> > oldEvents, bool isSynthesize)
        {
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().QResultSetProcessUngroupedFullyAgg();
            }
            EventBean[] selectOldEvents = null;
            EventBean[] selectNewEvents;

            if (_prototype.IsUnidirectional)
            {
                Clear();
            }

            if (_prototype.IsSelectRStream)
            {
                selectOldEvents = GetSelectListEvents(false, isSynthesize, true);
            }

            ResultSetProcessorUtil.ApplyAggJoinResult(_aggregationService, _exprEvaluatorContext, newEvents, oldEvents);

            selectNewEvents = GetSelectListEvents(true, isSynthesize, true);

            if ((selectNewEvents == null) && (selectOldEvents == null))
            {
                if (InstrumentationHelper.ENABLED)
                {
                    InstrumentationHelper.Get().AResultSetProcessUngroupedFullyAgg(null, null);
                }
                return(null);
            }
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().AResultSetProcessUngroupedFullyAgg(selectNewEvents, selectOldEvents);
            }
            return(new UniformPair <EventBean[]>(selectNewEvents, selectOldEvents));
        }
Пример #4
0
 public void ApplyJoinResult(ISet <MultiKey <EventBean> > newEvents, ISet <MultiKey <EventBean> > oldEvents)
 {
     ResultSetProcessorUtil.ApplyAggJoinResult(_aggregationService, _exprEvaluatorContext, newEvents, oldEvents);
 }
        public UniformPair <EventBean[]> ProcessJoinResult(ISet <MultiKey <EventBean> > newEvents, ISet <MultiKey <EventBean> > oldEvents, bool isSynthesize)
        {
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().QResultSetProcessUngroupedNonfullyAgg();
            }
            EventBean[] selectOldEvents = null;
            EventBean[] selectNewEvents;

            if (_prototype.IsUnidirectional)
            {
                Clear();
            }

            ResultSetProcessorUtil.ApplyAggJoinResult(_aggregationService, _exprEvaluatorContext, newEvents, oldEvents);

            if (_prototype.OptionalHavingNode == null)
            {
                if (_prototype.IsSelectRStream)
                {
                    if (_orderByProcessor == null)
                    {
                        selectOldEvents = ResultSetProcessorUtil.GetSelectJoinEventsNoHaving(_selectExprProcessor, oldEvents, false, isSynthesize, _exprEvaluatorContext);
                    }
                    else
                    {
                        selectOldEvents = ResultSetProcessorUtil.GetSelectJoinEventsNoHavingWithOrderBy(_selectExprProcessor, _orderByProcessor, oldEvents, false, isSynthesize, _exprEvaluatorContext);
                    }
                }

                if (_orderByProcessor == null)
                {
                    selectNewEvents = ResultSetProcessorUtil.GetSelectJoinEventsNoHaving(_selectExprProcessor, newEvents, true, isSynthesize, _exprEvaluatorContext);
                }
                else
                {
                    selectNewEvents = ResultSetProcessorUtil.GetSelectJoinEventsNoHavingWithOrderBy(_selectExprProcessor, _orderByProcessor, newEvents, true, isSynthesize, _exprEvaluatorContext);
                }
            }
            else
            {
                if (_prototype.IsSelectRStream)
                {
                    if (_orderByProcessor == null)
                    {
                        selectOldEvents = ResultSetProcessorUtil.GetSelectJoinEventsHaving(_selectExprProcessor, oldEvents, _prototype.OptionalHavingNode, false, isSynthesize, _exprEvaluatorContext);
                    }
                    else
                    {
                        selectOldEvents = ResultSetProcessorUtil.GetSelectJoinEventsHavingWithOrderBy(_selectExprProcessor, _orderByProcessor, oldEvents, _prototype.OptionalHavingNode, false, isSynthesize, _exprEvaluatorContext);
                    }
                }

                if (_orderByProcessor == null)
                {
                    selectNewEvents = ResultSetProcessorUtil.GetSelectJoinEventsHaving(_selectExprProcessor, newEvents, _prototype.OptionalHavingNode, true, isSynthesize, _exprEvaluatorContext);
                }
                else
                {
                    selectNewEvents = ResultSetProcessorUtil.GetSelectJoinEventsHavingWithOrderBy(_selectExprProcessor, _orderByProcessor, newEvents, _prototype.OptionalHavingNode, true, isSynthesize, _exprEvaluatorContext);
                }
            }

            if ((selectNewEvents == null) && (selectOldEvents == null))
            {
                if (InstrumentationHelper.ENABLED)
                {
                    InstrumentationHelper.Get().AResultSetProcessUngroupedNonfullyAgg(null, null);
                }
                return(null);
            }
            if (InstrumentationHelper.ENABLED)
            {
                InstrumentationHelper.Get().AResultSetProcessUngroupedNonfullyAgg(selectNewEvents, selectOldEvents);
            }
            return(new UniformPair <EventBean[]>(selectNewEvents, selectOldEvents));
        }