{"record":{"id":"bad38de94d595db0","repo":"apache/cassandra","slug":"table-not-specified","errorCode":null,"errorMessage":"Table not specified.","messagePattern":"Table not specified\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/compression/CompressionDictionaryDetailsTabularData.java","lineNumber":290,"sourceCode":"         *\n         * <ul>\n         *     <li>keyspace, table and table id are not null</li>\n         *     <li>dict id is lower than 0</li>\n         *     <li>dict is not null nor empty</li>\n         *     <li>dict length is less than or equal to 1MiB</li>\n         *     <li>kind is not null and there is such {@link org.apache.cassandra.db.compression.CompressionDictionary.Kind}</li>\n         *     <li>dictLength is bigger than 0</li>\n         *     <li>dictLength has to be equal to dict's length</li>\n         *     <li>dictChecksum has to be equal to checksum computed as part of this method</li>\n         *     <li>creation date is not null</li>\n         * </ul>\n         */\n        private void validate()\n        {\n            if (keyspace == null)\n                throw new IllegalArgumentException(\"Keyspace not specified.\");\n            if (table == null)\n                throw new IllegalArgumentException(\"Table not specified.\");\n            if (tableId == null)\n                throw new IllegalArgumentException(\"Table id not specified.\");\n            if (dictId <= 0)\n                throw new IllegalArgumentException(\"Provided dictionary id must be positive but it is '\" + dictId + \"'.\");\n            if (dict == null || dict.length == 0)\n                throw new IllegalArgumentException(\"Provided dictionary byte array is null or empty.\");\n            if (kind == null)\n                throw new IllegalArgumentException(\"Provided kind is null.\");\n\n            CompressionDictionary.Kind dictionaryKind;\n\n            try\n            {\n                dictionaryKind = CompressionDictionary.Kind.valueOf(kind);\n            }\n            catch (IllegalArgumentException ex)\n            {\n                throw new IllegalArgumentException(\"There is no such dictionary kind like '\" + kind + \"'. Available kinds: \" + Arrays.asList(CompressionDictionary.Kind.values()));","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/compression/CompressionDictionaryDetailsTabularData.java#L272-L308","documentation":"This is the same validate() guard as the keyspace check, but for the table field of the dictionary descriptor. A compression dictionary is per-table, so a null table name makes the descriptor unusable and is rejected before it is exported to TabularData.","triggerScenarios":"Building a CompressionDictionaryDataObject with table == null — e.g. omitting the table name when programmatically importing a dictionary, or a CompositeData missing the TABLE item.","commonSituations":"Import tooling that fills keyspace but forgets table; reflection/serialization paths that skip null fields when constructing the data object.","solutions":["Provide the fully-qualified table name on the dictionary data object before validation","Verify the source CompositeData contains a non-null TABLE value","Fix the constructor call so the table argument is not null"],"exampleFix":"// before\nnew CompressionDictionaryDataObject(\"ks\", null, tableId, ...);\n// after\nnew CompressionDictionaryDataObject(\"ks\", \"tbl\", tableId, ...);","handlingStrategy":"validation","validationCode":"if (obj.table == null || obj.table.isEmpty()) throw new IllegalArgumentException(\"table must be set before creating CompressionDictionaryDataObject\");","typeGuard":"boolean hasTable(CompressionDictionaryDataObject o) { return o.table != null && !o.table.isEmpty(); }","tryCatchPattern":"try { tabularData.fromDataObject(obj); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"Table not specified\")) { /* set table and retry */ } else throw e; }","preventionTips":["Resolve the table name in the same place the keyspace is resolved so neither is missed","Validate the 'ks.tbl' split produces both components non-empty","Keep descriptor construction in one helper that requires both name fields"],"tags":["jmx","validation","compression-dictionary"],"backgroundTag":"missing-required-argument","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}