Search in sources :

Example 1 with ArrowSerializer

use of org.apache.flink.table.runtime.arrow.serializers.ArrowSerializer in project flink by apache.

the class ArrowPythonScalarFunctionOperator method open.

@Override
public void open() throws Exception {
    super.open();
    maxArrowBatchSize = Math.min(pythonConfig.getMaxArrowBatchSize(), maxBundleSize);
    arrowSerializer = new ArrowSerializer(udfInputType, udfOutputType);
    arrowSerializer.open(bais, baos);
    currentBatchCount = 0;
}
Also used : ArrowSerializer(org.apache.flink.table.runtime.arrow.serializers.ArrowSerializer)

Example 2 with ArrowSerializer

use of org.apache.flink.table.runtime.arrow.serializers.ArrowSerializer in project flink by apache.

the class AbstractArrowPythonAggregateFunctionOperator method open.

@SuppressWarnings("unchecked")
@Override
public void open() throws Exception {
    super.open();
    rowDataWrapper = new StreamRecordRowDataWrappingCollector(output);
    reuseJoinedRow = new JoinedRowData();
    udafInputProjection = udafInputGeneratedProjection.newInstance(Thread.currentThread().getContextClassLoader());
    arrowSerializer = new ArrowSerializer(udfInputType, udfOutputType);
    arrowSerializer.open(bais, baos);
    currentBatchCount = 0;
}
Also used : StreamRecordRowDataWrappingCollector(org.apache.flink.table.runtime.operators.python.utils.StreamRecordRowDataWrappingCollector) JoinedRowData(org.apache.flink.table.data.utils.JoinedRowData) ArrowSerializer(org.apache.flink.table.runtime.arrow.serializers.ArrowSerializer)

Aggregations

ArrowSerializer (org.apache.flink.table.runtime.arrow.serializers.ArrowSerializer)2 JoinedRowData (org.apache.flink.table.data.utils.JoinedRowData)1 StreamRecordRowDataWrappingCollector (org.apache.flink.table.runtime.operators.python.utils.StreamRecordRowDataWrappingCollector)1