[TASK-179] Add more info for RecordBatches#211
Merged
luoyuxia merged 2 commits intoapache:mainfrom Jan 25, 2026
Merged
Conversation
4f3dc10 to
2e3b018
Compare
Contributor
Author
|
@luoyuxia PTAL 🙏 |
2e3b018 to
85c7b97
Compare
85c7b97 to
6ed18c4
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds batch-level metadata support to the log scanning API by introducing a ScanBatch struct that wraps Arrow RecordBatch with bucket and offset information. This enables downstream consumers (like the DuckDB plugin mentioned in issue #179) to track per-bucket progress and determine stopping conditions when using the batch API.
Changes:
- Added
ScanBatchstruct to wrapRecordBatchwith bucket and base offset metadata - Updated
RecordBatchLogScanner::poll()to returnVec<ScanBatch>instead ofVec<RecordBatch> - Modified
CompletedFetch::fetch_batches()to return offset information alongside batches
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/fluss/src/record/mod.rs | Introduces ScanBatch struct with bucket, batch, and base_offset fields, plus helper methods like last_offset() and comprehensive unit tests |
| crates/fluss/src/client/table/scanner.rs | Updates poll_batches() and related methods to return Vec<ScanBatch>, constructing batches with bucket metadata in fetch_batches_from_fetch() |
| crates/fluss/src/client/table/log_fetch_buffer.rs | Modifies CompletedFetch::fetch_batches() trait method and next_fetched_batch() to return tuples of (RecordBatch, base_offset) with correct offset tracking for sliced batches |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
luoyuxia
approved these changes
Jan 25, 2026
Contributor
There was a problem hiding this comment.
@fresh-borzoni Thanks for the pr. LGTM! But ci fails
bf1155b to
7951287
Compare
Contributor
Author
|
@luoyuxia Thanks for the review. Fixed CI/CD |
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.
close #179
Purpose
Add ScanBatch struct - batch-level equivalent of ScanRecord that wraps Arrow RecordBatch with bucket and offset metadata.
This enables downstream consumers to track per-bucket progress and determine stopping conditions when using the batch API.
API and Format
No breaking changes. poll_batches() return type changes from Vec to Vec (internal API).