Repository navigation
Conversation
This branch has not been deployed
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
Related to #459. Depends on #527 (PR2); this is PR3 of the Table refactoring series.
A Context currently combines table-loading identity, storage configuration, dynamic options and execution settings. Operators created from a loaded table therefore still receive another set of table-loading parameters, leaving two places to supply its path, schema, filesystem and catalog identity.
Separate those responsibilities:
TableLoadOptionsfor path, explicit filesystem, URI scheme routing, serialized Paimon table schema, catalog, identifier and expected catalog UUID.WithBranch()and FormatTable-based builder constructors.Create(load_options, context, dynamic_options); loaded tables takeNewXxx(context, dynamic_options). The static factories share one table-loading implementation.schemaorbranchremain readable; keep native missing-schema errors unchanged.The resource binding follows the local Java Paimon
CatalogUtils.loadTable()/toFormatTable()model: catalog metadata determines the table and its FileIO. PR4 will cover generalTable::Copy(), branch switching and historical-schema time travel; those APIs are outside this PR.Review scope: #527 is still open, so the default Files changed tab also includes PR2. Review only the PR3 increment. PR3 is based on PR2's latest CI-warning fixes and should be rebased onto main after #527 merges.
Suggested review order:
table_load_options.hand the four public Context headers;table_factory.cpp; managed/format/systemNewXxx()implementations; catalog binding and regression tests. Call-site migrations can then be reviewed against those signatures.Tests
Publication commit:
2de582d505ef4a3fbdb688be0406f8717966ad92.On the publication commit:
pre-commit run --files <all 113 changed files>passed, including clang-format, C++ lint, codespell and Sphinx lint. The whitespace check passed.Earlier PR3 validation before synchronizing PR2's CI-warning-only follow-up:
Regression coverage includes Context creation without table I/O, invalid load combinations, catalog UUID/path checks, catalog lifetime and routing, explicit filesystem precedence, main-branch identifier aliases, native missing-schema errors, and actual scan/read/write/commit of external format partitions named
schemaandbranch(including a data filename resembling a schema version).Java was inspected as a semantic reference; Java tests were not run.
API and Format
Breaking C++ API changes:
paimon::TableLoadOptionsininclude/paimon/catalog/table_load_options.h.WithBranch(). Specify a branch through the table identifier or dynamic options.Create(context)signatures withCreate(load_options, context, dynamic_options = {}).Table::NewScan/NewRead/NewWrite/NewCommitand their implementations.No storage-format or protocol changes.
Documentation
Update catalog and format-table API references, read/write/commit/realtime and cache/index guides, examples and benchmark callers. The catalog guide includes both loaded-table and static-factory usage and explains catalog identity, filesystem selection and branch inputs.
Generative AI tooling
Generated-by: OpenAI Codex (GPT-6)