Class PbCodegenSimpleSerializer
- java.lang.Object
-
- org.apache.flink.formats.protobuf.serialize.PbCodegenSimpleSerializer
-
- All Implemented Interfaces:
PbCodegenSerializer
public class PbCodegenSimpleSerializer extends Object implements PbCodegenSerializer
Serializer to convert flink simple type data to proto simple type object.
-
-
Constructor Summary
Constructors Constructor Description PbCodegenSimpleSerializer(com.google.protobuf.Descriptors.FieldDescriptor fd, org.apache.flink.table.types.logical.LogicalType type, PbFormatContext formatContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcodegen(String resultVar, String flinkObjectCode, int indent)
-
-
-
Constructor Detail
-
PbCodegenSimpleSerializer
public PbCodegenSimpleSerializer(com.google.protobuf.Descriptors.FieldDescriptor fd, org.apache.flink.table.types.logical.LogicalType type, PbFormatContext formatContext)
-
-
Method Detail
-
codegen
public String codegen(String resultVar, String flinkObjectCode, int indent) throws PbCodegenException
- Specified by:
codegenin interfacePbCodegenSerializer- Parameters:
resultVar- the final var name that is calculated by codegen. This var name will be used by outsider codegen environment.resultVariableshould be protobuf objectflinkObjectCode- may be a variable or expression. Current codegen environment can use this literal name directly to access the input.flinkObjectshould be a flink internal object.- Returns:
- The java code generated
- Throws:
PbCodegenException
-
-