@Internal public abstract class AbstractArrowPythonAggregateFunctionOperator extends AbstractStatelessFunctionOperator<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
AggregateFunction
.Modifier and Type | Field and Description |
---|---|
protected ArrowSerializer<org.apache.flink.table.data.RowData> |
arrowSerializer |
protected int |
currentBatchCount
The current number of elements to be included in an arrow batch.
|
protected int[] |
groupingSet |
protected org.apache.flink.table.functions.python.PythonFunctionInfo[] |
pandasAggFunctions
The Pandas
AggregateFunction s to be executed. |
protected org.apache.flink.table.data.utils.JoinedRowData |
reuseJoinedRow
The JoinedRowData reused holding the execution result.
|
protected StreamRecordRowDataWrappingCollector |
rowDataWrapper
The collector used to collect records.
|
bais, baisWrapper, baos, baosWrapper, forwardedInputQueue, inputType, outputType, userDefinedFunctionInputOffsets, userDefinedFunctionInputType, userDefinedFunctionOutputType
elementCount, maxBundleSize, pythonFunctionRunner
Constructor and Description |
---|
AbstractArrowPythonAggregateFunctionOperator(org.apache.flink.configuration.Configuration config,
org.apache.flink.table.functions.python.PythonFunctionInfo[] pandasAggFunctions,
org.apache.flink.table.types.logical.RowType inputType,
org.apache.flink.table.types.logical.RowType outputType,
int[] groupingSet,
int[] udafInputOffsets) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
org.apache.flink.table.data.RowData |
getFunctionInput(org.apache.flink.table.data.RowData element) |
String |
getFunctionUrn() |
String |
getInputOutputCoderUrn() |
org.apache.flink.table.functions.python.PythonEnv |
getPythonEnv()
Returns the
PythonEnv used to create PythonEnvironmentManager.. |
FlinkFnApi.UserDefinedFunctions |
getUserDefinedFunctionsProto()
Gets the proto representation of the Python user-defined functions to be executed.
|
boolean |
isBundleFinished()
Returns whether the bundle is finished.
|
void |
open() |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element) |
bufferInput, createPythonFunctionRunner, processElementInternal
endInput
checkInvokeFinishBundleByCount, close, createPythonEnvironmentManager, emitResult, emitResults, getConfig, getFlinkMetricContainer, getPythonConfig, invokeFinishBundle, prepareSnapshotPreBarrier, processWatermark, setCurrentKey, setPythonConfig
getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setKeyContextElement
close, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
protected final org.apache.flink.table.functions.python.PythonFunctionInfo[] pandasAggFunctions
AggregateFunction
s to be executed.protected final int[] groupingSet
protected transient ArrowSerializer<org.apache.flink.table.data.RowData> arrowSerializer
protected transient StreamRecordRowDataWrappingCollector rowDataWrapper
protected transient org.apache.flink.table.data.utils.JoinedRowData reuseJoinedRow
protected transient int currentBatchCount
public AbstractArrowPythonAggregateFunctionOperator(org.apache.flink.configuration.Configuration config, org.apache.flink.table.functions.python.PythonFunctionInfo[] pandasAggFunctions, org.apache.flink.table.types.logical.RowType inputType, org.apache.flink.table.types.logical.RowType outputType, int[] groupingSet, int[] udafInputOffsets)
public void open() throws Exception
open
in interface org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>
open
in class AbstractStatelessFunctionOperator<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
Exception
public void dispose() throws Exception
dispose
in interface org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>
dispose
in interface org.apache.flink.util.Disposable
dispose
in class AbstractPythonFunctionOperator<org.apache.flink.table.data.RowData>
Exception
public void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element) throws Exception
processElement
in interface org.apache.flink.streaming.api.operators.Input<org.apache.flink.table.data.RowData>
processElement
in class AbstractStatelessFunctionOperator<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
Exception
public boolean isBundleFinished()
AbstractPythonFunctionOperator
isBundleFinished
in class AbstractPythonFunctionOperator<org.apache.flink.table.data.RowData>
public org.apache.flink.table.functions.python.PythonEnv getPythonEnv()
AbstractPythonFunctionOperator
PythonEnv
used to create PythonEnvironmentManager..getPythonEnv
in class AbstractPythonFunctionOperator<org.apache.flink.table.data.RowData>
public String getFunctionUrn()
getFunctionUrn
in class AbstractStatelessFunctionOperator<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
public String getInputOutputCoderUrn()
getInputOutputCoderUrn
in class AbstractStatelessFunctionOperator<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
public org.apache.flink.table.data.RowData getFunctionInput(org.apache.flink.table.data.RowData element)
getFunctionInput
in class AbstractStatelessFunctionOperator<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
public FlinkFnApi.UserDefinedFunctions getUserDefinedFunctionsProto()
AbstractStatelessFunctionOperator
getUserDefinedFunctionsProto
in class AbstractStatelessFunctionOperator<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.