Interface AggsHandleFunction
-
- All Superinterfaces:
AggsHandleFunctionBase
,Function
,Serializable
public interface AggsHandleFunction extends AggsHandleFunctionBase
The base class for handling aggregate functions.It is code generated to handle all
AggregateFunction
s together in an aggregation.It is the entry point for aggregate operators to operate all
AggregateFunction
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RowData
getValue()
Gets the result of the aggregation from the current accumulators.void
setWindowSize(int windowSize)
Set window size for the aggregate function.-
Methods inherited from interface org.apache.flink.table.runtime.generated.AggsHandleFunctionBase
accumulate, cleanup, close, createAccumulators, getAccumulators, merge, open, resetAccumulators, retract, setAccumulators
-
-
-
-
Method Detail
-
getValue
RowData getValue() throws Exception
Gets the result of the aggregation from the current accumulators.- Returns:
- the final result (saved in a row) of the current accumulators.
- Throws:
Exception
-
setWindowSize
void setWindowSize(int windowSize)
Set window size for the aggregate function. It's used in batch scenario to set the total rows of the current window frame. More information for window frame: https://docs.oracle.com/cd/E17952_01/mysql-8.0-en/window-functions-frames.htmlWe may need to set the value for some window functions may require the total rows of current window frame to do calculation. For example, the function PERCENT_RANK need to know the window's size, and the SQL looks like:
SELECT PERCENT_RANK() OVER ([ partition_by_clause] order_by_clause)
.
-
-