{"record":{"id":"d7ca7e282a3ff621","repo":"apache/seatunnel","slug":"unsupported-data-type-d7ca7e","errorCode":"UNSUPPORTED_DATA_TYPE","errorMessage":"Unexpected value: ","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/kingbase/KingbaseJdbcRowConverter.java","lineNumber":118,"sourceCode":"                    fields[fieldIndex] =\n                            Optional.ofNullable(sqlTimestamp)\n                                    .map(Timestamp::toLocalDateTime)\n                                    .orElse(null);\n                    break;\n                case TIMESTAMP_TZ:\n                    fields[fieldIndex] = JdbcFieldTypeUtils.getOffsetDateTime(rs, resultSetIndex);\n                    break;\n                case BYTES:\n                    fields[fieldIndex] = JdbcFieldTypeUtils.getBytes(rs, resultSetIndex);\n                    break;\n                case NULL:\n                    fields[fieldIndex] = null;\n                    break;\n                case ROW:\n                case MAP:\n                case ARRAY:\n                default:\n                    throw new JdbcConnectorException(\n                            CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,\n                            \"Unexpected value: \" + seaTunnelDataType);\n            }\n        }\n        return new SeaTunnelRow(fields);\n    }\n\n    @Override\n    public PreparedStatement toExternal(\n            TableSchema tableSchema,\n            @Nullable TableSchema databaseTableSchema,\n            SeaTunnelRow row,\n            PreparedStatement statement)\n            throws SQLException {\n        SeaTunnelRowType rowType = tableSchema.toPhysicalRowDataType();\n        for (int fieldIndex = 0; fieldIndex < rowType.getTotalFields(); fieldIndex++) {\n            SeaTunnelDataType<?> seaTunnelDataType = rowType.getFieldType(fieldIndex);\n            int statementIndex = fieldIndex + 1;","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/kingbase/KingbaseJdbcRowConverter.java#L100-L136","documentation":"KingbaseJdbcRowConverter.toInternal hits its default switch branch when converting a JDBC value whose SeaTunnel data type is ROW, MAP, ARRAY, or any otherwise-unhandled type. The Kingbase row converter does not implement conversion for composite types, so it throws UNSUPPORTED_DATA_TYPE.","triggerScenarios":"Reading a Kingbase table whose schema is mapped (via KingbaseTypeMapper) to SeaTunnel ROW, MAP, or ARRAY column types; toInternal's switch on SeaTunnelDataType falls through to default.","commonSituations":"Tables with structured/complex or array-like columns (e.g. Kingbase JSON/structured columns mapped to complex SeaTunnel types); schema mismatch between the configured schema and the physical table.","solutions":["Exclude complex columns from the configured schema; select only scalar columns.","Cast the column in the query (e.g. to VARCHAR/TEXT) and read it as a string.","Implement the missing case in KingbaseJdbcRowConverter.toInternal to support the type."],"exampleFix":"// before\ncolumns = [\"id\", \"tags\"]  // tags is an array column\n// after\ncolumns = [\"id\", \"CAST(tags AS VARCHAR) AS tags\"]  // read as string","handlingStrategy":"validation","validationCode":"// Before the sink/source run, assert no composite columns\nboolean hasComplex = schema.getFields().stream()\n  .anyMatch(f -> f.getDataType() instanceof SeaTunnelRowType\n      || f.getDataType() instanceof SeaTunnelMapType\n      || f.getDataType() instanceof SeaTunnelArrayType);\nif (hasComplex) throw new IllegalArgumentException(\"Kingbase JDBC converter does not support ROW/MAP/ARRAY columns\");","typeGuard":null,"tryCatchPattern":"try {\n  row = converter.toInternal(resultSet);\n} catch (JdbcConnectorException e) {\n  if (e.getCode() == CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE) {\n    // cast the offending column to VARCHAR in the query and re-read as STRING\n  }\n}","preventionTips":["Declare only scalar column types in the Kingbase connector schema.","Cast structured DB columns to VARCHAR/TEXT in the query.","Check the type mapper output for your table before enabling the connector."],"tags":["jdbc","kingbase","row-converter","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"}