apache/druid · error · RE
Unknown version
Error message
Unknown version
What it means
NestedDataColumnSupplierV4.read() recognizes only version byte V4. Any other version byte throws RE 'Unknown version <n>'. Since this supplier only handles V4, encountering another version means the column was written by a different (usually newer) format version or the file is damaged.
Source
Thrown at processing/src/main/java/org/apache/druid/segment/nested/NestedDataColumnSupplierV4.java:215
fields,
fieldInfo,
compressedRawColumnSupplier,
nullValues,
stringDictionarySupplier,
longDictionarySupplier,
doubleDictionarySupplier,
arrayDictionarySupplier,
mapper,
NestedCommonFormatColumnFormatSpec.builder().setBitmapEncoding(metadata.getBitmapSerdeFactory()).build(),
metadata.getByteOrder(),
simpleType
);
}
catch (IOException ex) {
throw new RE(ex, "Failed to deserialize V%s column.", version);
}
} else {
throw new RE("Unknown version " + version);
}
}
private final byte version;
private final String columnName;
private final ColumnConfig columnConfig;
private final Supplier<? extends Indexed<ByteBuffer>> fieldsSupplier;
private final FieldTypeInfo fieldInfo;
private final CompressedVariableSizedBlobColumnSupplier compressedRawColumnSupplier;
private final ImmutableBitmap nullValues;
private final Supplier<? extends Indexed<ByteBuffer>> stringDictionarySupplier;
private final Supplier<FixedIndexed<Long>> longDictionarySupplier;
private final Supplier<FixedIndexed<Double>> doubleDictionarySupplier;
private final Supplier<FrontCodedIntArrayIndexed> arrayDictionarySupplier;
private final SegmentFileMapper fileMapper;
@Nullable
private final ColumnType simpleType;View on GitHub (pinned to 9b90983fd2)
Solutions
- Use/upgrade to the Druid version matching the column's serialized version.
- Let the correct supplier for the version handle the column (check NestedDataColumnSupplier dispatch logic).
- Re-ingest to rewrite columns in the supported format.
- Restore the segment from deep storage if the header is corrupted.
Defensive patterns
Strategy: type-guard
Validate before calling
byte version = data.get(0);
if (version != 4) { /* dispatch to the correct supplier for this version */ } Type guard
boolean isV4(byte v) { return v == 4; } Try / catch
try {
col = v4Supplier.get();
} catch (RE e) {
if (e.getMessage().startsWith("Unknown version")) {
log.warn("Non-V4 column handed to V4 supplier; re-dispatch");
} throw e;
} Prevention
- Dispatch suppliers based on the version byte, not assumptions
- Only use NestedDataColumnSupplierV4 for V4 columns
- Upgrade readers before writers introduce new versions
When it happens
Trigger: Opening a column whose version byte differs from V4 (e.g. written as V1-V3 handled by another supplier, or a V5+ from a newer Druid, or garbage bytes).
Common situations: Wiring the V4 supplier against non-V4 columns; newer writer version read by older cluster; corrupt column headers.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- Unknown version
- Unknown version[%d]
- Expected version[9], got[%d]
- Unknown version[%s]
- Unknown version[%s]
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/c015d22e28e17388.
Report an issue: GitHub.