Package org.apache.druid.query.operator
Class OperatorSequence
java.lang.Object
org.apache.druid.query.operator.OperatorSequence
- All Implemented Interfaces:
Sequence<RowsAndColumns>
Provides a sequence on top of Operators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<OutType> OutTypeaccumulate(OutType initValue, Accumulator<OutType, RowsAndColumns> accumulator) Accumulate this sequence using the given accumulator.<OutType> Yielder<OutType> toYielder(OutType initValue, YieldingAccumulator<OutType, RowsAndColumns> accumulator) Return a Yielder for accumulated sequence.
-
Constructor Details
-
OperatorSequence
-
-
Method Details
-
accumulate
public <OutType> OutType accumulate(OutType initValue, Accumulator<OutType, RowsAndColumns> accumulator) Description copied from interface:SequenceAccumulate this sequence using the given accumulator.- Specified by:
accumulatein interfaceSequence<RowsAndColumns>- Type Parameters:
OutType- the type of accumulated value.- Parameters:
initValue- the initial value to pass along to start the accumulation.accumulator- the accumulator which is responsible for accumulating input values.- Returns:
- accumulated value.
-
toYielder
public <OutType> Yielder<OutType> toYielder(OutType initValue, YieldingAccumulator<OutType, RowsAndColumns> accumulator) Description copied from interface:SequenceReturn a Yielder for accumulated sequence.- Specified by:
toYielderin interfaceSequence<RowsAndColumns>- Type Parameters:
OutType- the type of accumulated value.- Parameters:
initValue- the initial value to pass along to start the accumulation.accumulator- the accumulator which is responsible for accumulating input values.- Returns:
- a Yielder for accumulated sequence.
- See Also:
-