You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds ConsumerManager and Table::consumer_manager() to the Rust API. No storage format changes; the implementation reads the existing Java-compatible consumer-<id> files and nextSnapshot JSON field.
Documentation
Adds $consumers usage and column documentation to docs/src/sql.md.
Thanks for adding $consumers. The filter pushdown and Java-compatible JSON handling look good overall. I found two minor compatibility/correctness issues:
The overwrite retry window is shorter than Java's (crates/paimon/src/table/consumer_manager.rs:27-28,66-84). Java release-1.3 retries mismatched consumer JSON 10 times with a 1-second delay, while this implementation uses 200 ms, exhausting the retries after about 1.8 seconds. I reproduced a case where the file becomes valid after 2.1 seconds: Rust returns DataInvalid, while Java would still be retrying. Could we align the interval/window with Java and add a delayed-overwrite test?
A POSIX consumer ID containing a backslash is silently omitted by list_all (crates/paimon/src/table/consumer_manager.rs:103-113). The listed filename preserves \\, but the local file:// path conversion normalizes it to / when get(id) reconstructs the path, so a file such as consumer-id\\part is listed and then read from a different path. Reading the listed FileStatus.path directly, or consistently validating such IDs, would avoid this.
Non-blocking: consumer files are currently read serially. Bounded concurrency may be worth considering for object-store tables with many consumers.
I also ran the PR's targeted tests and clippy commands locally; they all passed.
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
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
Support querying Java-compatible Paimon consumer progress through the DataFusion
$consumerssystem table.Brief change log
ConsumerManagerfor readingconsumer/consumer-*progress files.$consumerswith the columnsconsumer_idandnext_snapshot_id.consumer_idequality andINfilters to avoid reading unrelated consumer files.Tests
cargo +1.94.0 test --locked -p paimon retries_a_consumer_being_overwritten --libcargo +1.94.0 test --locked -p paimon-datafusion --test system_tablescargo +1.94.0 clippy --locked -p paimon-datafusion --tests -- -D warningsAPI and Format
Adds
ConsumerManagerandTable::consumer_manager()to the Rust API. No storage format changes; the implementation reads the existing Java-compatibleconsumer-<id>files andnextSnapshotJSON field.Documentation
Adds
$consumersusage and column documentation todocs/src/sql.md.