Exemplo n.º 1
0
 public void SetCurrentAccess(
     object groupKey,
     int agentInstanceId,
     AggregationGroupByRollupLevel rollupLevel)
 {
     // no action needed - this implementation does not group and the current row is the single group
 }
Exemplo n.º 2
0
 public void SetCurrentAccess(
     object groupKey,
     int agentInstanceId,
     AggregationGroupByRollupLevel rollupLevel)
 {
     services.Get(agentInstanceId).SetCurrentAccess(groupKey, agentInstanceId, null);
 }
        private void ComparePlan(string[] expectedCSV)
        {
            GroupByRollupPlanDesc plan = SupportGroupRollupPlanHook.Plan;

            AggregationGroupByRollupLevel[] levels = plan.RollupDesc.Levels;
            var received = new string[levels.Length][];

            for (int i = 0; i < levels.Length; i++)
            {
                AggregationGroupByRollupLevel level = levels[i];
                if (level.IsAggregationTop)
                {
                    received[i] = new string[0];
                }
                else
                {
                    received[i] = new string[level.RollupKeys.Length];
                    for (int j = 0; j < received[i].Length; j++)
                    {
                        int key = level.RollupKeys[j];
                        received[i][j] = ExprNodeUtility.ToExpressionStringMinPrecedenceSafe(plan.Expressions[key]);
                    }
                }
            }

            Assert.AreEqual(expectedCSV.Length, received.Length, "Received: " + ToCSV(received));
            for (int i = 0; i < expectedCSV.Length; i++)
            {
                string receivedCSV = ToCSV(received[i]);
                Assert.AreEqual(expectedCSV[i], receivedCSV, "Failed at row " + i);
            }
        }
Exemplo n.º 4
0
 public GroupByRollupKey(
     EventBean[] generator,
     AggregationGroupByRollupLevel level,
     object groupKey)
 {
     Generator = generator;
     Level = level;
     GroupKey = groupKey;
 }
Exemplo n.º 5
0
        public virtual void SetCurrentAccess(
            object groupByKey,
            int agentInstanceId,
            AggregationGroupByRollupLevel rollupLevel)
        {
            var bean = tableInstance.GetRowForGroupKey(groupByKey);
            if (bean != null) {
                currentAggregationRow = (AggregationRow) bean.Properties[0];
            }
            else {
                currentAggregationRow = null;
            }

            currentGroupKey = groupByKey;
        }
Exemplo n.º 6
0
        public override void SetCurrentAccess(
            object groupByKey,
            int agentInstanceId,
            AggregationGroupByRollupLevel rollupLevel)
        {
            var key = rollupLevel.ComputeMultiKey(groupByKey, numKeys);
            var bean = tableInstance.GetRowForGroupKey(key);

            if (bean != null) {
                currentAggregationRow = (AggregationRow) bean.Properties[0];
            }
            else {
                currentAggregationRow = null;
            }

            currentGroupKey = key;
        }
Exemplo n.º 7
0
 public void SetCurrentAccess(Object groupKey, int agentInstanceId, AggregationGroupByRollupLevel rollupLevel)
 {
     _services.Array[agentInstanceId].SetCurrentAccess(groupKey, agentInstanceId, null);
 }
Exemplo n.º 8
0
 public AggregationState[] NewAccesses(int agentInstanceId, bool isJoin, AggregationStateFactory[] accessAggSpecs, object groupKey, object groupKeyBinding, AggregationGroupByRollupLevel groupByRollupLevel, AggregationServicePassThru passThru)
 {
     return(NewAccessInternal(agentInstanceId, accessAggSpecs, isJoin, groupKey, passThru));
 }
Exemplo n.º 9
0
 public void RemoveAggregators(int agentInstanceId, object groupKey, object groupKeyBinding, AggregationGroupByRollupLevel level)
 {
     // To be overridden by implementations that care when aggregators get removed
 }
Exemplo n.º 10
0
 public AggregationMethod[] NewAggregators(AggregationMethodFactory[] prototypes, int agentInstanceId, object groupKey, object groupKeyBinding, AggregationGroupByRollupLevel groupByRollupLevel)
 {
     return(NewAggregatorsInternal(prototypes, agentInstanceId));
 }
Exemplo n.º 11
0
 public GroupByRollupLevelKeyPair(AggregationGroupByRollupLevel level, Object key)
 {
     Level = level;
     Key   = key;
 }
Exemplo n.º 12
0
 public GroupByRollupLevelEventPair(AggregationGroupByRollupLevel level, EventBean @event)
 {
     _level = level;
     _event = @event;
 }
Exemplo n.º 13
0
        public virtual void SetCurrentAccess(object groupByKeyUntransformed, int agentInstanceId, AggregationGroupByRollupLevel rollupLevel) {
            var groupByKey = tableInstance.Table.PrimaryKeyIntoTableTransform.From(groupByKeyUntransformed);
            var bean = tableInstance.GetRowForGroupKey(groupByKey);
            if (bean != null) {
                currentAggregationRow = (AggregationRow) bean.Properties[0];
            }
            else {
                currentAggregationRow = null;
            }

            currentGroupKey = groupByKey;
        }
Exemplo n.º 14
0
 public GroupByRollupKey(EventBean[] generator, AggregationGroupByRollupLevel level, Object groupKey)
 {
     _generator = generator;
     _level     = level;
     _groupKey  = groupKey;
 }
Exemplo n.º 15
0
 public void SetCurrentAccess(object groupKey, int agentInstanceId, AggregationGroupByRollupLevel rollupLevel)
 {
 }