{"record":{"id":"0af4480aa99a4cfb","repo":"apache/flink","slug":"unsupported-data-type-in-schema-0af448","errorCode":null,"errorMessage":"Unsupported data type in schema: ","messagePattern":"Unsupported data type in schema: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-protobuf/src/main/java/org/apache/flink/formats/protobuf/util/PbCodegenUtils.java","lineNumber":71,"sourceCode":"            case DOUBLE:\n                return flinkContainerCode + \".getDouble(\" + index + \")\";\n            case BOOLEAN:\n                return flinkContainerCode + \".getBoolean(\" + index + \")\";\n            case VARCHAR:\n            case CHAR:\n                return flinkContainerCode + \".getString(\" + index + \")\";\n            case VARBINARY:\n            case BINARY:\n                return flinkContainerCode + \".getBinary(\" + index + \")\";\n            case ROW:\n                int size = eleType.getChildren().size();\n                return flinkContainerCode + \".getRow(\" + index + \", \" + size + \")\";\n            case MAP:\n                return flinkContainerCode + \".getMap(\" + index + \")\";\n            case ARRAY:\n                return flinkContainerCode + \".getArray(\" + index + \")\";\n            default:\n                throw new IllegalArgumentException(\"Unsupported data type in schema: \" + eleType);\n        }\n    }\n\n    /**\n     * Get java type str from {@link FieldDescriptor} which directly fetched from protobuf object.\n     *\n     * @return The returned code phrase will be used as java type str in codegen sections.\n     * @throws PbCodegenException\n     */\n    public static String getTypeStrFromProto(FieldDescriptor fd, boolean isList)\n            throws PbCodegenException {\n        String typeStr;\n        switch (fd.getJavaType()) {\n            case MESSAGE:\n                if (fd.isMapField()) {\n                    // map\n                    FieldDescriptor keyFd =\n                            fd.getMessageType().findFieldByName(PbConstant.PB_MAP_KEY_NAME);","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-protobuf/src/main/java/org/apache/flink/formats/protobuf/util/PbCodegenUtils.java#L53-L89","documentation":"PbCodegenUtils generates the RowData accessor call (getInt/getString/getRow/...) by switching on the element's type root. The default branch throws IllegalArgumentException for type roots with no RowData accessor mapping — effectively any type the protobuf codegen does not support appearing where an accessor must be generated.","triggerScenarios":"Codegen needs to read a field whose LogicalTypeRoot is not in the switch (e.g. MULTISET, STRUCTURED_TYPE, DISTINCT_TYPE, RAW) inside a row/array/map being (de)serialized by the protobuf format.","commonSituations":"Deeply nested schemas with unsupported intermediate types; views that introduce multiset/structured types into a protobuf-mapped projection.","solutions":["Flatten or cast the offending nested field to supported types (primitives, ROW, ARRAY, MAP).","Move computed/unsupported columns out of the protobuf-mapped part of the plan.","Search the exception's stack for the calling codegen class to identify which field triggered accessor generation."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"void assertAccessorExists(LogicalType t) {\n    switch (t.getTypeRoot()) {\n        case MULTISET: case STRUCTURED_TYPE: case DISTINCT_TYPE: case RAW:\n            throw new IllegalArgumentException(\"No RowData accessor codegen for \" + t);\n        default:\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep every nested level of protobuf-mapped schemas to primitives/ROW/ARRAY/MAP.","Add a CI schema check that walks the full RowType tree before deployment."],"tags":["protobuf","codegen","rowdata","type-mapping"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}