Copilot commented on code in PR #395:
URL: https://github.com/apache/fluss-rust/pull/395#discussion_r2868377736


##########
website/docs/user-guide/rust/api-reference.md:
##########
@@ -375,24 +375,25 @@ Implements the `InternalRow` trait (see below).
 
 ## `InternalRow` trait
 
-| Method                                                                       
  |  Description                            |
-|--------------------------------------------------------------------------------|-----------------------------------------|
-| `fn get_boolean(&self, idx: usize) -> bool`                                  
  | Get boolean value                       |
-| `fn get_byte(&self, idx: usize) -> i8`                                       
  | Get tinyint value                       |
-| `fn get_short(&self, idx: usize) -> i16`                                     
  | Get smallint value                      |
-| `fn get_int(&self, idx: usize) -> i32`                                       
  | Get int value                           |
-| `fn get_long(&self, idx: usize) -> i64`                                      
  | Get bigint value                        |
-| `fn get_float(&self, idx: usize) -> f32`                                     
  | Get float value                         |
-| `fn get_double(&self, idx: usize) -> f64`                                    
  | Get double value                        |
-| `fn get_string(&self, idx: usize) -> &str`                                   
  | Get string value                        |
-| `fn get_decimal(&self, idx: usize, precision: usize, scale: usize) -> 
Decimal` | Get decimal value                       |
-| `fn get_date(&self, idx: usize) -> Date`                                     
  | Get date value                          |
-| `fn get_time(&self, idx: usize) -> Time`                                     
  | Get time value                          |
-| `fn get_timestamp_ntz(&self, idx: usize, precision: u32) -> TimestampNtz`    
  | Get timestamp value                     |
-| `fn get_timestamp_ltz(&self, idx: usize, precision: u32) -> TimestampLtz`    
  | Get timestamp with local timezone value |
-| `fn get_bytes(&self, idx: usize) -> &[u8]`                                   
  | Get bytes value                         |
-| `fn get_binary(&self, idx: usize, length: usize) -> &[u8]`                   
  | Get fixed-length binary value           |
-| `fn get_char(&self, idx: usize, length: usize) -> &str`                      
  | Get fixed-length char value             |
+| Method                                                                       
          | Description                             |
+|----------------------------------------------------------------------------------------|-----------------------------------------|
+| `fn is_null_at(&self, idx: usize) -> Result<bool>`                           
          | Check if a field is null                |
+| `fn get_boolean(&self, idx: usize) -> Result<bool>`                          
          | Get boolean value                       |
+| `fn get_byte(&self, idx: usize) -> Result<i8>`                               
          | Get tinyint value                       |
+| `fn get_short(&self, idx: usize) -> Result<i16>`                             
          | Get smallint value                      |
+| `fn get_int(&self, idx: usize) -> Result<i32>`                               
          | Get int value                           |
+| `fn get_long(&self, idx: usize) -> Result<i64>`                              
          | Get bigint value                        |
+| `fn get_float(&self, idx: usize) -> Result<f32>`                             
          | Get float value                         |
+| `fn get_double(&self, idx: usize) -> Result<f64>`                            
          | Get double value                        |
+| `fn get_string(&self, idx: usize) -> Result<&str>`                           
          | Get string value                        |
+| `fn get_decimal(&self, idx: usize, precision: usize, scale: usize) -> 
Result<Decimal>` | Get decimal value                       |
+| `fn get_date(&self, idx: usize) -> Result<Date>`                             
          | Get date value                          |
+| `fn get_time(&self, idx: usize) -> Result<Time>`                             
          | Get time value                          |
+| `fn get_timestamp_ntz(&self, idx: usize, precision: u32) -> 
Result<TimestampNtz>`      | Get timestamp value                     |
+| `fn get_timestamp_ltz(&self, idx: usize, precision: u32) -> 
Result<TimestampLtz>`      | Get timestamp with local timezone value |
+| `fn get_bytes(&self, idx: usize) -> Result<&[u8]>`                           
          | Get bytes value                         |
+| `fn get_binary(&self, idx: usize, length: usize) -> Result<&[u8]>`           
          | Get fixed-length binary value           |
+| `fn get_char(&self, idx: usize, length: usize) -> Result<&str>`              
          | Get fixed-length char value             |

