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


##########
crates/fluss/src/client/admin.rs:
##########
@@ -25,13 +25,15 @@ use crate::rpc::message::{
     DropTableRequest, GetDatabaseInfoRequest, GetLatestLakeSnapshotRequest, 
GetTableRequest,
     ListDatabasesRequest, ListTablesRequest, TableExistsRequest,
 };
-use crate::rpc::{RpcClient, ServerConnection};
-
-use std::collections::HashMap;
-use std::sync::Arc;
+use crate::rpc::{ListOffsetsRequest, OffsetSpec, RpcClient, ServerConnection};
 

Review Comment:
   ListOffsetsRequest and OffsetSpec appear to live under crate::rpc::message 
(as used previously in LogScanner). Importing them from crate::rpc will fail 
unless they are re-exported. Update the import to use 
crate::rpc::message::{ListOffsetsRequest, OffsetSpec} (keeping RpcClient and 
ServerConnection from crate::rpc).



##########
bindings/python/src/utils.rs:
##########
@@ -154,7 +154,7 @@ impl Utils {
 
     /// Convert ScanRecords to Arrow RecordBatch

Review Comment:
   The docstring references ScanRecords, but the function now accepts 
Vec<ScanRecord>. Update the comment to reflect the current signature, e.g., 
'Convert Vec<ScanRecord> to Arrow RecordBatch'.
   ```suggestion
       /// Convert Vec<ScanRecord> to Arrow RecordBatch
   ```



##########
bindings/python/src/table.rs:
##########
@@ -17,12 +17,11 @@
 
 use crate::TOKIO_RUNTIME;
 use crate::*;
+use fluss::client::EARLIEST_OFFSET;

Review Comment:
   EARLIEST_OFFSET is defined in fluss::client::table::mod.rs, so importing it 
as fluss::client::EARLIEST_OFFSET will not compile unless it is re-exported at 
fluss::client. Either change the import to use 
fluss::client::table::EARLIEST_OFFSET or re-export the constant at the client 
module root.
   ```suggestion
   use fluss::client::table::EARLIEST_OFFSET;
   ```



##########
crates/fluss/src/client/table/mod.rs:
##########
@@ -22,6 +22,8 @@ use std::sync::Arc;
 
 use crate::error::Result;
 
+pub const EARLIEST_OFFSET: i64 = -2;
+

Review Comment:
   [nitpick] This constant is placed under client::table but is imported from 
fluss::client in bindings. Consider moving EARLIEST_OFFSET to fluss::client 
(e.g., client/mod.rs) or re-exporting it from there (pub use 
crate::client::table::EARLIEST_OFFSET;) to provide a stable, discoverable API 
surface for consumers.



##########
bindings/python/src/table.rs:
##########
@@ -17,12 +17,11 @@
 
 use crate::TOKIO_RUNTIME;
 use crate::*;
+use fluss::client::EARLIEST_OFFSET;
+use fluss::rpc::OffsetSpec;

Review Comment:
   OffsetSpec is likely defined under fluss::rpc::message (consistent with 
prior usage in Rust code). Importing it from fluss::rpc will not compile unless 
it is re-exported. Change to use fluss::rpc::message::OffsetSpec or add an 
appropriate re-export.
   ```suggestion
   use fluss::rpc::message::OffsetSpec;
   ```



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