Skip to content

Commit 4e19e92

Browse files
Add context to PopulatedDeleteFileIndex (#1084)
## What changes are included in this PR? Added some doc for `PopulatedDeleteFileIndex` --------- Co-authored-by: Renjie Liu <[email protected]>
1 parent 3cc1a68 commit 4e19e92

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crates/iceberg/src/delete_file_index.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ impl DeleteFileIndex {
9494
}
9595

9696
impl PopulatedDeleteFileIndex {
97+
/// Creates a new populated delete file index from a list of delete file contexts, which
98+
/// allows for fast lookup when determining which delete files apply to a given data file.
99+
///
100+
/// 1. The partition information is extracted from each delete file's manifest entry.
101+
/// 2. If the partition is empty and the delete file is not a positional delete,
102+
/// it is added to the `global_delees` vector
103+
/// 3. Otherwise, the delete file is added to one of two hash maps based on its content type.
104+
97105
fn new(files: Vec<DeleteFileContext>) -> PopulatedDeleteFileIndex {
98106
let mut eq_deletes_by_partition: HashMap<Struct, Vec<Arc<DeleteFileContext>>> =
99107
HashMap::default();

0 commit comments

Comments
 (0)