Review Comment:
   The `InternalRow` trait API reference table is incomplete: the actual trait 
also defines `get_field_count(&self) -> usize` and `as_encoded_bytes(...) -> 
Option<&[u8]>` (with a default impl). Either add these methods to the table or 
clarify in the surrounding text that this table only documents the typed field 
getters/null-checks.
   ```suggestion
   | Method                                                                     
            | Description                                       |
   
|----------------------------------------------------------------------------------------|---------------------------------------------------|
   | `fn is_null_at(&self, idx: usize) -> Result<bool>`                         
            | Check if a field is null                          |
   | `fn get_boolean(&self, idx: usize) -> Result<bool>`                        
            | Get boolean value                                 |
   | `fn get_byte(&self, idx: usize) -> Result<i8>`                             
            | Get tinyint value                                 |
   | `fn get_short(&self, idx: usize) -> Result<i16>`                           
            | Get smallint value                                |
   | `fn get_int(&self, idx: usize) -> Result<i32>`                             
            | Get int value                                     |
   | `fn get_long(&self, idx: usize) -> Result<i64>`                            
            | Get bigint value                                  |
   | `fn get_float(&self, idx: usize) -> Result<f32>`                           
            | Get float value                                   |
   | `fn get_double(&self, idx: usize) -> Result<f64>`                          
            | Get double value                                  |
   | `fn get_string(&self, idx: usize) -> Result<&str>`                         
            | Get string value                                  |
   | `fn get_decimal(&self, idx: usize, precision: usize, scale: usize) -> 
Result<Decimal>` | Get decimal value                                 |
   | `fn get_date(&self, idx: usize) -> Result<Date>`                           
            | Get date value                                    |
   | `fn get_time(&self, idx: usize) -> Result<Time>`                           
            | Get time value                                    |
   | `fn get_timestamp_ntz(&self, idx: usize, precision: u32) -> 
Result<TimestampNtz>`      | Get timestamp value                               |
   | `fn get_timestamp_ltz(&self, idx: usize, precision: u32) -> 
Result<TimestampLtz>`      | Get timestamp with local timezone value           |
   | `fn get_bytes(&self, idx: usize) -> Result<&[u8]>`                         
            | Get bytes value                                   |
   | `fn get_binary(&self, idx: usize, length: usize) -> Result<&[u8]>`         
            | Get fixed-length binary value                     |
   | `fn get_char(&self, idx: usize, length: usize) -> Result<&str>`            
            | Get fixed-length char value                       |
   | `fn get_field_count(&self) -> usize`                                       
            | Get number of fields in the row                   |
   | `fn as_encoded_bytes(...) -> Option<&[u8]>`                                
            | Access underlying encoded bytes representation    |
   ```



##########
website/docs/user-guide/rust/api-reference.md:
##########
@@ -375,24 +375,25 @@ Implements the `InternalRow` trait (see below).
 
 ## `InternalRow` trait
 
-| Method                                                                       
  |  Description                            |
-|--------------------------------------------------------------------------------|-----------------------------------------|
-| `fn get_boolean(&self, idx: usize) -> bool`                                  
  | Get boolean value                       |
-| `fn get_byte(&self, idx: usize) -> i8`                                       
  | Get tinyint value                       |
-| `fn get_short(&self, idx: usize) -> i16`                                     
  | Get smallint value                      |
-| `fn get_int(&self, idx: usize) -> i32`                                       
  | Get int value                           |
-| `fn get_long(&self, idx: usize) -> i64`                                      
  | Get bigint value                        |
-| `fn get_float(&self, idx: usize) -> f32`                                     
  | Get float value                         |
-| `fn get_double(&self, idx: usize) -> f64`                                    
  | Get double value                        |
-| `fn get_string(&self, idx: usize) -> &str`                                   
  | Get string value                        |
-| `fn get_decimal(&self, idx: usize, precision: usize, scale: usize) -> 
Decimal` | Get decimal value                       |
-| `fn get_date(&self, idx: usize) -> Date`                                     
  | Get date value                          |
-| `fn get_time(&self, idx: usize) -> Time`                                     
  | Get time value                          |
