leekeiabstraction commented on code in PR #115:
URL: https://github.com/apache/fluss-rust/pull/115#discussion_r2645376656
##########
bindings/cpp/src/lib.rs:
##########
@@ -520,7 +520,11 @@ impl Table {
self.table_info.clone(),
);
- let scanner = match fluss_table.new_scan().create_log_scanner() {
+ let scan = match fluss_table.new_scan() {
+ Ok(s) => s,
+ Err(e) => return Err(format!("Failed to create table scan: {e}")),
+ };
+ let scanner = match scan.create_log_scanner() {
Ok(a) => a,
Err(e) => return Err(format!("Failed to create log scanner: {e}")),
};
Review Comment:
nit: slightly less verbose approach
```
let scan = fluss_table.new_scan()
.map_err(|e| format!("Failed to create table scan: {e}"))?;
let scanner = scan.create_log_scanner()
.map_err(|e| format!("Failed to create log scanner: {e}"))?;
```
##########
bindings/cpp/src/lib.rs:
##########
@@ -538,7 +542,10 @@ impl Table {
self.table_info.clone(),
);
- let scan = fluss_table.new_scan();
+ let scan = match fluss_table.new_scan() {
Review Comment:
Similarly here.
--
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]