{"record":{"id":"2725889090e3e2c9","repo":"apache/seatunnel","slug":"illegal-argument","errorCode":"ILLEGAL_ARGUMENT","errorMessage":"Duplicate table found in tables_configs: \" + tableId","messagePattern":"Duplicate table found in tables_configs: \" \\+ tableId","errorType":"error_code","errorClass":"CassandraConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cassandra/src/main/java/org/apache/seatunnel/connectors/seatunnel/cassandra/source/CassandraSource.java","lineNumber":90,"sourceCode":"\n            if (config.getOptional(ConnectorCommonOptions.TABLE_CONFIGS).isPresent()) {\n                List<Map<String, Object>> tableConfigMaps =\n                        config.get(ConnectorCommonOptions.TABLE_CONFIGS);\n                List<CassandraTableConfig> configs = new ArrayList<>();\n                for (Map<String, Object> tableConfigMap : tableConfigMaps) {\n                    ReadonlyConfig tableConfig = ReadonlyConfig.fromMap(tableConfigMap);\n                    String cql = tableConfig.get(CassandraSourceOptions.CQL);\n                    CassandraTableConfig built =\n                            buildTableConfig(\n                                    cql,\n                                    session,\n                                    params.getKeyspace(),\n                                    params.getConsistencyLevel());\n                    String tableId = built.getTableId();\n                    boolean duplicate =\n                            configs.stream().anyMatch(c -> c.getTableId().equals(tableId));\n                    if (duplicate) {\n                        throw new CassandraConnectorException(\n                                CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,\n                                \"Duplicate table found in tables_configs: \" + tableId);\n                    }\n                    configs.add(built);\n                }\n                return configs;\n            } else {\n                String cql = config.get(CassandraSourceOptions.CQL);\n                return Collections.singletonList(\n                        buildTableConfig(\n                                cql, session, params.getKeyspace(), params.getConsistencyLevel()));\n            }\n        } catch (CassandraConnectorException e) {\n            throw e;\n        } catch (Exception e) {\n            throw new CassandraConnectorException(\n                    CommonErrorCodeDeprecated.TABLE_SCHEMA_GET_FAILED,\n                    \"Get table schema from Cassandra source failed\",","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cassandra/src/main/java/org/apache/seatunnel/connectors/seatunnel/cassandra/source/CassandraSource.java#L72-L108","documentation":"CassandraSource.buildTableConfigs iterates tables_configs and detects when two entries resolve to the same tableId; a duplicate would create two parallel readers for one table. It throws ILLEGAL_ARGUMENT naming the duplicated tableId to make the config error explicit.","triggerScenarios":"buildTableConfigs, called from the CassandraSource constructor, finds anyMatch(c -> c.getTableId().equals(tableId)) true — two tables_configs entries specify the same keyspace.table (or aliases/configs that resolve to it).","commonSituations":"Copy-pasted table entry in tables_configs with only cosmetic differences (different alias but same table); accidentally listing the same table twice when splitting config across files; intended different tables but same keyspace.table typed twice.","solutions":["Remove the duplicate entry from tables_configs so each keyspace.table appears exactly once.","If you intended multiple reads of one table, merge them into a single entry with one CQL query instead.","Check for identical table entries differing only by whitespace/case in keyspace or table names.","Review generated config (templating/merging tools may have duplicated the block)."],"exampleFix":"// before\ntables_configs = [\n  {table = \"ks.orders\", ...},\n  {table = \"ks.orders\", ...}\n]\n// after\ntables_configs = [\n  {table = \"ks.orders\", ...},\n  {table = \"ks.customers\", ...}\n]","handlingStrategy":"validation","validationCode":"// dedupe check before submit\nids = tables_configs.map(c -> c.keyspace + '.' + c.table)\nif (new Set(ids).size !== ids.length) throw new Error('duplicate table in tables_configs')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep tables_configs in one canonical file to avoid merge duplication.","Diff resolved tableIds in CI before deploying config changes.","One entry per keyspace.table, even for multiple aliases."],"tags":["cassandra","configuration","duplicate","source"],"backgroundTag":"conflicting-config-options","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"}