public override AlgebraNode VisitAggregateAlgebraNode(AggregateAlgebraNode node) { StreamAggregateIterator streamAggregateIterator = new StreamAggregateIterator(); streamAggregateIterator.RowBuffer = new object[node.OutputList.Length]; streamAggregateIterator.Input = ConvertAlgebraNode(node.Input); streamAggregateIterator.InputOutput = GetIteratorOutput(0, node.Input.OutputList, node.OutputList); BoundRowBufferEntrySet boundRowBufferEntrySet = new BoundRowBufferEntrySet(streamAggregateIterator.Input.RowBuffer, node.Input.OutputList); if (node.Groups == null) { streamAggregateIterator.GroupByEntries = new IteratorInput[0]; streamAggregateIterator.DefinedValues = GetDefinedValues(node.OutputList, node.DefinedValues, boundRowBufferEntrySet); } else { streamAggregateIterator.GroupByEntries = GetIteratorInput(node.Input.OutputList, node.Groups); streamAggregateIterator.DefinedValues = GetDefinedValues(node.OutputList, node.DefinedValues, boundRowBufferEntrySet); } SetLastIterator(node, streamAggregateIterator); return(node); }
public override AlgebraNode VisitAggregateAlgebraNode(AggregateAlgebraNode node) { StreamAggregateIterator streamAggregateIterator = new StreamAggregateIterator(); streamAggregateIterator.RowBuffer = new object[node.OutputList.Length]; streamAggregateIterator.Input = ConvertAlgebraNode(node.Input); streamAggregateIterator.InputOutput = GetIteratorOutput(0, node.Input.OutputList, node.OutputList); BoundRowBufferEntrySet boundRowBufferEntrySet = new BoundRowBufferEntrySet(streamAggregateIterator.Input.RowBuffer, node.Input.OutputList); if (node.Groups == null) { streamAggregateIterator.GroupByEntries = new IteratorInput[0]; streamAggregateIterator.DefinedValues = GetDefinedValues(node.OutputList, node.DefinedValues, boundRowBufferEntrySet); } else { streamAggregateIterator.GroupByEntries = GetIteratorInput(node.Input.OutputList, node.Groups); streamAggregateIterator.DefinedValues = GetDefinedValues(node.OutputList, node.DefinedValues, boundRowBufferEntrySet); } SetLastIterator(node, streamAggregateIterator); return node; }