Class SliceAssigners
java.lang.Object
org.apache.flink.table.runtime.operators.window.tvf.slicing.SliceAssigners
Utilities to create
SliceAssigners.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classTheSliceAssignerfor cumulative windows.static final classTheSliceAssignerfor hopping windows.static final classTheSliceAssignerfor elements have been attached slice end timestamp, and the slices are shared.static final classTheSliceAssignerfor elements have been attached slice end timestamp, but the slices are not shared, i.e. the assigned slice is equal to the final window.static final classTheSliceAssignerfor tumbling windows.static final classTheSliceAssignerfor elements have been attached window start and end timestamps. -
Method Summary
Modifier and TypeMethodDescriptioncumulative(int rowtimeIndex, ZoneId shiftTimeZone, Duration maxSize, Duration step) Creates a cumulative windowSliceAssignerthat assigns elements to slices of cumulative windows.Creates a hopping windowSliceAssignerthat assigns elements to slices of hopping windows.static SliceAssignersliced(int sliceEndIndex, SliceAssigner innerAssigner) Creates aSliceAssignerthat assigns elements which has been attached slice end timestamp.Creates a tumbling windowSliceAssignerthat assigns elements to slices of tumbling windows.windowed(int windowEndIndex, SliceAssigner innerAssigner) Creates aSliceAssignerthat assigns elements which has been attached window start and window end timestamp to slices.
-
Method Details
-
tumbling
public static SliceAssigners.TumblingSliceAssigner tumbling(int rowtimeIndex, ZoneId shiftTimeZone, Duration size) Creates a tumbling windowSliceAssignerthat assigns elements to slices of tumbling windows.- Parameters:
rowtimeIndex- the index of rowtime field in the input row,-1if based on processing time.shiftTimeZone- The shift timezone of the window, if the proctime or rowtime type is TIMESTAMP_LTZ, the shift timezone is the timezone user configured in TableConfig, other cases the timezone is UTC which means never shift when assigning windows.size- the size of the generated windows.
-
hopping
public static SliceAssigners.HoppingSliceAssigner hopping(int rowtimeIndex, ZoneId shiftTimeZone, Duration size, Duration slide) Creates a hopping windowSliceAssignerthat assigns elements to slices of hopping windows.- Parameters:
rowtimeIndex- the index of rowtime field in the input row,-1if based on * processing time.shiftTimeZone- The shift timezone of the window, if the proctime or rowtime type is TIMESTAMP_LTZ, the shift timezone is the timezone user configured in TableConfig, other cases the timezone is UTC which means never shift when assigning windows.slide- the slide interval of the generated windows.
-
cumulative
public static SliceAssigners.CumulativeSliceAssigner cumulative(int rowtimeIndex, ZoneId shiftTimeZone, Duration maxSize, Duration step) Creates a cumulative windowSliceAssignerthat assigns elements to slices of cumulative windows.- Parameters:
rowtimeIndex- the index of rowtime field in the input row,-1if based on * processing time.shiftTimeZone- The shift timezone of the window, if the proctime or rowtime type is TIMESTAMP_LTZ, the shift timezone is the timezone user configured in TableConfig, other cases the timezone is UTC which means never shift when assigning windows.step- the step interval of the generated windows.
-
windowed
public static SliceAssigners.WindowedSliceAssigner windowed(int windowEndIndex, SliceAssigner innerAssigner) Creates aSliceAssignerthat assigns elements which has been attached window start and window end timestamp to slices. The assigned slice is equal to the given window.- Parameters:
windowEndIndex- the index of window end field in the input row, mustn't be a negative value.innerAssigner- the inner assigner which assigns the attached windows
-
sliced
Creates aSliceAssignerthat assigns elements which has been attached slice end timestamp.- Parameters:
sliceEndIndex- the index of slice end field in the input row, mustn't be a negative value.innerAssigner- the inner assigner which assigns the attached windows
-