apache/iceberg · error · UnsupportedOperationException
Bitmap decoding has not been implemented
Error message
Bitmap decoding has not been implemented
What it means
TrackedManifestFile wraps a manifest file for tracking/reporting purposes. When the underlying manifest carries deletion-vector bitmap data, the adapter returns a ManifestBitmap stub whose cardinality() method throws UnsupportedOperationException because bitmap decoding is not implemented. The throw signals an intentionally unimplemented capability, not a data corruption problem.
Source
Thrown at core/src/main/java/org/apache/iceberg/TrackedFileAdapters.java:526
return file.keyMetadata();
}
@Override
public Long firstRowId() {
return file.tracking().firstRowId();
}
@Override
public ManifestBitmap manifestDeletionVector() {
ByteBuffer dv = file.manifestInfo().dv();
if (dv == null) {
return null;
}
return new ManifestBitmap() {
@Override
public int cardinality() {
throw new UnsupportedOperationException("Bitmap decoding has not been implemented");
}
@Override
public boolean isSet(int position) {
throw new UnsupportedOperationException("Bitmap decoding has not been implemented");
}
@Override
public ByteBuffer buffer() {
return dv;
}
};
}
@Override
public int formatVersion() {
return file.formatVersion();
}View on GitHub (pinned to 86d9c8fc54)
Solutions
- Do not call cardinality() on bitmap-backed ManifestBitmap instances; check the encoding type first and skip bitmap payloads.
- Use buffer() to access the raw encoded bytes and decode the bitmap in application code if cardinality is required.
- Upgrade to a Iceberg version where bitmap decoding is implemented, or contribute the implementation.
Example fix
// before int deleted = bitmap.cardinality(); // after ByteBuffer raw = bitmap.buffer(); // handle bitmap encoding in caller; cardinality() is unsupported
Defensive patterns
Strategy: fallback
Validate before calling
if (bitmapEncoding.isBitmap()) { /* skip cardinality, decode raw */ } Try / catch
try { n = bitmap.cardinality(); } catch (UnsupportedOperationException e) { n = decodeCardinalityFromBuffer(bitmap.buffer()); } Prevention
- Check the deletion payload encoding before calling cardinality().
- Treat ManifestBitmap cardinality/isSet as unimplemented in this Iceberg version.
- Pin tooling to payload types the adapter actually supports.
When it happens
Trigger: Calling cardinality() on the ManifestBitmap returned by a TrackedManifestFile for a manifest whose deleted-rows payload is encoded as a bitmap rather than a deletion vector.
Common situations: Running table metrics/tracking tooling over tables that use bitmap-encoded deletions; code paths that assume all delete encodings are decoded DVs and call cardinality() unconditionally.
Related errors
- Staging snapshot %s on branch '%s' removes data files; equal
- Staging snapshot %s on branch '%s' contains a V2 positional
- %s doesn't implement copyWithStats
- %s doesn't implement validateFilesExist
- Can't retrieve values from an empty struct
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/4e9f8e036bcf1490.
Report an issue: GitHub.