luoyuxia commented on code in PR #365:
URL: https://github.com/apache/fluss-rust/pull/365#discussion_r2844536778
##########
crates/fluss/src/row/mod.rs:
##########
@@ -63,58 +65,58 @@ pub trait InternalRow: Send + Sync {
fn is_null_at(&self, pos: usize) -> bool;
/// Returns the boolean value at the given position
- fn get_boolean(&self, pos: usize) -> bool;
+ fn get_boolean(&self, pos: usize) -> Result<bool>;
Review Comment:
Returning `Result<bool>` for `get_boolean(&self, pos: usize)` also works for
me. Some Rust clients do the same, e.g.,
[rusqlite](https://github.com/rusqlite/rusqlite).
Also, since we already have C++ and Python bindings, returning
`Result<bool>` makes it easier to propagate errors and convert them into proper
exceptions in those languages rather than dealing with panics across FFI
boundaries.
So I'd suggest we go with `Result<bool>` in this pr.
@leekeiabstraction @fresh-borzoni WDYT?
--
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]