Class PbCodegenRowDeserializer
- java.lang.Object
-
- org.apache.flink.formats.protobuf.deserialize.PbCodegenRowDeserializer
-
- All Implemented Interfaces:
PbCodegenDeserializer
public class PbCodegenRowDeserializer extends Object implements PbCodegenDeserializer
Deserializer to convert proto message type object to flink row type data.
-
-
Constructor Summary
Constructors Constructor Description PbCodegenRowDeserializer(com.google.protobuf.Descriptors.Descriptor descriptor, RowType rowType, PbFormatContext formatContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
codegen(String resultVar, String pbObjectCode, int indent)
-
-
-
Constructor Detail
-
PbCodegenRowDeserializer
public PbCodegenRowDeserializer(com.google.protobuf.Descriptors.Descriptor descriptor, RowType rowType, PbFormatContext formatContext)
-
-
Method Detail
-
codegen
public String codegen(String resultVar, String pbObjectCode, int indent) throws PbCodegenException
- Specified by:
codegen
in interfacePbCodegenDeserializer
- Parameters:
resultVar
- the final var name that is calculated by codegen. This var name will be used by outsider codegen environment.resultVariable
should be flink objectpbObjectCode
- may be a variable or expression. Current codegen environment can use this literal name directly to access the input.pbObject
should be a protobuf object- Returns:
- The java code generated
- Throws:
PbCodegenException
-
-