-| `fn get_timestamp_ntz(&self, idx: usize, precision: u32) -> TimestampNtz`    
  | Get timestamp value                     |
-| `fn get_timestamp_ltz(&self, idx: usize, precision: u32) -> TimestampLtz`    
  | Get timestamp with local timezone value |
-| `fn get_bytes(&self, idx: usize) -> &[u8]`                                   
  | Get bytes value                         |
-| `fn get_binary(&self, idx: usize, length: usize) -> &[u8]`                   
  | Get fixed-length binary value           |
-| `fn get_char(&self, idx: usize, length: usize) -> &str`                      
  | Get fixed-length char value             |
+| Method                                                                       
          | Description                             |
+|----------------------------------------------------------------------------------------|-----------------------------------------|
+| `fn is_null_at(&self, idx: usize) -> Result<bool>`                           
          | Check if a field is null                |
+| `fn get_boolean(&self, idx: usize) -> Result<bool>`                          
          | Get boolean value                       |
+| `fn get_byte(&self, idx: usize) -> Result<i8>`                               
          | Get tinyint value                       |
+| `fn get_short(&self, idx: usize) -> Result<i16>`                             
          | Get smallint value                      |
+| `fn get_int(&self, idx: usize) -> Result<i32>`                               
          | Get int value                           |
+| `fn get_long(&self, idx: usize) -> Result<i64>`                              
          | Get bigint value                        |
+| `fn get_float(&self, idx: usize) -> Result<f32>`                             
          | Get float value                         |
+| `fn get_double(&self, idx: usize) -> Result<f64>`                            
          | Get double value                        |
+| `fn get_string(&self, idx: usize) -> Result<&str>`                           
          | Get string value                        |
+| `fn get_decimal(&self, idx: usize, precision: usize, scale: usize) -> 
Result<Decimal>` | Get decimal value                       |
+| `fn get_date(&self, idx: usize) -> Result<Date>`                             
          | Get date value                          |
+| `fn get_time(&self, idx: usize) -> Result<Time>`                             
          | Get time value                          |
+| `fn get_timestamp_ntz(&self, idx: usize, precision: u32) -> 
Result<TimestampNtz>`      | Get timestamp value                     |
+| `fn get_timestamp_ltz(&self, idx: usize, precision: u32) -> 
Result<TimestampLtz>`      | Get timestamp with local timezone value |

Review Comment:
   In this table the parameter name is documented as `idx`, but the Rust trait 
uses `pos` (and the surrounding `GenericRow` methods are documented with 
`pos`). Consider switching these signatures to `pos` for consistency with the 
actual API and the rest of this page.
   ```suggestion
   | `fn is_null_at(&self, pos: usize) -> Result<bool>`                         
            | Check if a field is null                |
   | `fn get_boolean(&self, pos: usize) -> Result<bool>`                        
            | Get boolean value                       |
   | `fn get_byte(&self, pos: usize) -> Result<i8>`                             
            | Get tinyint value                       |
   | `fn get_short(&self, pos: usize) -> Result<i16>`                           
            | Get smallint value                      |
   | `fn get_int(&self, pos: usize) -> Result<i32>`                             
            | Get int value                           |
   | `fn get_long(&self, pos: usize) -> Result<i64>`                            
            | Get bigint value                        |
   | `fn get_float(&self, pos: usize) -> Result<f32>`                           
            | Get float value                         |
   | `fn get_double(&self, pos: usize) -> Result<f64>`                          
            | Get double value                        |
   | `fn get_string(&self, pos: usize) -> Result<&str>`                         
            | Get string value                        |
   | `fn get_decimal(&self, pos: usize, precision: usize, scale: usize) -> 
Result<Decimal>` | Get decimal value                       |
   | `fn get_date(&self, pos: usize) -> Result<Date>`                           
            | Get date value                          |
   | `fn get_time(&self, pos: usize) -> Result<Time>`                           
            | Get time value                          |
   | `fn get_timestamp_ntz(&self, pos: usize, precision: u32) -> 
Result<TimestampNtz>`      | Get timestamp value                     |
   | `fn get_timestamp_ltz(&self, pos: usize, precision: u32) -> 
Result<TimestampLtz>`      | Get timestamp with local timezone value |
   ```



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