Package org.apache.calcite.interpreter
Class AggregateNode
- java.lang.Object
-
- org.apache.calcite.interpreter.AbstractSingleNode<Aggregate>
-
- org.apache.calcite.interpreter.AggregateNode
-
- All Implemented Interfaces:
Node
public class AggregateNode extends AbstractSingleNode<Aggregate>
Interpreter node that implements anAggregate
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interface
AggregateNode.Accumulator
Defines function implementation for things likecount()
andsum()
.private static interface
AggregateNode.AccumulatorFactory
Creates anAggregateNode.Accumulator
.private static class
AggregateNode.AccumulatorList
A list of accumulators used during grouping.private static class
AggregateNode.CountAccumulator
Accumulator for calls to the COUNT function.static class
AggregateNode.DoubleSum
Implementation ofSUM
over DOUBLE values as a user-defined aggregate.private static class
AggregateNode.FilterAccumulator
Accumulator that applies a filter to another accumulator.private class
AggregateNode.Grouping
Internal class to track groupings.static class
AggregateNode.IntSum
Implementation ofSUM
over INTEGER values as a user-defined aggregate.static class
AggregateNode.LongSum
Implementation ofSUM
over BIGINT values as a user-defined aggregate.static class
AggregateNode.MaxDouble
Implementation ofMAX
function to calculate the minimum ofdouble
andreal
values as a user-defined aggregate.static class
AggregateNode.MaxFloat
Implementation ofMAX
function to calculate the minimum offloat
values as a user-defined aggregate.static class
AggregateNode.MaxInt
Implementation ofMAX
function to calculate the minimum ofinteger
values as a user-defined aggregate.static class
AggregateNode.MaxLong
Implementation ofMAX
function to calculate the minimum oflong
values as a user-defined aggregate.static class
AggregateNode.MinDouble
Implementation ofMIN
function to calculate the minimum ofdouble
andreal
values as a user-defined aggregate.static class
AggregateNode.MinFloat
Implementation ofMIN
function to calculate the minimum offloat
values as a user-defined aggregate.static class
AggregateNode.MinInt
Implementation ofMIN
function to calculate the minimum ofinteger
values as a user-defined aggregate.static class
AggregateNode.MinLong
Implementation ofMIN
function to calculate the minimum oflong
values as a user-defined aggregate.static class
AggregateNode.NumericComparison<T>
Common implementation of comparison aggregate methods over numeric values as a user-defined aggregate.private static class
AggregateNode.ScalarAccumulator
Accumulator powered byScalar
code fragments.private static class
AggregateNode.ScalarAccumulatorDef
Accumulator powered byScalar
code fragments.private static class
AggregateNode.UdaAccumulator
Accumulator based upon a user-defined aggregate.private static class
AggregateNode.UdaAccumulatorFactory
Accumulator factory based on a user-defined aggregate function.
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.ImmutableList<AggregateNode.AccumulatorFactory>
accumulatorFactories
private DataContext
dataContext
private java.util.List<AggregateNode.Grouping>
groups
private int
outputRowLength
private ImmutableBitSet
unionGroups
-
Fields inherited from class org.apache.calcite.interpreter.AbstractSingleNode
rel, sink, source
-
-
Constructor Summary
Constructors Constructor Description AggregateNode(Compiler compiler, Aggregate rel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private AggregateNode.AccumulatorFactory
getAccumulator(AggregateCall call, boolean ignoreFilter)
void
run()
-
-
-
Field Detail
-
groups
private final java.util.List<AggregateNode.Grouping> groups
-
unionGroups
private final ImmutableBitSet unionGroups
-
outputRowLength
private final int outputRowLength
-
accumulatorFactories
private final com.google.common.collect.ImmutableList<AggregateNode.AccumulatorFactory> accumulatorFactories
-
dataContext
private final DataContext dataContext
-
-
Method Detail
-
run
public void run() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
getAccumulator
private AggregateNode.AccumulatorFactory getAccumulator(AggregateCall call, boolean ignoreFilter)
-
-