Class PbCodegenRowSerializer
- java.lang.Object
-
- org.apache.flink.formats.protobuf.serialize.PbCodegenRowSerializer
-
- All Implemented Interfaces:
PbCodegenSerializer
public class PbCodegenRowSerializer extends Object implements PbCodegenSerializer
Serializer to convert flink row type data to proto row type object.
-
-
Constructor Summary
Constructors Constructor Description PbCodegenRowSerializer(com.google.protobuf.Descriptors.Descriptor descriptor, org.apache.flink.table.types.logical.RowType rowType, PbFormatContext formatContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcodegen(String resultVar, String flinkObjectCode, int indent)
-
-
-
Constructor Detail
-
PbCodegenRowSerializer
public PbCodegenRowSerializer(com.google.protobuf.Descriptors.Descriptor descriptor, org.apache.flink.table.types.logical.RowType rowType, 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
-
-