{"record":{"id":"f7b56e80cb219ab5","repo":"apache/seatunnel","slug":"common-error-code-1","errorCode":"COMMON_ERROR_CODE-1","errorMessage":"ReadColumn: unsupported ORC file column type: ","messagePattern":"ReadColumn: unsupported ORC file column type: ","errorType":"exception","errorClass":"FileConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/OrcReadStrategy.java","lineNumber":410,"sourceCode":"                    columnObj = readDecimalVal(colVec, dataType, rowNum);\n                    break;\n                case TIMESTAMP:\n                    columnObj = readTimestampVal(colVec, colType, dataType, rowNum);\n                    break;\n                case STRUCT:\n                    columnObj = readStructVal(colVec, colType, dataType, rowNum, charset);\n                    break;\n                case LIST:\n                    columnObj = readListVal(colVec, colType, rowNum);\n                    break;\n                case MAP:\n                    columnObj = readMapVal(colVec, colType, rowNum);\n                    break;\n                case UNION:\n                    columnObj = readUnionVal(colVec, colType, rowNum, charset);\n                    break;\n                default:\n                    throw new FileConnectorException(\n                            CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,\n                            \"ReadColumn: unsupported ORC file column type: \" + colVec.type.name());\n            }\n        }\n        return columnObj;\n    }\n\n    private Object readLongVal(\n            ColumnVector colVec,\n            TypeDescription colType,\n            SeaTunnelDataType<?> dataType,\n            int rowNum) {\n        Object colObj = null;\n        if (!colVec.isNull[rowNum]) {\n            LongColumnVector longVec = (LongColumnVector) colVec;\n            long longVal = longVec.vector[rowNum];\n            colObj = longVal;\n            if (colType.getCategory() == TypeDescription.Category.INT) {","sourceCodeStart":392,"sourceCodeEnd":428,"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/source/reader/OrcReadStrategy.java#L392-L428","documentation":"OrcReadStrategy.readColumn encountered an ORC ColumnVector whose TypeDescription category has no case in the readColumn switch, so it cannot be converted to a SeaTunnel value. The library throws FileConnectorException with ILLEGAL_ARGUMENT because ORC types outside the supported set (e.g. exotic or newly added ORC categories) cannot be mapped. It is a hard fail of the read, not a data-value issue.","triggerScenarios":"Reading an ORC file whose schema contains a column type not handled by readColumn's switch (anything beyond the implemented primitives, struct, map, list, union cases); called from read, readStructVal, or unionValue while processing a row.","commonSituations":"ORC files written by newer Hive/Spark versions using ORC categories the connector doesn't cover; schema evolution adding an unsupported column; misconfigured seaTunnel schema implying a type the ORC reader can't materialize.","solutions":["Inspect the ORC file schema (e.g. `orc-tools meta <file>` or Hive `describe`) and identify the unsupported column type name from the message.","Exclude or cast the unsupported column before reading, or select only supported columns via readColumns configuration.","Re-write the ORC file with supported types (e.g. convert exotic types to string/struct of primitives).","If the type is common (e.g. a newer ORC category), add a case to readColumn in OrcReadStrategy and contribute upstream."],"exampleFix":"// before (schema: col DECIMAL with unhandled variant)\nread columns: [\"a\", \"mystery_col\"]\n\n// after: restrict to supported columns\nread columns: [\"a\"] // or CAST mystery_col to STRING when writing the ORC file","handlingStrategy":"validation","validationCode":"// Before reading, inspect the ORC schema and check every category\nTypeDescription schema = reader.getSchema();\nfor (TypeDescription col : schema.getChildren()) {\n    Set<Category> supported = EnumSet.of(BOOLEAN, BYTE, SHORT, INT, LONG, FLOAT, DOUBLE,\n        STRING, VARCHAR, CHAR, DATE, TIMESTAMP, DECIMAL, BINARY, LIST, MAP, STRUCT, UNION);\n    if (!supported.contains(col.getCategory())) {\n        throw new IllegalStateException(\"Unsupported ORC column type: \" + col.getCategory());\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    rows = orcSource.read();\n} catch (FileConnectorException e) {\n    if (e.getMessage().contains(\"unsupported ORC file column type\")) {\n        // fall back to reading file metadata, exclude the offending column, reconfigure\n    } else throw e;\n}","preventionTips":["Run orc-tools meta on sample files before wiring the connector","Keep source schemas to well-supported ORC primitives and simple containers","Avoid nested/unusual ORC categories from newer engine writers","Pin a consistent SeaTunnel + ORC version for writer and reader"],"tags":["orc","unsupported-type","file-connector","schema"],"backgroundTag":"unsupported-enum-value","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"}