{"record":{"id":"07ba4c32bd6c98f8","repo":"apache/seatunnel","slug":"commonerrorcodedeprecated-unsupported-data-type-07ba4c","errorCode":"CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE","errorMessage":"Unsupported data type: {seaTunnelFieldType}","messagePattern":"Unsupported data type: (.+?)","errorType":"error_code","errorClass":"IotdbConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-iotdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/iotdb/serialize/DefaultSeaTunnelRowDeserializer.java","lineNumber":80,"sourceCode":"            SeaTunnelDataType<?> seaTunnelFieldType = rowType.getFieldType(i);\n            seaTunnelFields[i] = convert(seaTunnelFieldType, field);\n        }\n        return new SeaTunnelRow(seaTunnelFields);\n    }\n\n    private Object convert(SeaTunnelDataType<?> seaTunnelFieldType, Field field) {\n        switch (field.getDataType()) {\n            case INT32:\n                Number int32 = field.getIntV();\n                switch (seaTunnelFieldType.getSqlType()) {\n                    case TINYINT:\n                        return int32.byteValue();\n                    case SMALLINT:\n                        return int32.shortValue();\n                    case INT:\n                        return int32.intValue();\n                    default:\n                        throw new IotdbConnectorException(\n                                CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,\n                                \"Unsupported data type: \" + seaTunnelFieldType);\n                }\n            case INT64:\n                return field.getLongV();\n            case FLOAT:\n                return field.getFloatV();\n            case DOUBLE:\n                return field.getDoubleV();\n            case TEXT:\n                return field.getStringValue();\n            case BOOLEAN:\n                return field.getBoolV();\n            default:\n                throw new IotdbConnectorException(\n                        CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,\n                        \"Unsupported data type: \" + field.getDataType());\n        }","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-iotdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/iotdb/serialize/DefaultSeaTunnelRowDeserializer.java#L62-L98","documentation":"In DefaultSeaTunnelRowDeserializer, when converting an IoTDB INT32 field to a SeaTunnel field, only TINYINT/SMALLINT/INT target types are supported; any other SeaTunnelFieldType falls into the default branch and throws UNSUPPORTED_DATA_TYPE. The declared column type in the SeaTunnel schema cannot hold the IoTDB INT32 measurement value.","triggerScenarios":"Calling convert() on an IoTDB Field with data type INT32 while the corresponding SeaTunnelRowType column's SqlType is not TINYINT, SMALLINT, or INT (e.g. FLOAT, DOUBLE, STRING, BOOLEAN).","commonSituations":"User declared an IoTDB INT32 measurement as FLOAT/STRING in the SeaTunnel schema; auto catalog type mapping produced an unexpected type after an IoTDB version upgrade; copy-pasted schema from another table.","solutions":["Change the SeaTunnel schema column type to INT (or SMALLINT/TINYINT) to match the IoTDB INT32 measurement","Use a SQL cast / transform in the pipeline to convert the value to the desired type after reading","Check IoTDB 'SHOW TIMESERIES' to confirm the storage data type, then align the source schema"],"exampleFix":"// before\nSeaTunnelRowType rowType = new SeaTunnelRowType(new String[]{\"time\",\"temp\"}, new SeaTunnelDataType[]{LocalDateTimeType.class... , new FloatType()});\n// after (IoTDB field is INT32)\n... new IntType() for the \"temp\" column ...","handlingStrategy":"validation","validationCode":"// check declared type against IoTDB storage type\n// SHOW TIMESERIES root.db.device1.s_temp => dataType=INT32\n// ensure matching SeaTunnel column is IntType/SmallIntType/TinyIntType, not FloatType","typeGuard":"boolean int32Compatible(SeaTunnelDataType<?> t) {\n    SqlType s = t.getSqlType();\n    return s == SqlType.TINYINT || s == SqlType.SMALLINT || s == SqlType.INT;\n}","tryCatchPattern":"try {\n    Object v = deserializer.deserialize(field, fieldType);\n} catch (IotdbConnectorException e) {\n    if (e.getCode() == CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE) {\n        // fix schema: INT32 IoTDB field must map to TINYINT/SMALLINT/INT\n    } else { throw e; }\n}","preventionTips":["Run SHOW TIMESERIES to confirm each measurement's storage type before writing the schema","Keep SeaTunnel column types aligned with IoTDB TSDataType (INT32->INT, INT64->BIGINT, FLOAT->FLOAT, DOUBLE->DOUBLE, TEXT->STRING, BOOLEAN->BOOLEAN)"],"tags":["iotdb","type-mapping","deserialization"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}