Skip to content

chore: cleanup and fix partial update in python#292

Merged
luoyuxia merged 2 commits intoapache:mainfrom
fresh-borzoni:python-code-cleanup
Feb 9, 2026
Merged

chore: cleanup and fix partial update in python#292
luoyuxia merged 2 commits intoapache:mainfrom
fresh-borzoni:python-code-cleanup

Conversation

@fresh-borzoni
Copy link
Contributor

@fresh-borzoni fresh-borzoni commented Feb 8, 2026

cleanup and partial updates fix(discovered during writing doc):

  • added latest offset for bindings
  • cleaned up docstings
  • fixed partial update and added example to verify

@fresh-borzoni
Copy link
Contributor Author

@luoyuxia PTAL 🙏

Copy link
Contributor

@leekeiabstraction leekeiabstraction left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY for the PR! Added small comment

@fresh-borzoni
Copy link
Contributor Author

@leekeiabstraction TY for the review. Addressed comment. PTAL 🙏

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the Python bindings by fixing partial-update row handling, cleaning up row conversion utilities, and exposing a “latest offset” constant consistently across Rust core and Python.

Changes:

  • Added LATEST_OFFSET constant to Rust core and exposed it in the Python module + type stubs.
  • Fixed Python upsert/delete/lookup row conversion by introducing a sparse-row conversion path for partial updates and PK-only inputs.
  • Updated Python typing/docs and expanded the example script with partial-update verification.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/fluss/src/client/table/mod.rs Adds LATEST_OFFSET constant in the core client table module.
bindings/python/src/lib.rs Exposes LATEST_OFFSET to Python via the extension module.
bindings/python/src/upsert.rs Stores/resolves partial-update target columns and uses sparse row conversion for partial upserts + PK deletes.
bindings/python/src/table.rs Refactors row conversion into python_to_sparse_generic_row and reuses it for full-row conversion.
bindings/python/src/lookup.rs Uses sparse row conversion for PK lookups.
bindings/python/fluss/init.pyi Updates stubs/docs: supported types list + adds LATEST_OFFSET.
bindings/python/example/example.py Adds example code to verify partial update behavior by names and indices.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@luoyuxia luoyuxia merged commit e1e7ba3 into apache:main Feb 9, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants