You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "luoyuxia (via GitHub)" <gi...@apache.org> on 2025/10/20 03:38:05 UTC

[PR] [chore] Move list offsets to admin [fluss-rust]

luoyuxia opened a new pull request, #35:
URL: https://github.com/apache/fluss-rust/pull/35

   <!--
   *Thank you very much for contributing to Fluss - we are happy that you want to help us improve Fluss. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GitHub issue](https://github.com/apache/fluss-rust/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no issue.
   
     - Name the pull request in the format "[component] Title of the pull request", where *[component]* should be replaced by the name of the component being changed. Typically, this corresponds to the component label assigned to the issue (e.g., [kv], [log], [client], [flink]). Skip *[component]* if you are unsure about which is the best component.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
   
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes.
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
   
   
   **(The sections below can be removed for hotfixes or typos)**
   -->
   
   ### Purpose
   
   <!-- Linking this pull request to the issue -->
   Linked issue: close #xxx
   
   <!-- What is the purpose of the change -->
   
   ### Brief change log
   
   <!-- Please describe the changes made in this pull request and explain how they address the issue -->
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API or storage format -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   


-- 
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: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [chore] Move list offsets to admin [fluss-rust]

Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia merged PR #35:
URL: https://github.com/apache/fluss-rust/pull/35


-- 
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: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [chore] Move list offsets to admin [fluss-rust]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org