Java Code Examples for org.apache.flink.types.Row#project()

The following examples show how to use org.apache.flink.types.Row#project() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractRowPythonScalarFunctionOperator.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void bufferInput(CRow input) {
	CRow forwardedFieldsRow = new CRow(Row.project(input.row(), forwardedFields), input.change());
	if (getExecutionConfig().isObjectReuseEnabled()) {
		forwardedFieldsRow = forwardedInputSerializer.copy(forwardedFieldsRow);
	}
	forwardedInputQueue.add(forwardedFieldsRow);
}
 
Example 2
Source File: AbstractPythonScalarFunctionFlatMap.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void bufferInput(Row input) {
	Row forwardedFieldsRow = Row.project(input, forwardedFields);
	if (getRuntimeContext().getExecutionConfig().isObjectReuseEnabled()) {
		forwardedFieldsRow = forwardedInputSerializer.copy(forwardedFieldsRow);
	}
	forwardedInputQueue.add(forwardedFieldsRow);
}
 
Example 3
Source File: RowPartitionComputer.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public Row projectColumnsToWrite(Row in) {
	return partitionIndexes.length == 0 ? in : Row.project(in, nonPartitionIndexes);
}
 
Example 4
Source File: PythonTableFunctionOperator.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public Row getFunctionInput(CRow element) {
	return Row.project(element.row(), userDefinedFunctionInputOffsets);
}
 
Example 5
Source File: AbstractRowPythonScalarFunctionOperator.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public Row getFunctionInput(CRow element) {
	return Row.project(element.row(), userDefinedFunctionInputOffsets);
}
 
Example 6
Source File: AbstractPythonStatelessFunctionFlatMap.java    From flink with Apache License 2.0 4 votes vote down vote up
private Row getFunctionInput(Row element) {
	return Row.project(element, userDefinedFunctionInputOffsets);
}