{"record":{"id":"26ba32e59a800702","repo":"apache/seatunnel","slug":"unsupported-data-type-26ba32","errorCode":"UNSUPPORTED_DATA_TYPE","errorMessage":"Orc file not support this type [%s]","messagePattern":"Orc file not support this type \\[(.+?)\\]","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/sink/writer/OrcWriteStrategy.java","lineNumber":224,"sourceCode":"            case DATE:\n                return TypeDescription.createDate();\n            case TIME:\n            case TIMESTAMP:\n                return TypeDescription.createTimestamp();\n            case ROW:\n                TypeDescription struct = TypeDescription.createStruct();\n                SeaTunnelDataType<?>[] fieldTypes = ((SeaTunnelRowType) type).getFieldTypes();\n                for (int i = 0; i < fieldTypes.length; i++) {\n                    struct.addField(\n                            ((SeaTunnelRowType) type).getFieldName(i),\n                            buildFieldWithRowType(fieldTypes[i]));\n                }\n                return struct;\n            case NULL:\n            default:\n                String errorMsg =\n                        String.format(\"Orc file not support this type [%s]\", type.getSqlType());\n                throw new FileConnectorException(\n                        CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE, errorMsg);\n        }\n    }\n\n    private TypeDescription buildSchemaWithRowType() {\n        TypeDescription schema = TypeDescription.createStruct();\n        for (Integer i : sinkColumnsIndexInRow) {\n            TypeDescription fieldType = buildFieldWithRowType(seaTunnelRowType.getFieldType(i));\n            schema.addField(seaTunnelRowType.getFieldName(i).toLowerCase(), fieldType);\n        }\n        return schema;\n    }\n\n    private void setColumn(Object value, ColumnVector vector, int row) {\n        if (value == null) {\n            vector.isNull[row] = true;\n            vector.noNulls = false;\n        } else {","sourceCodeStart":206,"sourceCodeEnd":242,"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/sink/writer/OrcWriteStrategy.java#L206-L242","documentation":"Thrown by OrcWriteStrategy.buildFieldWithRowType when a SeaTunnel column type cannot be mapped to an ORC TypeDescription. Only known types (INT, STRING, MAP, LIST, STRUCT, etc.) are supported; SQL type NULL and any unmapped/default type reach the default branch and abort schema construction.","triggerScenarios":"Source SeaTunnelRowType contains a column whose SqlType is NULL or otherwise not in the ORC mapping switch (e.g. an unsupported/unknown type from a custom or auto-generated schema).","commonSituations":"Sink schema auto-derived from a source that emits SeaTunnelRow.NULL / unknown types; transform added a column with an exotic type; custom serializer returning unmapped SqlTypes; using `null` typed placeholder columns in config.","solutions":["Remove or replace NULL/unsupported typed columns in the upstream schema before the ORC sink (use a transform to cast to STRING or drop the column)","Explicitly declare sink columns with supported ORC-mappable types instead of relying on schema auto-derivation","Check the source connector's produced SeaTunnelRowType for unmapped SqlTypes and upgrade/patch that connector","Extend the type mapping switch in a custom write strategy if you need the type"],"exampleFix":"// before\nColumn c = new Column(\"extra\", SeaTunnelRowType.NULL, 0); // reaches default branch\n// after\nColumn c = new Column(\"extra\", BasicType.STRING_TYPE, 0); // cast value to string upstream","handlingStrategy":"validation","validationCode":"// validate all sink columns are ORC-mappable before the job\nList<SqlType> bad = rowType.getFieldTypes().stream()\n    .map(t -> ((SeaTunnelDataType<?>) t).getSqlType())\n    .filter(t -> t == SqlType.NULL)\n    .collect(Collectors.toList());\nif (!bad.isEmpty()) throw new IllegalArgumentException(\"Unmappable ORC columns: \" + bad);","typeGuard":"boolean isOrcMappable(SqlType t) {\n    return t != SqlType.NULL; // and not in connector's known-unmapped set\n}","tryCatchPattern":"try {\n    orcSink.write(row);\n} catch (FileConnectorException e) {\n    if (CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE.equals(e.getErrorCode())\n            && e.getMessage().startsWith(\"Orc file not support\")) {\n        // add a transform to cast/drop the offending column, rerun\n    }\n}","preventionTips":["Declare sink schema columns explicitly with supported types","Cast NULL-typed or exotic columns to STRING in an upstream transform","Check the source connector's emitted SeaTunnelRowType for unmapped SqlTypes","Keep connector version updated for broader ORC type coverage"],"tags":["orc","schema","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"}