JingsongLi commented on code in PR #203:
URL: https://github.com/apache/paimon-rust/pull/203#discussion_r3034924019
##########
crates/paimon/src/table/table_scan.rs:
##########
@@ -134,22 +140,19 @@ fn build_deletion_files_map(
/// The identifier must be rich enough to match Paimon's file identity,
otherwise a delete
/// for one file version can incorrectly remove another with the same file
name.
fn merge_manifest_entries(entries: Vec<ManifestEntry>) -> Vec<ManifestEntry> {
- let mut deleted_entry_keys = HashSet::new();
- let mut added_entries = Vec::new();
-
+ let mut map: IndexMap<Identifier, ManifestEntry> =
IndexMap::with_capacity(entries.len());
Review Comment:
There aren't many deleted entries, it doesn't seem very meaningful to modify
it to read twice, as it will repeatedly read the manifest containing the
deleted entry.
If we don't read it twice, the current implementation is quite reasonable,
we only need to traverse it once.
--
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]