{"record":{"id":"eb0a4bfe3499dff3","repo":"apache/flink","slug":"do-not-support-field-type","errorCode":null,"errorMessage":"do not support field type: ","messagePattern":"do not support field type: ","errorType":"exception","errorClass":"PbCodegenException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-protobuf/src/main/java/org/apache/flink/formats/protobuf/util/PbCodegenUtils.java","lineNumber":126,"sourceCode":"                typeStr = \"String\";\n                break;\n            case ENUM:\n                typeStr = PbFormatUtils.getFullJavaName(fd.getEnumType());\n                break;\n            case FLOAT:\n                typeStr = \"Float\";\n                break;\n            case DOUBLE:\n                typeStr = \"Double\";\n                break;\n            case BYTE_STRING:\n                typeStr = \"ByteString\";\n                break;\n            case BOOLEAN:\n                typeStr = \"Boolean\";\n                break;\n            default:\n                throw new PbCodegenException(\"do not support field type: \" + fd.getJavaType());\n        }\n        if (isList) {\n            return \"List<\" + typeStr + \">\";\n        } else {\n            return typeStr;\n        }\n    }\n\n    /**\n     * Get java type str from {@link LogicalType} which directly fetched from flink type.\n     *\n     * @return The returned code phrase will be used as java type str in codegen sections.\n     */\n    public static String getTypeStrFromLogicType(LogicalType type) {\n        switch (type.getTypeRoot()) {\n            case INTEGER:\n                return \"int\";\n            case BIGINT:","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-protobuf/src/main/java/org/apache/flink/formats/protobuf/util/PbCodegenUtils.java#L108-L144","documentation":"getTypeStrFromProto maps a proto field's JavaType to a Java type string used in generated code. The default branch throws for unhandled JavaTypes — typically MESSAGE or ENUM landing here, since the caller should have routed those elsewhere. A throw here indicates an inconsistent dispatch path (bug) or a protobuf runtime version exposing types this flink-protobuf build does not know.","triggerScenarios":"A message/enum proto field being processed where only simple java types are expected, e.g. an array of messages whose element type string is requested from the wrong branch.","commonSituations":"Schema mismatch between DDL and proto class (message field declared as scalar); mismatched protobuf-java/flink-protobuf versions after an upgrade.","solutions":["Diff the DDL against the current .proto; make message fields ROW(...) and enum fields INT/VARCHAR.","Regenerate the protobuf Java classes and ensure the pipeline compiles against them.","Pin compatible flink-protobuf and protobuf-java versions (do not override in user jars).","If consistent, report a JIRA — this default should be unreachable for valid dispatch."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"Set<FieldDescriptor.JavaType> supported = EnumSet.of(\n    FieldDescriptor.JavaType.INT, FieldDescriptor.JavaType.LONG,\n    FieldDescriptor.JavaType.FLOAT, FieldDescriptor.JavaType.DOUBLE,\n    FieldDescriptor.JavaType.BOOLEAN, FieldDescriptor.JavaType.BYTE_STRING,\n    FieldDescriptor.JavaType.STRING, FieldDescriptor.JavaType.ENUM);\nif (!supported.contains(fd.getJavaType())) fail(fd);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Regenerate proto Java classes whenever the .proto changes and rebuild the job.","Avoid mixing protobuf-java versions between the proto classes and the Flink runtime."],"tags":["protobuf","codegen","version-conflict"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}