Repository navigation
[mosaic] Expose column-batch reads and writer extension hooks - #10516
Merged
JingsongLi merged 1 commit intoOct 12, 2026
Merged
JingsongLi merged 1 commit into
JingsongLi merged 1 commit into
Conversation
Contributor
|
+1 |
This was referenced Oct 13, 2026
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
Mosaic reads Arrow batches internally, but currently exposes row iterators to callers. Expose those batches through Paimon's existing vectorized reader contract so downstream engines can process columns without unpacking rows.
ArrowBatchReaderandMosaicRecordsReaderexpose independent batch wrappers and release Arrow buffers per consumed batch, preserving projection, prefetch and row-tracking fallback.MosaicRecordsWriterexposes its conversion buffer, flush and failed-state check to subclasses. Failed native writes reject further input and are not retried during close.MosaicWriterFactoryadds an overridable creation hook while retaining option validation.Existing bundle interfaces, column-to-Arrow conversion and native Mosaic writing are reused.
MosaicRecordsWritercontinues to use the row fallback for ordinaryVectorizedBundleRecords; consumers can implement batch-write adapters through the new hooks.Tests
Passed clean Maven verification on JDK 8 (linux/aarch64): 131 tests, zero failures, errors or skips. Checkstyle, Spotless and Enforcer checks were enabled.
mvn -B -pl paimon-arrow,paimon-mosaic -am \ -Dtest=ArrowBatchReaderTest,Mosaic*Test -DwildcardSuites=none \ -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false clean verifyCoverage includes prefetch, projection, row tracking across row groups, deletion vectors, batch lifetime, native-write failures, external writer subclass round trips and factory option validation.