{"record":{"id":"68c89e61e6e95b42","repo":"apache/druid","slug":"unknown-globalid-s","errorCode":null,"errorMessage":"Unknown globalId [%s]","messagePattern":"Unknown globalId \\[(.+?)\\]","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/nested/CompressedNestedDataComplexColumn.java","lineNumber":277,"sourceCode":"          }\n          return nextArray;\n        }\n\n        private Object lookupId(int globalId)\n        {\n          if (globalId == 0) {\n            return null;\n          }\n          final int adjustLongId = stringDictionary.size();\n          final int adjustDoubleId = stringDictionary.size() + longDictionary.size();\n          if (globalId < adjustLongId) {\n            return StringUtils.fromUtf8Nullable(stringDictionary.get(globalId));\n          } else if (globalId < adjustDoubleId) {\n            return longDictionary.get(globalId - adjustLongId);\n          } else if (globalId < adjustDoubleId + doubleDictionary.size()) {\n            return doubleDictionary.get(globalId - adjustDoubleId);\n          }\n          throw new IAE(\"Unknown globalId [%s]\", globalId);\n        }\n      };\n    };\n    return new Indexed<>()\n    {\n      @Override\n      public int size()\n      {\n        return arrayDictionarySupplier.get().size();\n      }\n\n      @Nullable\n      @Override\n      public Object[] get(int index)\n      {\n        throw new UnsupportedOperationException(\"get not supported\");\n      }\n","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/nested/CompressedNestedDataComplexColumn.java#L259-L295","documentation":"CompressedNestedDataComplexColumn.lookupId translates a global dictionary id into a value across string/long/double sub-dictionaries. If the id is beyond all three dictionary ranges it is out of the valid global id space, and the column throws IAE 'Unknown globalId'. This indicates dictionary corruption or an id from a different column.","triggerScenarios":"next()/Indexed lookups call lookupId with a globalId >= adjustDoubleId + doubleDictionary.size(); typically reading data written by a different (mismatched) segment version or a corrupted nested column.","commonSituations":"Mixed Druid versions reading nested columns across incompatible releases; copied dictionary ids between columns; corrupted deep-storage segment files.","solutions":["Re-download/rebuild the segment (files may be corrupt)","Ensure the query path and Druid version match the version that wrote the nested column","Do not pass dictionary ids obtained from other columns to this column's lookup","Check dictionary sizes in the segment metadata for inconsistencies"],"exampleFix":"// before\nObject v = lookupId(otherColumnGlobalId); // id from another column\n// after\nObject v = (globalId >= 0 && globalId < cardinality) ? lookupId(globalId) : null;","handlingStrategy":"validation","validationCode":"if (globalId < 0 || globalId >= column.getCardinality()) { return null; } // id out of this column's global dictionary","typeGuard":"boolean isValidGlobalId(CompressedNestedDataComplexColumn col, int id) { return id >= 0 && id < col.getCardinality(); }","tryCatchPattern":"try { v = indexed.get(globalId); } catch (IAE e) { log.warn(\"Unknown globalId %s — corrupt or foreign dictionary\", globalId); v = null; }","preventionTips":["Never share dictionary ids across columns","Keep Druid versions consistent for nested column reads","Re-ingest segments showing unknown-id errors — data is likely corrupt"],"tags":["nested-column","dictionary","illegal-argument"],"backgroundTag":"value-out-of-range","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}