public ComputeScalarIterator(Iterator input, IEnumerable <IteratorFunction> definedValues) { _input = input; _definedValues = definedValues.ToImmutableArray(); _rowBuffer = new ArrayRowBuffer(_definedValues.Length); _combinedRowBuffer = new CombinedRowBuffer(input.RowBuffer, _rowBuffer); }
public StreamAggregateIterator(Iterator input, IEnumerable <RowBufferEntry> groupEntries, ImmutableArray <IComparer> comparers, IEnumerable <IAggregator> aggregators, IEnumerable <IteratorFunction> argumentFunctions) { _input = input; _comparers = comparers; _groupEntries = groupEntries.ToImmutableArray(); _aggregators = aggregators.ToImmutableArray(); _argumentFunctions = argumentFunctions.ToImmutableArray(); _rowBuffer = new ArrayRowBuffer(_groupEntries.Length + _aggregators.Length); }
public override bool Read() { if (!_input.Read()) { return(false); } // Read row from input and store it. var spoolEntry = new ArrayRowBuffer(_input.RowBuffer.Count); _input.RowBuffer.CopyTo(spoolEntry.Array, 0); _tableSpoolStack.Push(spoolEntry); return(true); }
public TableIterator(TableDefinition table, IEnumerable <Func <object, object> > valueSelectors) { _table = table; _definedValues = valueSelectors.ToImmutableArray(); _rowBuffer = new ArrayRowBuffer(_definedValues.Length); }