laskoviymishka opened a new issue, #1049: URL: https://github.com/apache/iceberg-go/issues/1049
Parent: #589. `dv.ReadDV` currently passes `-1` to `DeserializeDV`, skipping cardinality validation entirely. The inline comment notes that `dvFile.Count()` defaults to `0` and would incorrectly reject valid DVs — true, but the puffin blob's properties carry `cardinality` as a string property (the spec-mandated source of truth), which `ReadDV` doesn't read. The result is that a truncated bitmap whose CRC happens to validate is accepted, even though the spec gives us the means to catch it. Two design choices: 1. Read the `cardinality` blob property in `ReadDV` and pass it to `DeserializeDV` — most spec-faithful, since `cardinality` is what the writer explicitly attaches. 2. Use `dvFile.Count()` when it's positive — relies on the manifest entry's `record_count`, which Avro permits to default to zero. Option 1 is cleaner: the property is always present on a spec-compliant blob and unambiguously means "deleted-row count for this DV". `DeserializeDV` already supports the validation path via its `expectedCardinality` parameter. Touches `table/dv/deletion_vector.go` only. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
