{"record":{"id":"f59f8232b12b5fe1","repo":"apache/seatunnel","slug":"config-validation-failed-f59f82","errorCode":"CONFIG_VALIDATION_FAILED","errorMessage":"Partitions list is empty, please check","messagePattern":"Partitions list is empty, please check","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":118,"sourceCode":"            throw new HiveConnectorException(\n                    HiveConnectorErrorCode.GET_HIVE_TABLE_INFORMATION_FAILED,\n                    \"Failed to get Hive table information for table_name='\"\n                            + tableName\n                            + \"'. Please ensure metastore is reachable and the table exists.\",\n                    e);\n        }\n        this.hadoopConf = parseHiveHadoopConfig(readonlyConfig, table);\n        this.fileFormat = HiveTableUtils.parseFileFormat(table);\n        this.readStrategy = parseReadStrategy(table, readonlyConfig, fileFormat, hadoopConf);\n        this.filePaths = parseFilePaths(table, readStrategy);\n        this.catalogTable =\n                parseCatalogTable(\n                        readonlyConfig, readStrategy, fileFormat, hadoopConf, filePaths, table);\n    }\n\n    private void validatePartitions(List<String> partitionsList) {\n        if (CollectionUtils.isEmpty(partitionsList)) {\n            throw new HiveConnectorException(\n                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                    \"Partitions list is empty, please check\");\n        }\n        int depth = partitionsList.get(0).replaceAll(\"\\\\\\\\\", \"/\").split(\"/\").length;\n        long count =\n                partitionsList.stream()\n                        .map(partition -> partition.replaceAll(\"\\\\\\\\\", \"/\").split(\"/\").length)\n                        .filter(length -> length != depth)\n                        .count();\n        if (count > 0) {\n            throw new HiveConnectorException(\n                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                    \"Every partition that in partition list should has the same directory depth\");\n        }\n    }\n\n    private ReadStrategy parseReadStrategy(\n            Table table,","sourceCodeStart":100,"sourceCodeEnd":136,"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#L100-L136","documentation":"HiveSourceConfig.validatePartitions requires a non-empty partition list when partition pruning is applied. If the configured partition expressions match no actual partitions in the table, the validation throws CONFIG_VALIDATION_FAILED with this message.","triggerScenarios":"Setting partition column filters/read partitions whose combined values resolve to an empty List<String> of partition directories before the source reads.","commonSituations":"Filtering on a partition value that doesn't exist (e.g. date=2024-13-01); filtering on a column that is not actually a partition key; case mismatch in partition column names; table has no partitions at all but a partition filter was configured.","solutions":["Run `SHOW PARTITIONS <table>` and confirm the values you filter on actually exist","Verify the configured partition columns match the table's real partition keys (exact names/order)","Remove or correct the partition filter if the table is unpartitioned","Check path separators: partitions are validated by directory depth, so paths must be consistent"],"exampleFix":"// before\npartition_column = [\"dt\"]\nread_partitions = [\"dt=2099-01-01\"]   // does not exist -> empty list\n// after (verified via SHOW PARTITIONS)\nread_partitions = [\"dt=2024-06-01\", \"dt=2024-06-02\"]","handlingStrategy":"validation","validationCode":"// Before submitting, confirm the partitions exist:\n// beeline> SHOW PARTITIONS db.table;  and compare against read_partitions / filters\nList<String> parts = fetchShowPartitions(\"db.table\");\nif (configuredPartitions.stream().noneMatch(parts::contains))\n    throw new IllegalArgumentException(\"no matching partitions for filter\");","typeGuard":null,"tryCatchPattern":"try {\n    HiveSourceConfig cfg = new HiveSourceConfig(pluginConfig);\n} catch (HiveConnectorException e) {\n    if (e.getCode().equals(SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED)) {\n        // drop the partition filter or correct partition values\n    }\n    throw e;\n}","preventionTips":["Run SHOW PARTITIONS and cross-check filter values before configuring read_partitions","Confirm the filter columns are actual partition keys of the table","Generate partition lists from metastore output, not manual typing"],"tags":["hive","partitions","config-validation","source"],"backgroundTag":"empty-result-set","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"}