You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fluss.apache.org by yu...@apache.org on 2026/02/18 01:05:29 UTC
(fluss-rust) branch main updated: chore: add missing ChangeType enum and doc in C++. Add test coverage for ChangeType in integration test. (#334)
This is an automated email from the ASF dual-hosted git repository.
yuxia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss-rust.git
The following commit(s) were added to refs/heads/main by this push:
new eab4a10 chore: add missing ChangeType enum and doc in C++. Add test coverage for ChangeType in integration test. (#334)
eab4a10 is described below
commit eab4a10874c9ae4fb5d500cfe8bab81f4ff0f649
Author: Keith Lee <le...@gmail.com>
AuthorDate: Wed Feb 18 01:05:25 2026 +0000
chore: add missing ChangeType enum and doc in C++. Add test coverage for ChangeType in integration test. (#334)
---
website/docs/user-guide/cpp/api-reference.md | 39 +++++++++++++++++++++++-----
1 file changed, 33 insertions(+), 6 deletions(-)
diff --git a/website/docs/user-guide/cpp/api-reference.md b/website/docs/user-guide/cpp/api-reference.md
index 681394a..3b93916 100644
--- a/website/docs/user-guide/cpp/api-reference.md
+++ b/website/docs/user-guide/cpp/api-reference.md
@@ -226,12 +226,14 @@ When using `table.NewRow()`, the `Set()` method auto-routes to the correct type
## `ScanRecord`
-| Field | Type | Description |
-|-------------|--------------|-------------------------------|
-| `bucket_id` | `int32_t` | Bucket this record belongs to |
-| `offset` | `int64_t` | Record offset in the log |
-| `timestamp` | `int64_t` | Record timestamp |
-| `row` | `GenericRow` | Row data |
+| Field | Type | Description |
+|----------------|--------------------------|---------------------------------------------------------------------|
+| `bucket_id` | `int32_t` | Bucket this record belongs to |
+| `partition_id` | `std::optional<int64_t>` | Partition ID (present only for partitioned tables) |
+| `offset` | `int64_t` | Record offset in the log |
+| `timestamp` | `int64_t` | Record timestamp |
+| `change_type` | `ChangeType` | Change type (AppendOnly, Insert, UpdateBefore, UpdateAfter, Delete) |
+| `row` | `RowView` | Row data |
## `ScanRecords`
@@ -450,6 +452,31 @@ scanner.Subscribe(0, offsets[0]);
## Enums
+### `ChangeType`
+
+| Value | Short String | Description |
+|----------------|--------------|----------------------------------|
+| `AppendOnly` | `+A` | Append-only record |
+| `Insert` | `+I` | Inserted row |
+| `UpdateBefore` | `-U` | Previous value of an updated row |
+| `UpdateAfter` | `+U` | New value of an updated row |
+| `Delete` | `-D` | Deleted row |
+
+You may refer to the following example to convert ChangeType enum to its short string representation.
+
+```cpp
+inline const char* ChangeTypeShortString(ChangeType ct) {
+ switch (ct) {
+ case ChangeType::AppendOnly: return "+A";
+ case ChangeType::Insert: return "+I";
+ case ChangeType::UpdateBefore: return "-U";
+ case ChangeType::UpdateAfter: return "+U";
+ case ChangeType::Delete: return "-D";
+ }
+ throw std::invalid_argument("Unknown ChangeType");
+}
+```
+
### `TypeId`
| Value | Description |