[core] Unify manifest Avro readers - #9182
Merged
JingsongLi merged 13 commits intoAug 12, 2026
Merged
Conversation
leaves12138
marked this pull request as ready for review
August 11, 2026 17:18
JingsongLi
reviewed
Aug 12, 2026
| return new RowAvroWriterFactory(type); | ||
| } | ||
|
|
||
| public Schema createAvroSchema(RowType rowType) { |
Contributor
There was a problem hiding this comment.
Do not rely on AvroFileFormat. Manifest reader should be a separate path.
JingsongLi
reviewed
Aug 12, 2026
|
|
||
| private static class ManifestRecordDecoder { | ||
| /** Reusable {@link GenericRow} with borrowed views over fields in the current Avro block. */ | ||
| public static final class BlockRow extends GenericRow { |
Contributor
There was a problem hiding this comment.
Do not extends GenericRow, a little performance affect to it. And this class should be a generic class, which optimize binary for reusing bytes buffer.
JingsongLi
reviewed
Aug 12, 2026
| @@ -85,15 +96,42 @@ public byte[] nextBlock() throws IOException { | |||
| * {@link #hasNextBlock()}, {@link #nextBlock()}, or this method, or when this reader is closed. | |||
| */ | |||
| public BorrowedBlock nextBorrowedBlock() throws IOException { | |||
JingsongLi
reviewed
Aug 12, 2026
|
|
||
| private static class ManifestRecordDecoder { | ||
| /** Reusable {@link GenericRow} with borrowed views over fields in the current Avro block. */ | ||
| public static final class BlockRow extends GenericRow { |
Contributor
There was a problem hiding this comment.
This path is only for full projection.
Contributor
|
+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Unify projected manifest decoding and raw Avro block access in ManifestAvroReader so callers can use one reusable, low-allocation reader path.
Changes
This PR intentionally does not include manifest run-merge sorting, external-sort changes, writer changes, or related configuration. Those will be split into follow-up PRs.
Tests