{"record":{"id":"4e5c206fe3c651f6","repo":"apache/seatunnel","slug":"illegal-argument-4e5c20","errorCode":"ILLEGAL_ARGUMENT","errorMessage":"Hive connector only support [text parquet orc] table now","messagePattern":"Hive connector only support \\[text parquet orc\\] table now","errorType":"error_code","errorClass":"HiveConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/config/HiveSourceConfig.java","lineNumber":308,"sourceCode":"    private CatalogTable parseCatalogTable(\n            ReadonlyConfig readonlyConfig,\n            ReadStrategy readStrategy,\n            FileFormat fileFormat,\n            HadoopConf hadoopConf,\n            List<String> filePaths,\n            Table table) {\n        if (CollectionUtils.isEmpty(filePaths)) {\n            return handleEmptyFilesFallback(readonlyConfig, table);\n        }\n        switch (fileFormat) {\n            case PARQUET:\n            case ORC:\n                return parseCatalogTableFromRemotePath(\n                        readonlyConfig, hadoopConf, filePaths, table);\n            case TEXT:\n                return parseCatalogTableFromTable(readonlyConfig, readStrategy, table);\n            default:\n                throw new HiveConnectorException(\n                        CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,\n                        \"Hive connector only support [text parquet orc] table now\");\n        }\n    }\n\n    private static CatalogTable handleEmptyFilesFallback(\n            ReadonlyConfig readonlyConfig, Table table) {\n        // Keep a stable schema even when directory is empty.\n        return buildCatalogTableFromHiveMeta(readonlyConfig, table);\n    }\n\n    private CatalogTable parseCatalogTableFromRemotePath(\n            ReadonlyConfig readonlyConfig,\n            HadoopConf hadoopConf,\n            List<String> filePaths,\n            Table table) {\n        CatalogTable catalogTable = buildEmptyCatalogTable(readonlyConfig, table);\n        try {","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/config/HiveSourceConfig.java#L290-L326","documentation":"HiveSourceConfig only knows how to build a catalog table for TEXT, PARQUET, and ORC file formats. When the resolved FileFormat is anything else (e.g. Avro, SequenceFile, RCFile, or unknown), the switch's default branch throws ILLEGAL_ARGUMENT.","triggerScenarios":"parseCatalogTable() receives a fileFormat outside {PARQUET, ORC, TEXT} — i.e. the Hive table's underlying data files (per configured table_names / file_format_type resolution) are in an unsupported storage format such as Avro, RCFile, SequenceFile, or an empty/unknown format.","commonSituations":"Pointing the Hive source at tables written by other engines in Avro or SequenceFile; a table whose file extension doesn't map to text/parquet/orc; setting file_format_type to an unsupported value in the SeaTunnel config.","solutions":["Convert the table to a supported format (e.g. CTAS: `CREATE TABLE t_orc STORED AS ORC AS SELECT * FROM t_avro`) and read that","If the files are actually text/parquet/orc but detected differently, explicitly set `file_format_type = \"<correct type>\"` in the source config","Check the table's `inputFormat`/storage handler via `DESCRIBE FORMATTED` to confirm the actual format","If the target format is required, use a different connector or extend the read strategy"],"exampleFix":"// before\nsource {\n  Hive {\n    file_format_type = \"avro\"\n    ...\n  }\n}\n// after\nsource {\n  Hive {\n    file_format_type = \"orc\"   // supported: text | parquet | orc\n    ...\n  }\n}","handlingStrategy":"validation","validationCode":"// Check the storage format before configuring the source\nList<String> supported = Arrays.asList(\"text\", \"parquet\", \"orc\");\nString fmt = config.getOptional(HiveSourceOptions.FILE_FORMAT_TYPE)\n                        .orElse(\"parquet\").toLowerCase();\nif (!supported.contains(fmt)) {\n    throw new IllegalArgumentException(\n        \"file_format_type '\" + fmt + \"' unsupported; use one of \" + supported);\n}","typeGuard":"boolean isSupportedFormat(String fmt) {\n    return fmt != null\n        && (fmt.equalsIgnoreCase(\"text\")\n            || fmt.equalsIgnoreCase(\"parquet\")\n            || fmt.equalsIgnoreCase(\"orc\"));\n}","tryCatchPattern":"try {\n    // ... start Hive source\n} catch (org.apache.seatunnel.connectors.seatunnel.hive.exception.HiveConnectorException e) {\n    if (\"ILLEGAL_ARGUMENT\".equals(e.getSeaTunnelErrorCode().getCode())\n            && e.getMessage().contains(\"only support [text parquet orc]\")) {\n        throw new IllegalStateException(\n            \"Unsupported Hive table format; convert to orc/parquet/text first\", e);\n    }\n    throw e;\n}","preventionTips":["Run DESCRIBE FORMATTED to check the table's INPUTFORMAT before reading","Convert Avro/SequenceFile/RCFile tables to ORC or Parquet for SeaTunnel reads","Explicitly set file_format_type in the config instead of relying on detection","Keep read tables in a controlled, supported storage format"],"tags":["hive","file-format","unsupported","config"],"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-14T11:17:12.474Z"}