{"record":{"id":"94a273c540768b07","repo":"apache/seatunnel","slug":"common-unsupported-data-type-94a273","errorCode":"COMMON_UNSUPPORTED_DATA_TYPE","errorMessage":"User defined schema validation failed","messagePattern":"User defined schema validation failed","errorType":"error_code","errorClass":"FileConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/excel/ExcelCellUtils.java","lineNumber":146,"sourceCode":"                return (byte) Double.parseDouble(fieldValue);\n            case SMALLINT:\n                return (short) Double.parseDouble(fieldValue);\n            case DECIMAL:\n                return BigDecimal.valueOf(Double.parseDouble(fieldValue));\n            case DATE:\n                return parseDate(field, fieldType);\n            case TIME:\n                return parseTime(field, fieldType);\n            case TIMESTAMP:\n                return parseTimestamp(field, fieldType);\n            case NULL:\n                return null;\n            case BYTES:\n                return fieldValue.getBytes(StandardCharsets.UTF_8);\n            case ROW:\n                return parseRow(fieldValue, fieldType);\n            default:\n                throw new FileConnectorException(\n                        CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,\n                        \"User defined schema validation failed\");\n        }\n    }\n\n    private Object parseDate(Object fieldValue, SeaTunnelDataType<?> fieldType) {\n        if (fieldValue instanceof LocalDateTime) {\n            return ((LocalDateTime) fieldValue).toLocalDate();\n        }\n        return LocalDate.parse(fieldValue.toString(), dateFormatter);\n    }\n\n    private Object parseTime(Object fieldValue, SeaTunnelDataType<?> fieldType) {\n        if (fieldValue instanceof LocalDateTime) {\n            return ((LocalDateTime) fieldValue).toLocalTime();\n        }\n        return LocalTime.parse(fieldValue.toString(), timeFormatter);\n    }","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/excel/ExcelCellUtils.java#L128-L164","documentation":"ExcelCellUtils.convert maps SeaTunnel schema field types to Java values when reading Excel. If the declared schema contains a field type the converter does not handle (anything beyond the known cases like STRING, INT, DATE, ROW, BYTES, etc.), the default branch throws FileConnectorException with UNSUPPORTED_DATA_TYPE.","triggerScenarios":"Reading an Excel file with a user-defined schema (schema = { fields { ... } }) containing a field whose SeaTunnelDataType has no conversion branch in ExcelCellUtils.convert, e.g. MAP, ARRAY, or a nested complex type in a cell value.","commonSituations":"Declaring a schema with complex types (arrays/maps) for Excel columns; schema drift after upgrading SeaTunnel where a type was added upstream but not to the Excel converter; typo-driven type inference producing an unexpected type.","solutions":["Simplify the user-defined schema for the Excel source to scalar types (string, int, bigint, double, boolean, date, timestamp)","Change complex-typed columns to string and parse them downstream in a transform","Check the SeaTunnel version; upgrade to a release where the Excel converter supports the needed type"],"exampleFix":"// before\nschema = {\n  fields {\n    tags = \"array<string>\"\n  }\n}\n// after\nschema = {\n  fields {\n    tags = \"string\"\n  }\n}","handlingStrategy":"validation","validationCode":"schema.getFieldTypes().forEach(t -> {\n    if (!(t instanceof BasicType || t == LocalTimeType.LOCAL_DATE || t == LocalTimeType.LOCAL_TIME || t == LocalTimeType.LOCAL_DATE_TIME)) {\n        throw new IllegalArgumentException(\"Excel source supports only scalar field types, got: \" + t);\n    }\n});","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep Excel schemas to scalar types only","Avoid array/map/row types in Excel user-defined schemas"],"tags":["excel","schema","data-type"],"backgroundTag":"schema-validation-failed","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"}