luoyuxia commented on code in PR #349:
URL: https://github.com/apache/fluss-rust/pull/349#discussion_r2819922324


##########
website/docs/user-guide/cpp/data-types.md:
##########
@@ -52,46 +54,90 @@ row.Set("created_at", 
fluss::Timestamp::FromMillis(1700000000000));
 row.Set("nickname", nullptr);    // set to null
 ```
 
-## GenericRow Getters
+## Reading Field Values
+
+Field values are read through `RowView` (from scan results) and `LookupResult` 
(from lookups), not through `GenericRow`. Both provide the same getter 
interface with zero-copy access to string and bytes data.
+
+:::warning Lifetime
+`RowView` borrows from `ScanRecords`. It must not outlive the `ScanRecords` 
that produced it (similar to `std::string_view` borrowing from `std::string`).
+:::
 
 ```cpp
-std::string name = result_row.GetString(1);
-float score = result_row.GetFloat32(3);
-std::string balance = result_row.DecimalToString(4);
-fluss::Date date = result_row.GetDate(5);
-fluss::Time time = result_row.GetTime(6);
-fluss::Timestamp ts = result_row.GetTimestamp(7);
+// DON'T — string_view dangles after ScanRecords is destroyed:

Review Comment:
   👍 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to