feat(c): expose read builder scan options and time-travel through the C binding#524
Open
JunRuiLee wants to merge 4 commits into
Open
feat(c): expose read builder scan options and time-travel through the C binding#524JunRuiLee wants to merge 4 commits into
JunRuiLee wants to merge 4 commits into
Conversation
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
The C binding's
paimon_table_new_read_buildertook only the table — there was no channel to pass a per-read scan selector, so time-travel reads (by snapshot-id / tag / timestamp / version) were unreachable from C.Brief change log
paimon_table_new_read_builder_with_options(table, options, options_len)taking apaimon_optionarray. The existingpaimon_table_new_read_builderis kept and now delegates to it with an empty map (one shared implementation).copy_with_time_travel; a selector that is set but does not resolve to a snapshot is an error — never a silent read-of-latest. Unsupported scan options (scan.watermark, incremental) surface as the core's typed error.Tests
cargo test -p paimon-c— empty options build like the plain builder, a non-selector option builds, >1 selector is rejected, an unsupported scan option is rejected, a malformed selector value fails closed (asserting the unified "did not resolve" error), and a null-pointer-with-length guard. Error-path tests assert the error identity, not just the shape.API and Format
Documentation