public class AggregateUtil$ extends Object
Modifier and Type | Field and Description |
---|---|
static AggregateUtil$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
AggregateUtil$() |
Modifier and Type | Method and Description |
---|---|
RichGroupReduceFunction<Row,Row> |
createAggregateGroupReduceFunction(scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates,
org.apache.calcite.rel.type.RelDataType inputType,
org.apache.calcite.rel.type.RelDataType outputType,
int[] groupings)
Create a
GroupReduceFunction to compute aggregates. |
AllWindowFunction<Row,Row,Window> |
createAllWindowAggregationFunction(LogicalWindow window,
scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates,
org.apache.calcite.rel.type.RelDataType inputType,
org.apache.calcite.rel.type.RelDataType outputType,
int[] groupings,
scala.collection.Seq<FlinkRelBuilder.NamedWindowProperty> properties)
Create an
AllWindowFunction to compute non-partitioned group window aggregates. |
AllWindowFunction<Row,Row,Window> |
createAllWindowIncrementalAggregationFunction(LogicalWindow window,
scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates,
org.apache.calcite.rel.type.RelDataType inputType,
org.apache.calcite.rel.type.RelDataType outputType,
int[] groupings,
scala.collection.Seq<FlinkRelBuilder.NamedWindowProperty> properties)
Create an
AllWindowFunction to finalize incrementally pre-computed non-partitioned
window aggreagtes. |
IncrementalAggregateReduceFunction |
createIncrementalAggregateReduceFunction(scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates,
org.apache.calcite.rel.type.RelDataType inputType,
org.apache.calcite.rel.type.RelDataType outputType,
int[] groupings)
Create a
ReduceFunction for incremental window
aggregation. |
MapFunction<Object,Row> |
createPrepareMapFunction(scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates,
int[] groupings,
org.apache.calcite.rel.type.RelDataType inputType)
Create a
MapFunction that prepares for aggregates. |
WindowFunction<Row,Row,Tuple,Window> |
createWindowAggregationFunction(LogicalWindow window,
scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates,
org.apache.calcite.rel.type.RelDataType inputType,
org.apache.calcite.rel.type.RelDataType outputType,
int[] groupings,
scala.collection.Seq<FlinkRelBuilder.NamedWindowProperty> properties)
Create a
WindowFunction to compute partitioned group window aggregates. |
WindowFunction<Row,Row,Tuple,Window> |
createWindowIncrementalAggregationFunction(LogicalWindow window,
scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates,
org.apache.calcite.rel.type.RelDataType inputType,
org.apache.calcite.rel.type.RelDataType outputType,
int[] groupings,
scala.collection.Seq<FlinkRelBuilder.NamedWindowProperty> properties)
Create a
WindowFunction to finalize incrementally pre-computed window aggregates. |
boolean |
doAllSupportPartialAggregation(scala.collection.Seq<org.apache.calcite.rel.core.AggregateCall> aggregateCalls,
org.apache.calcite.rel.type.RelDataType inputType,
int groupKeysCount)
Return true if all aggregates can be partially computed.
|
public static final AggregateUtil$ MODULE$
public MapFunction<Object,Row> createPrepareMapFunction(scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates, int[] groupings, org.apache.calcite.rel.type.RelDataType inputType)
MapFunction
that prepares for aggregates.
The function returns intermediate aggregate values of all aggregate function which are
organized by the following format:
avg(x) aggOffsetInRow = 2 count(z) aggOffsetInRow = 5
| |
v v
+---------+---------+--------+--------+--------+--------+
|groupKey1|groupKey2| sum1 | count1 | sum2 | count2 |
+---------+---------+--------+--------+--------+--------+
^
|
sum(y) aggOffsetInRow = 4
public RichGroupReduceFunction<Row,Row> createAggregateGroupReduceFunction(scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates, org.apache.calcite.rel.type.RelDataType inputType, org.apache.calcite.rel.type.RelDataType outputType, int[] groupings)
GroupReduceFunction
to compute aggregates.
If all aggregates support partial aggregation, the
GroupReduceFunction
implements
CombineFunction
as well.
public IncrementalAggregateReduceFunction createIncrementalAggregateReduceFunction(scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates, org.apache.calcite.rel.type.RelDataType inputType, org.apache.calcite.rel.type.RelDataType outputType, int[] groupings)
ReduceFunction
for incremental window
aggregation.
public AllWindowFunction<Row,Row,Window> createAllWindowAggregationFunction(LogicalWindow window, scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates, org.apache.calcite.rel.type.RelDataType inputType, org.apache.calcite.rel.type.RelDataType outputType, int[] groupings, scala.collection.Seq<FlinkRelBuilder.NamedWindowProperty> properties)
AllWindowFunction
to compute non-partitioned group window aggregates.public WindowFunction<Row,Row,Tuple,Window> createWindowAggregationFunction(LogicalWindow window, scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates, org.apache.calcite.rel.type.RelDataType inputType, org.apache.calcite.rel.type.RelDataType outputType, int[] groupings, scala.collection.Seq<FlinkRelBuilder.NamedWindowProperty> properties)
WindowFunction
to compute partitioned group window aggregates.
public AllWindowFunction<Row,Row,Window> createAllWindowIncrementalAggregationFunction(LogicalWindow window, scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates, org.apache.calcite.rel.type.RelDataType inputType, org.apache.calcite.rel.type.RelDataType outputType, int[] groupings, scala.collection.Seq<FlinkRelBuilder.NamedWindowProperty> properties)
AllWindowFunction
to finalize incrementally pre-computed non-partitioned
window aggreagtes.public WindowFunction<Row,Row,Tuple,Window> createWindowIncrementalAggregationFunction(LogicalWindow window, scala.collection.Seq<org.apache.calcite.util.Pair<org.apache.calcite.rel.core.AggregateCall,String>> namedAggregates, org.apache.calcite.rel.type.RelDataType inputType, org.apache.calcite.rel.type.RelDataType outputType, int[] groupings, scala.collection.Seq<FlinkRelBuilder.NamedWindowProperty> properties)
WindowFunction
to finalize incrementally pre-computed window aggregates.public boolean doAllSupportPartialAggregation(scala.collection.Seq<org.apache.calcite.rel.core.AggregateCall> aggregateCalls, org.apache.calcite.rel.type.RelDataType inputType, int groupKeysCount)
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.