You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "JingsongLi (via GitHub)" <gi...@apache.org> on 2026/04/04 00:01:32 UTC
[PR] feat: replace apache-avro with serde_avro_fast and parallelize manifest reads [paimon-rust]
JingsongLi opened a new pull request, #203:
URL: https://github.com/apache/paimon-rust/pull/203
<!--
Thank you very much for contributing to Paimon Rust - we are happy that you want to help us improve it. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.
## Contribution Checklist
- Make sure that the pull request corresponds to a [GitHub issue](https://github.com/apache/paimon-rust/issues). Exceptions are made for typos in documentation or comments, which need no issue.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `cargo test` passes.
- Each pull request should address only one issue, not mix up code from multiple issues.
**(The sections below can be removed for hotfixes or typos)**
-->
### Purpose
<!-- Linking this pull request to the issue -->
Switch Avro deserialization from apache-avro (Value intermediate repr) to serde_avro_fast (direct bytes→struct), eliminating redundant allocations for ~10-20x deserialization speedup. Read manifest files concurrently with buffer_unordered(64) instead of sequentially.
Sub task of #173
<!-- What is the purpose of the change -->
### Brief change log
<!-- Please describe the changes made in this pull request and explain how they address the issue -->
### Tests
<!-- List unit tests or integration cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature or require documentation updates -->
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: replace apache-avro with serde_avro_fast and parallelize manifest reads [paimon-rust]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #203:
URL: https://github.com/apache/paimon-rust/pull/203#discussion_r3034927601
##########
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:
But I think the previous implementation is indeed safer. I will revert here.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: replace apache-avro with serde_avro_fast and parallelize manifest reads [paimon-rust]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #203:
URL: https://github.com/apache/paimon-rust/pull/203#discussion_r3034918558
##########
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:
I'm curious why this change is needed.
The previous implementation mostly follows py-paimon. With the current code, we may read two manifest entries like [Delete(id), Add(id)].
Because manifests are read concurrently, Delete(id) may be observed first. In that case, the later Add(id) would be kept by the current IndexMap + shift_remove logic.
However, IIUC, that is incorrect: once Delete(id) exists, the corresponding Add(id) should be filtered out rather than kept.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: replace apache-avro with serde_avro_fast and parallelize manifest reads [paimon-rust]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #203:
URL: https://github.com/apache/paimon-rust/pull/203#discussion_r3034844464
##########
crates/paimon/src/spec/manifest_entry.rs:
##########
@@ -28,6 +28,9 @@ pub struct Identifier {
pub bucket: i32,
pub level: i32,
pub file_name: String,
+ pub extra_files: Vec<String>,
Review Comment:
Identifier must be aligned with Java, otherwise there will be exceptions.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: replace apache-avro with serde_avro_fast and parallelize manifest reads [paimon-rust]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #203:
URL: https://github.com/apache/paimon-rust/pull/203
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: replace apache-avro with serde_avro_fast and parallelize manifest reads [paimon-rust]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org