Merged
Conversation
Contributor
Author
|
@luoyuxia @zhaohaidao PTAL 🙏 |
599949f to
9b48b29
Compare
Contributor
leekeiabstraction
left a comment
There was a problem hiding this comment.
TY for the PR! Left some questions
Contributor
Author
|
@leekeiabstraction TY for the review. |
There was a problem hiding this comment.
Pull request overview
Adds KV-table (primary-key) operations to the C++ bindings by introducing upsert/delete and point-lookup APIs, plus required row/FFI conversions to match existing Rust/Python behavior.
Changes:
- Add
UpsertWriterandLookuperto the C++ API and Rust/CXX bridge (create writer, upsert/delete/flush, lookup). - Add schema-aware
GenericRowcreation (Table::NewRow) and name-based setters for more ergonomic row building. - Improve/extend Rust↔FFI row conversions (including TinyInt/SmallInt and safer error propagation), and add a KV usage example + build targets.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| bindings/cpp/src/types.rs | Improves datum conversions (TinyInt/SmallInt, timestamp error handling), returns Result instead of panicking, adds internal_row_to_ffi_row for lookup results. |
| bindings/cpp/src/table.cpp | Implements C++ UpsertWriter/Lookuper, adds Table::NewRow() and schema column-map caching. |
| bindings/cpp/src/lib.rs | Extends the CXX bridge with new KV types/APIs; adds Rust-side UpsertWriter/Lookuper implementations and lookup result wiring. |
| bindings/cpp/src/ffi_converter.hpp | Minor formatting change. |
| bindings/cpp/include/fluss.hpp | Adds schema-aware name-based setters on GenericRow, new KV API declarations. |
| bindings/cpp/examples/kv_example.cpp | New end-to-end KV example covering upsert/delete/lookup and partial updates. |
| bindings/cpp/examples/admin_example.cpp | Minor formatting change. |
| bindings/cpp/CMakeLists.txt | Builds the new KV example binary. |
| bindings/cpp/BUILD.bazel | Adds Bazel target for the KV example binary. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Addressed comments |
luoyuxia
approved these changes
Feb 9, 2026
Contributor
luoyuxia
left a comment
There was a problem hiding this comment.
@fresh-borzoni Thanks. LGTM!
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.
Summary
closes #250
KV Tables Support for C++ Bindings
Added
UpsertWriterandLookuperclasses to the C++ bindings, enabling full KV table operations on primary-key tables.UpsertWriter
NewUpsertWriter(writer, {"user_id", "balance"}))NewUpsertWriter(writer, {0, 1}))Lookuper
Note: currently copies over FFI, will be optimized as part of broader #87