{"record":{"id":"d3b59f64455f016f","repo":"apache/seatunnel","slug":"commonerrorcodedeprecated-unsupported-data-type-d3b59f","errorCode":"CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE","errorMessage":"Unexpected value: ${seaTunnelDataType}","messagePattern":"Unexpected value: (.+?)","errorType":"error_code","errorClass":"JdbcConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/oceanbase/OceanBaseMysqlJdbcRowConverter.java","lineNumber":266,"sourceCode":"                        Object[] array = (Object[]) row.getField(fieldIndex);\n                        if (array == null) {\n                            statement.setNull(statementIndex, java.sql.Types.ARRAY);\n                            break;\n                        }\n                        if (SqlType.TINYINT.equals(elementType.getSqlType())) {\n                            Short[] shortArray = new Short[array.length];\n                            for (int i = 0; i < array.length; i++) {\n                                shortArray[i] = Short.valueOf(array[i].toString());\n                            }\n                            statement.setObject(statementIndex, shortArray);\n                        } else {\n                            statement.setObject(statementIndex, array);\n                        }\n                        break;\n                    case MAP:\n                    case ROW:\n                    default:\n                        throw new JdbcConnectorException(\n                                CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,\n                                \"Unexpected value: \" + seaTunnelDataType);\n                }\n            } catch (Exception e) {\n                throw new JdbcConnectorException(\n                        JdbcConnectorErrorCode.DATA_TYPE_CAST_FAILED,\n                        \"error field:\" + rowType.getFieldNames()[fieldIndex],\n                        e);\n            }\n        }\n        return statement;\n    }\n}\n","sourceCodeStart":248,"sourceCodeEnd":280,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/oceanbase/OceanBaseMysqlJdbcRowConverter.java#L248-L280","documentation":"OceanBaseMysqlJdbcRowConverter.toExternal maps SeaTunnel field types to JDBC statement setters. MAP and ROW types (and any other unrecognized type hitting the default branch) have no supported JDBC mapping here, so it throws JdbcConnectorException with UNSUPPORTED_DATA_TYPE naming the offending SeaTunnelDataType.","triggerScenarios":"Writing a row whose field is of SeaTunnel type MAP or ROW (or any type falling through the switch default) to an OceanBase MySQL-mode table via this row converter.","commonSituations":"Sourcing from a nested-data system (e.g. JSON/document source) and sinking directly to OceanBase without flattening; schema evolution introduced nested columns; a type added upstream that this converter version does not handle.","solutions":["Flatten nested MAP/ROW fields into primitive columns in a transform before the sink.","Serialize MAP/ROW to a JSON string column and write that instead.","Change the catalog schema so the field type is a supported scalar (string, int, decimal, etc.).","Upgrade the connector in case newer versions added handling for these types."],"exampleFix":"// before\nsink fields: id:INT, props:MAP<STRING,STRING>\n// after\nuse SqlTransform to flatten or:\nprops_json = props -> cast to STRING (JSON) so sink field is id:INT, props_json:STRING","handlingStrategy":"validation","validationCode":"// Before sink, check schema for nested types\nfor (SeaTunnelDataType<?> t : rowType.getFieldTypes()) {\n    if (t.getSqlType() == SqlType.MAP || t.getSqlType() == SqlType.ROW)\n        throw new IllegalArgumentException(\"Flatten MAP/ROW fields before OceanBase sink: \" + t);\n}","typeGuard":"// Java guard\nstatic boolean isFlat(CatalogTable table) {\n    return table.getTableSchema().toSeaTunnelRowType().getFieldTypes().stream()\n        .noneMatch(t -> t.getSqlType() == SqlType.MAP || t.getSqlType() == SqlType.ROW);\n}","tryCatchPattern":"catch (JdbcConnectorException e) { if (e.getSeaTunnelApiErrorCode() == CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE) { /* flatten schema or serialize nested field to JSON string */ } }","preventionTips":["Flatten or JSON-serialize nested MAP/ROW fields before JDBC sinks","Keep sink catalog schema aligned with flattened source schema","Check connector docs for supported SeaTunnel SQL types per dialect"],"tags":["jdbc","oceanbase","type-mapping","unsupported-type"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}