public override object GetValue(int column, int agentInstanceId, EventBean[] eventsPerStream, bool isNewData, ExprEvaluatorContext exprEvaluatorContext)
        {
            var col = LocalGroupByPlan.Columns[column];

            if (col.IsDefaultGroupLevel)
            {
                if (col.IsMethodAgg)
                {
                    return(_currentAggregatorMethods[col.MethodOffset].Value);
                }
                return(col.Pair.Accessor.GetValue(_currentAggregatorStates[col.Pair.Slot], eventsPerStream, isNewData, exprEvaluatorContext));
            }
            if (col.PartitionEvaluators.Length == 0)
            {
                if (col.IsMethodAgg)
                {
                    return(AggregatorsTopLevel[col.MethodOffset].Value);
                }
                return(col.Pair.Accessor.GetValue(StatesTopLevel[col.Pair.Slot], eventsPerStream, isNewData, exprEvaluatorContext));
            }
            var groupByKey = AggSvcGroupAllLocalGroupBy.ComputeGroupKey(col.PartitionEvaluators, eventsPerStream, true, exprEvaluatorContext);
            var row        = AggregatorsPerLevelAndGroup[col.LevelNum].Get(groupByKey);

            if (col.IsMethodAgg)
            {
                return(row.Methods[col.MethodOffset].Value);
            }
            return(col.Pair.Accessor.GetValue(row.States[col.Pair.Slot], eventsPerStream, isNewData, exprEvaluatorContext));
        }
 protected override object ComputeGroupKey(AggregationLocalGroupByLevel level, object groupKey, ExprEvaluator[] partitionEval, EventBean[] eventsPerStream, bool newData, ExprEvaluatorContext exprEvaluatorContext)
 {
     if (level.IsDefaultLevel)
     {
         return(groupKey);
     }
     return(AggSvcGroupAllLocalGroupBy.ComputeGroupKey(partitionEval, eventsPerStream, true, exprEvaluatorContext));
 }