{"record":{"id":"33619aedd2f38f33","repo":"apache/seatunnel","slug":"illegal-argument-33619a","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/sink/HiveSink.java","lineNumber":199,"sourceCode":"                                .withValue(\n                                        ROW_DELIMITER.key(),\n                                        ConfigValueFactory.fromAnyRef(\n                                                parameters.get(\"line.delim\")));\n                break;\n            case PARQUET:\n                pluginConfig =\n                        pluginConfig.withValue(\n                                FILE_FORMAT_TYPE.key(),\n                                ConfigValueFactory.fromAnyRef(FileFormat.PARQUET.toString()));\n                break;\n            case ORC:\n                pluginConfig =\n                        pluginConfig.withValue(\n                                FILE_FORMAT_TYPE.key(),\n                                ConfigValueFactory.fromAnyRef(FileFormat.ORC.toString()));\n                break;\n            default:\n                throw new HiveConnectorException(\n                        CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,\n                        \"Hive connector only support [text parquet orc] table now\");\n        }\n        pluginConfig =\n                pluginConfig\n                        .withValue(\n                                IS_PARTITION_FIELD_WRITE_IN_FILE.key(),\n                                ConfigValueFactory.fromAnyRef(false))\n                        .withValue(\n                                FILE_PATH.key(),\n                                ConfigValueFactory.fromAnyRef(\n                                        tableInformation.getSd().getLocation()))\n                        .withValue(SINK_COLUMNS.key(), ConfigValueFactory.fromAnyRef(sinkFields))\n                        .withValue(\n                                PARTITION_BY.key(), ConfigValueFactory.fromAnyRef(partitionKeys));\n        // Only set a default file_name_expression when it's not provided by user config.\n        if (!pluginConfig.hasPath(FILE_NAME_EXPRESSION.key())) {\n            pluginConfig =","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/sink/HiveSink.java#L181-L217","documentation":"Hive sink only supports tables stored in text, parquet, or orc file formats. When the target Hive table's storage format (or the configured file_format_type) resolves to anything else — e.g. avro, sequencefile, rcfile — HiveSink's generateFileSinkConfig hits the default branch of its format switch and throws this error during sink initialization.","triggerScenarios":"Creating a Hive sink whose table's StorageDescriptor input/output format maps to an unsupported FileFormat, or explicitly setting file_format_type to a value outside text/parquet/orc in the sink config.","commonSituations":"Pointing the sink at a Hive table created with STORED AS AVRO or SEQUENCEFILE; typo in file_format_type; table created with a custom SerDe whose format cannot be inferred.","solutions":["Check the Hive table's DDL and confirm it uses STORED AS TEXTFILE, PARQUET, or ORC","If the table is in another format, create a staging table in parquet/orc and write to that instead","Explicitly set file_format_type = \"parquet\" (or orc/text) in the sink plugin config","Verify the table_name in the config points to the intended table, not one with an exotic format"],"exampleFix":"// before\nsink {\n  Hive {\n    table_name = \"db.avro_table\"\n  }\n}\n// after\nsink {\n  Hive {\n    table_name = \"db.parquet_staging_table\"\n    file_format_type = \"parquet\"\n  }\n}","handlingStrategy":"validation","validationCode":"// Before submitting, check the table format:\n// beeline> DESCRIBE FORMATTED db.table;  -> InputFormat must map to TextFile/Parquet/ORC\nString fmt = sinkOptions.get(FILE_FORMAT_TYPE); // or inferred from table\nboolean ok = fmt == null || List.of(\"text\",\"parquet\",\"orc\").contains(fmt.toLowerCase());\nif (!ok) throw new IllegalArgumentException(\"file_format_type must be text, parquet or orc: \" + fmt);","typeGuard":null,"tryCatchPattern":"try {\n    hiveSink = new HiveSink(pluginConfig);\n} catch (HiveConnectorException e) {\n    if (e.getCode().equals(CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT)) {\n        // fall back to a parquet staging table or surface a clear config error\n    }\n}","preventionTips":["Always create target tables with STORED AS TEXTFILE/PARQUET/ORC","Set file_format_type explicitly in the sink config rather than relying on inference","Validate the table's InputFormat against the supported list during pipeline design"],"tags":["hive","sink","file-format","unsupported"],"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"}