gripleaf opened a new pull request, #239:
URL: https://github.com/apache/paimon-cpp/pull/239
### Purpose
Linked issue: N/A
Reduce shared pointer contention in concurrent manifest reads and Avro
decoding hot loops.
This change:
- Caches `StructArray::fields()` once per batch in
`ManifestFile::ReadBucketEntries()` and
`ObjectsFile<T>::Read()`, avoiding repeated copies of
`shared_ptr<Array>` for every row.
- Caches immutable Arrow builder metadata in
`AvroDirectDecoder::DecodeContext`, including:
- Arrow type ID.
- Timestamp time unit.
- Uses the cached metadata for integer and timestamp decoding instead of
calling
`ArrayBuilder::type()` for every value.
- Clears cached builder metadata when `SetReadSchema()` replaces the
builder tree, preventing stale
entries if builder addresses are reused.
- Adds Int16 decoding and builder metadata lifecycle coverage.
### Tests
- Built `paimon-avro-format-test` successfully.
- Ran the complete Avro unit test suite: 68 tests passed.
- Ran `pre-commit run --files` for all changed files: passed.
- Ran `git diff --check`: passed.
- `paimon-core-test` could not be fully linked because of an unrelated
existing Parquet/Arrow API
mismatch in `page_filtered_row_group_reader.cpp`: the current Arrow
`GetColumn` overload expects
`const std::vector<int>&`, while the existing source passes
`std::shared_ptr<std::unordered_set<int>>`.
### API and Format
No public API, storage format, or protocol changes.
### Documentation
No new user-facing feature or documentation change.
### Generative AI tooling
Generated-by: OpenAI Codex (GPT-5)
--
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]