{"record":{"id":"71e7961a7ee4d3c1","repo":"apache/flink","slug":"unsupported-type-71e796","errorCode":null,"errorMessage":"Unsupported type: {}","messagePattern":"Unsupported type: (.+?)","errorType":"exception","errorClass":"java.lang.UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonParserToRowDataConverters.java","lineNumber":192,"sourceCode":"            case DECIMAL:\n                return createDecimalConverter((DecimalType) type);\n            case ARRAY:\n                return createArrayConverter((ArrayType) type);\n            case MAP:\n                MapType mapType = (MapType) type;\n                return createMapConverter(\n                        mapType.asSummaryString(), mapType.getKeyType(), mapType.getValueType());\n            case MULTISET:\n                MultisetType multisetType = (MultisetType) type;\n                return createMapConverter(\n                        multisetType.asSummaryString(),\n                        multisetType.getElementType(),\n                        new IntType());\n            case ROW:\n                return createRowConverter((RowType) type);\n            case RAW:\n            default:\n                throw new UnsupportedOperationException(\"Unsupported type: \" + type);\n        }\n    }\n\n    private boolean convertToBoolean(JsonParser jp) throws IOException {\n        if (jp.currentToken() == JsonToken.VALUE_TRUE) {\n            return true;\n        } else if (jp.currentToken() == JsonToken.VALUE_FALSE) {\n            return false;\n        } else {\n            return Boolean.parseBoolean(jp.getText().trim());\n        }\n    }\n\n    private byte convertToByte(JsonParser jp) throws IOException {\n        if (jp.currentToken() == JsonToken.VALUE_NUMBER_INT) {\n            // DON'T use jp.getByteValue() whose value is from -128 to 255 because of the unsigned\n            // value.\n            int value = jp.getIntValue();","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonParserToRowDataConverters.java#L174-L210","documentation":"UnsupportedOperationException from JsonParserToRowDataConverters.createConverter when the row type contains a logical type it cannot convert — the explicit case is RAW, and the default branch catches anything else the switch does not handle. It means the declared schema for the JSON source contains a type the streaming parser cannot map from JSON text.","triggerScenarios":"Defining a JSON table with a RAW-typed column (e.g., a TypeInformation-picked POJO/byte[] fallback), or an exotic/nested type that reaches the default branch of the converter switch.","commonSituations":"Schema derived automatically from a POJO where one field serialized as RAW; hand-written DDL using a type JSON cannot represent; using the json parser schema (JsonParserRowDataDeserializationSchema) where the classic Jackson-based schema would behave differently.","solutions":["Replace RAW columns with JSON-representable types (STRING, BYTES where supported, or flatten the structure)","For POJO fields, annotate/convert them to explicit SQL types in the DDL instead of schema derivation","Project the problematic column out (do not select/ingest it) if it is not needed"],"exampleFix":"-- before\ncfg AS RAW\n\n-- after\ncfg AS STRING","handlingStrategy":"validation","validationCode":"boolean hasUnsupported = LogicalTypeChecks.hasNested(\n    rowType, t -> t instanceof RawType);\nif (hasUnsupported) throw new UnsupportedOperationException(\"JSON cannot carry RAW columns\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never derive JSON-table schemas from POJOs with RAW-suspect fields","Review DDL for RAW or exotic types before registering a JSON table"],"tags":["flink","json","schema","raw-type","converter"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}