Skip to content

Implement partitioning in Upsert / Lookup#220

Merged
luoyuxia merged 11 commits into
apache:mainfrom
leekeiabstraction:kvpartition
Jan 30, 2026
Merged

Implement partitioning in Upsert / Lookup#220
luoyuxia merged 11 commits into
apache:mainfrom
leekeiabstraction:kvpartition

Conversation

@leekeiabstraction
Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #178

Brief change log

  • Add partitioning support in Upsert / Lookup
  • Add Integration test
  • Added example

@leekeiabstraction leekeiabstraction changed the title Kvpartition Implement partitioning in Upsert / Lookup Jan 28, 2026
@leekeiabstraction
Copy link
Copy Markdown
Contributor Author

@luoyuxia @fresh-borzoni

Would appreciate your reviews here. I will address the rebase conflict in follow up commits.

Copy link
Copy Markdown

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 pull request implements partitioning support for Upsert and Lookup operations in the Fluss Rust client, addressing issue #178. The changes enable the client to handle partitioned tables, bringing it to feature parity with the Java implementation.

Changes:

  • Introduced PhysicalTablePath to represent table paths with optional partition information, replacing direct TablePath usage in write/lookup paths
  • Modified metadata structures to track partition information including partition IDs and names
  • Implemented PartitionGetter to extract partition information from rows based on partition keys
  • Updated Upsert and Lookup operations to handle partitioned tables by routing operations to the correct partition
  • Added comprehensive integration tests and example code for partitioned KV tables

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
crates/fluss/src/metadata/table.rs Changed partition_keys from Vec to Arc<[String]> for better sharing; added PhysicalTablePath support; fixed typo in panic message
crates/fluss/src/cluster/cluster.rs Added partition metadata tracking and processing; updated cluster to store partition IDs and locations
crates/fluss/src/client/write/*.rs Updated write path to use PhysicalTablePath; added partition ID handling in accumulator and sender
crates/fluss/src/client/table/upsert.rs Added partition extraction using PartitionGetter; updated to create correct PhysicalTablePath
crates/fluss/src/client/table/lookup.rs Added partition-aware lookup; handles non-existent partitions gracefully
crates/fluss/src/client/table/partition_getter.rs New module for extracting partition values from rows
crates/fluss/tests/integration/kv_table.rs Added comprehensive integration test for partitioned tables
crates/examples/src/example_partitioned_kv_table.rs Added example demonstrating partitioned table operations

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

Comment thread crates/examples/src/example_partitioned_kv_table.rs Outdated
Comment thread crates/examples/src/example_partitioned_kv_table.rs Outdated
Comment thread crates/examples/src/example_partitioned_kv_table.rs Outdated
Comment thread crates/examples/src/example_partitioned_kv_table.rs Outdated
Comment thread crates/fluss/src/client/table/upsert.rs Outdated
@leekeiabstraction
Copy link
Copy Markdown
Contributor Author

Rebased and all copilot comments have been addressed

Copy link
Copy Markdown
Member

@fresh-borzoni fresh-borzoni left a comment

Choose a reason for hiding this comment

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

@leekeiabstraction Thanks for the PR! Left comments. PTAL

Comment thread crates/fluss/src/client/table/lookup.rs Outdated
Comment thread crates/fluss/src/client/write/accumulator.rs Outdated
@leekeiabstraction
Copy link
Copy Markdown
Contributor Author

leekeiabstraction commented Jan 29, 2026

Seems like we're running into timeouts on CI runs, this timeout doesn't happen on my machine for some reason. Debugging currently.

@leekeiabstraction
Copy link
Copy Markdown
Contributor Author

@fresh-borzoni TY for the review. I've updated, PTAL!

Copy link
Copy Markdown
Member

@fresh-borzoni fresh-borzoni left a comment

Choose a reason for hiding this comment

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

@leekeiabstraction Thank you for the PR. LGTM

Copy link
Copy Markdown
Contributor

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

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

@leekeiabstraction Thanks for the pr. Left some comments. PTAL

Comment thread crates/fluss/src/metadata/table.rs Outdated
Comment thread crates/fluss/src/client/table/lookup.rs Outdated
Comment thread crates/fluss/src/client/write/sender.rs Outdated
Comment thread crates/fluss/src/client/write/sender.rs Outdated
Comment thread crates/fluss/src/cluster/cluster.rs Outdated
Comment thread crates/fluss/src/cluster/cluster.rs Outdated
Comment thread crates/fluss/src/metadata/table.rs
Comment thread crates/fluss/src/client/write/accumulator.rs Outdated
@leekeiabstraction
Copy link
Copy Markdown
Contributor Author

All comments addressed. PTAL @luoyuxia

Copy link
Copy Markdown
Contributor

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

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

@leekeiabstraction Thanks for the update. Only one more comments. Otherwise, LGTM

Comment thread crates/fluss/src/client/write/sender.rs
@luoyuxia luoyuxia merged commit 83fa0aa into apache:main Jan 30, 2026
13 checks passed
@leekeiabstraction leekeiabstraction deleted the kvpartition branch January 30, 2026 08:34
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.

Implement partitioning in Upsert / Lookup

4 participants