File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ use crate::log_replay::FileActionKey;
1818use crate :: DeltaResult ;
1919
2020pub ( crate ) trait Deduplicator {
21- /// Key type for identifying file actions. JSON deduplicators use `FileActionKey`
22- /// (path + dv_unique_id), checkpoint deduplicators may use path-only keys.
21+ /// Key type for identifying file actions.
2322 type Key ;
2423
2524 /// Extracts a file action key from the data. Returns `(key, is_add)` if found.
@@ -73,6 +72,7 @@ pub(crate) struct CheckpointDeduplicator<'a> {
7372 add_path_index : usize ,
7473 add_dv_start_index : usize ,
7574}
75+
7676impl CheckpointDeduplicator < ' _ > {
7777 #[ allow( unused) ]
7878 pub ( crate ) fn try_new < ' a > (
@@ -107,10 +107,13 @@ impl Deduplicator for CheckpointDeduplicator<'_> {
107107 }
108108
109109 fn check_and_record_seen ( & mut self , key : Self :: Key ) -> bool {
110+ // NOTE: we do not record the key because this is an immutable map.
111+ // Checkpoints should never require an update on the seen_file_keys.
110112 self . seen_file_keys . contains ( & key)
111113 }
112114
113115 fn is_log_batch ( & self ) -> bool {
116+ // Checkpoint deduplicator may only be constructed for checkpoint batches
114117 false
115118 }
116119}
You can’t perform that action at this time.
0 commit comments