{"record":{"id":"4e9f8e036bcf1490","repo":"apache/iceberg","slug":"bitmap-decoding-has-not-been-implemented","errorCode":null,"errorMessage":"Bitmap decoding has not been implemented","messagePattern":"Bitmap decoding has not been implemented","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/TrackedFileAdapters.java","lineNumber":526,"sourceCode":"      return file.keyMetadata();\n    }\n\n    @Override\n    public Long firstRowId() {\n      return file.tracking().firstRowId();\n    }\n\n    @Override\n    public ManifestBitmap manifestDeletionVector() {\n      ByteBuffer dv = file.manifestInfo().dv();\n      if (dv == null) {\n        return null;\n      }\n\n      return new ManifestBitmap() {\n        @Override\n        public int cardinality() {\n          throw new UnsupportedOperationException(\"Bitmap decoding has not been implemented\");\n        }\n\n        @Override\n        public boolean isSet(int position) {\n          throw new UnsupportedOperationException(\"Bitmap decoding has not been implemented\");\n        }\n\n        @Override\n        public ByteBuffer buffer() {\n          return dv;\n        }\n      };\n    }\n\n    @Override\n    public int formatVersion() {\n      return file.formatVersion();\n    }","sourceCodeStart":508,"sourceCodeEnd":544,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/TrackedFileAdapters.java#L508-L544","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nint deleted = bitmap.cardinality();\n\n// after\nByteBuffer raw = bitmap.buffer(); // handle bitmap encoding in caller; cardinality() is unsupported","handlingStrategy":"fallback","validationCode":"if (bitmapEncoding.isBitmap()) { /* skip cardinality, decode raw */ }","typeGuard":null,"tryCatchPattern":"try { n = bitmap.cardinality(); } catch (UnsupportedOperationException e) { n = decodeCardinalityFromBuffer(bitmap.buffer()); }","preventionTips":["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."],"tags":["unsupported-operation","deletion-vector","bitmap"],"backgroundTag":"method-not-implemented","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}