public class WindowOperatorBuilder extends Object
WindowOperatorBuilder
is used to build WindowOperator
fluently.
Note: You have to call the aggregate method before the last build method.
WindowOperatorBuilder .builder(KeyedStream) .tumble(Duration.ofMinutes(1)) // sliding(...), session(...) .withEventTime() // withProcessingTime() .withAllowedLateness(Duration.ZERO) .produceUpdates() .aggregate(AggregationsFunction, accTypes, windowTypes) .build();
Modifier and Type | Class and Description |
---|---|
static class |
WindowOperatorBuilder.AggregateWindowOperatorBuilder
The builder which is used to build
AggregateWindowOperator fluently. |
static class |
WindowOperatorBuilder.TableAggregateWindowOperatorBuilder
The builder which is used to build
TableAggregateWindowOperator fluently. |
Modifier and Type | Field and Description |
---|---|
protected LogicalType[] |
accumulatorTypes |
protected LogicalType[] |
aggResultTypes |
protected long |
allowedLateness |
protected int |
inputCountIndex |
protected LogicalType[] |
inputFieldTypes |
protected boolean |
produceUpdates |
protected int |
rowtimeIndex |
protected ZoneId |
shiftTimeZone |
protected Trigger<?> |
trigger |
protected GroupWindowAssigner<?> |
windowAssigner |
protected LogicalType[] |
windowPropertyTypes |
Constructor and Description |
---|
WindowOperatorBuilder() |
protected LogicalType[] inputFieldTypes
protected GroupWindowAssigner<?> windowAssigner
protected Trigger<?> trigger
protected LogicalType[] accumulatorTypes
protected LogicalType[] aggResultTypes
protected LogicalType[] windowPropertyTypes
protected long allowedLateness
protected boolean produceUpdates
protected int rowtimeIndex
protected ZoneId shiftTimeZone
protected int inputCountIndex
public static WindowOperatorBuilder builder()
public WindowOperatorBuilder withInputFields(LogicalType[] inputFieldTypes)
public WindowOperatorBuilder withShiftTimezone(ZoneId shiftTimeZone)
public WindowOperatorBuilder tumble(Duration size)
public WindowOperatorBuilder sliding(Duration size, Duration slide)
public WindowOperatorBuilder cumulative(Duration size, Duration step)
public WindowOperatorBuilder session(Duration sessionGap)
public WindowOperatorBuilder countWindow(long size)
public WindowOperatorBuilder countWindow(long size, long slide)
public WindowOperatorBuilder assigner(GroupWindowAssigner<?> windowAssigner)
public WindowOperatorBuilder triggering(Trigger<?> trigger)
public WindowOperatorBuilder withEventTime(int rowtimeIndex)
public WindowOperatorBuilder withProcessingTime()
public WindowOperatorBuilder withAllowedLateness(Duration allowedLateness)
public WindowOperatorBuilder produceUpdates()
public WindowOperatorBuilder withInputCountIndex(int inputCountIndex)
protected void aggregate(LogicalType[] accumulatorTypes, LogicalType[] aggResultTypes, LogicalType[] windowPropertyTypes)
public WindowOperatorBuilder.AggregateWindowOperatorBuilder aggregate(NamespaceAggsHandleFunction<?> aggregateFunction, RecordEqualiser equaliser, LogicalType[] accumulatorTypes, LogicalType[] aggResultTypes, LogicalType[] windowPropertyTypes)
public WindowOperatorBuilder.AggregateWindowOperatorBuilder aggregate(GeneratedNamespaceAggsHandleFunction<?> generatedAggregateFunction, GeneratedRecordEqualiser generatedEqualiser, LogicalType[] accumulatorTypes, LogicalType[] aggResultTypes, LogicalType[] windowPropertyTypes)
public WindowOperatorBuilder.TableAggregateWindowOperatorBuilder aggregate(NamespaceTableAggsHandleFunction<?> tableAggregateFunction, LogicalType[] accumulatorTypes, LogicalType[] aggResultTypes, LogicalType[] windowPropertyTypes)
public WindowOperatorBuilder.TableAggregateWindowOperatorBuilder aggregate(GeneratedNamespaceTableAggsHandleFunction<?> generatedTableAggregateFunction, LogicalType[] accumulatorTypes, LogicalType[] aggResultTypes, LogicalType[] windowPropertyTypes)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.