{"record":{"id":"77116e6b0120b6a8","repo":"apache/druid","slug":"can-t-find-field-s-with-name-s-in-s-file","errorCode":null,"errorMessage":"Can't find field [%s] with name [%s] in [%s] file.","messagePattern":"Can't find field \\[(.+?)\\] with name \\[(.+?)\\] in \\[(.+?)\\] file\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/segment/nested/CompressedNestedDataComplexColumn.java","lineNumber":1092,"sourceCode":"  }\n\n  private BaseColumnHolder getColumnHolder(String field, int fieldIndex)\n  {\n    return columns.computeIfAbsent(fieldIndex, (f) -> readNestedFieldColumn(field, fieldIndex));\n  }\n\n  @Nullable\n  private BaseColumnHolder readNestedFieldColumn(String field, int fieldIndex)\n  {\n    try {\n      if (fieldIndex < 0) {\n        return null;\n      }\n      final FieldTypeInfo.TypeSet types = fieldInfo.getTypes(fieldIndex);\n      final String fieldFileName = getFieldFileName(columnName, field, fieldIndex);\n      final ByteBuffer dataBuffer = fileMapper.mapFile(fieldFileName);\n      if (dataBuffer == null) {\n        throw new ISE(\n            \"Can't find field [%s] with name [%s] in [%s] file.\",\n            field,\n            fieldFileName,\n            columnName\n        );\n      }\n\n      ColumnBuilder columnBuilder = new ColumnBuilder().setFileMapper(fileMapper);\n      // heh, maybe this should be its own class, or DictionaryEncodedColumnPartSerde could be cooler\n      DictionaryEncodedColumnPartSerde.VERSION version = DictionaryEncodedColumnPartSerde.VERSION.fromByte(\n          dataBuffer.get()\n      );\n      // we should check this someday soon, but for now just read it to push the buffer position ahead\n      int flags = dataBuffer.getInt();\n      if (flags != DictionaryEncodedColumnPartSerde.NO_FLAGS) {\n        throw DruidException.defensive(\n            \"Unrecognized bits set in space reserved for future flags for field column [%s]\", field\n        );","sourceCodeStart":1074,"sourceCodeEnd":1110,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/segment/nested/CompressedNestedDataComplexColumn.java#L1074-L1110","documentation":"During construction, CompressedNestedDataComplexColumn maps each nested field's data file via fileMapper.mapFile(fieldFileName); if the memory mapper returns null the field's backing file is missing and it throws ISE. This means the column's metadata references a field file that is not present in the segment.","triggerScenarios":"Building the column when getFieldFileName produces a name that mapFile cannot resolve — missing/corrupt field data file in the segment, or metadata/file naming mismatch between writer and reader versions.","commonSituations":"Partial segment download/truncated cache; segments written by an older Druid version with different field file naming; corrupted deep storage objects.","solutions":["Re-download the segment — its nested field files are incomplete","Verify the Druid version reading matches the version that wrote the nested column","Check that all *field* files referenced by the column's metadata exist in the segment dir","Re-ingest the segment if source files are corrupt"],"exampleFix":"// before\nByteBuffer buf = fileMapper.mapFile(fieldFileName); // null -> ISE\n// after\nif (fileMapper.mapFile(fieldFileName) == null) { redownloadSegment(columnName); }","handlingStrategy":"validation","validationCode":"ByteBuffer buf = fileMapper.mapFile(fieldFileName); if (buf == null) { refetchSegment(); } // verify all expected field files before use","typeGuard":"boolean hasFieldFile(SegmentFileMapper mapper, String name) { return mapper.mapFile(name) != null; }","tryCatchPattern":"try { col = new CompressedNestedDataComplexColumn(...); } catch (ISE e) { log.error(e, \"Missing nested field file in %s\", columnName); cacheCleaner.cleanup(segmentDir); throw e; }","preventionTips":["Verify segment completeness (all field files) after download","Keep reader and writer Druid versions aligned for nested columns","Detect truncated deep-storage objects via size checks before caching"],"tags":["nested-column","file-not-found","segment"],"backgroundTag":"file-not-found","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"}