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


##########
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:
   Actually, I did think it carefully for the api design for return bool or 
`Result<bool>;` and do some investigation. Return bool directly is easy to use 
for users, return `Result<bool>` is safe to use. My final thought is 
   Still keep  return bool for current api, but in the future we can hava a 
try_get_boolean method to return `Result<bool>`.
   
   Inspired by 
https://github.com/rust-postgres/rust-postgres/blob/040cd6074fdc959d5128cc2aee166af60b287986/tokio-postgres/src/row.rs#L158
   
   WDTY?



-- 
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