Java Code Examples for org.apache.flink.api.java.typeutils.RowTypeInfo#createSerializer()
The following examples show how to use
org.apache.flink.api.java.typeutils.RowTypeInfo#createSerializer() .
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: AbstractPythonScalarFunctionFlatMap.java From flink with Apache License 2.0 | 5 votes |
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); RowTypeInfo forwardedInputTypeInfo = new RowTypeInfo( Arrays.stream(forwardedFields) .mapToObj(i -> inputType.getFields().get(i)) .map(RowType.RowField::getType) .map(TypeConversions::fromLogicalToDataType) .map(TypeConversions::fromDataTypeToLegacyInfo) .toArray(TypeInformation[]::new)); forwardedInputSerializer = forwardedInputTypeInfo.createSerializer(getRuntimeContext().getExecutionConfig()); }
Example 2
Source File: PythonTableFunctionFlatMap.java From flink with Apache License 2.0 | 5 votes |
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); RowTypeInfo forwardedInputTypeInfo = (RowTypeInfo) TypeConversions.fromDataTypeToLegacyInfo( TypeConversions.fromLogicalToDataType(inputType)); forwardedInputSerializer = forwardedInputTypeInfo.createSerializer(getRuntimeContext().getExecutionConfig()); }
Example 3
Source File: RowSerializerUpgradeTest.java From flink with Apache License 2.0 | 5 votes |
public static TypeSerializer<Row> createRowSerializer() { // in older branches, this writes in old format WITHOUT row kind; // in newer branches >= 1.11, this writes in new format WITH row kind final RowTypeInfo rowTypeInfo = new RowTypeInfo( BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.LONG_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO); return rowTypeInfo.createSerializer(new ExecutionConfig()); }
Example 4
Source File: RowSerializerMigrationTest.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
private static TypeSerializer<Row> stringLongRowSupplier() { RowTypeInfo rowTypeInfo = new RowTypeInfo(BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.LONG_TYPE_INFO); return rowTypeInfo.createSerializer(new ExecutionConfig()); }
Example 5
Source File: RowSerializerMigrationTest.java From flink with Apache License 2.0 | 4 votes |
private static TypeSerializer<Row> stringLongRowSupplier() { RowTypeInfo rowTypeInfo = new RowTypeInfo(BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.LONG_TYPE_INFO); return rowTypeInfo.createSerializer(new ExecutionConfig()); }