This is an automated email from the ASF dual-hosted git repository.
yuxia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss-rust.git
The following commit(s) were added to refs/heads/main by this push:
new c6b63ed chore: remove LATEST_OFFSET which isn't handle by server
(#312)
c6b63ed is described below
commit c6b63ed115d3f14cefee7f360cb603cd6e1e1360
Author: Keith Lee <[email protected]>
AuthorDate: Sat Feb 14 00:09:06 2026 +0000
chore: remove LATEST_OFFSET which isn't handle by server (#312)
---
bindings/cpp/include/fluss.hpp | 1 -
bindings/python/fluss/__init__.pyi | 2 --
bindings/python/src/lib.rs | 1 -
crates/fluss/src/client/table/mod.rs | 1 -
crates/fluss/tests/integration/log_table.rs | 6 +++---
5 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/bindings/cpp/include/fluss.hpp b/bindings/cpp/include/fluss.hpp
index 926fbc6..dd29882 100644
--- a/bindings/cpp/include/fluss.hpp
+++ b/bindings/cpp/include/fluss.hpp
@@ -304,7 +304,6 @@ enum class DatumType {
};
constexpr int64_t EARLIEST_OFFSET = -2;
-constexpr int64_t LATEST_OFFSET = -1;
enum class OffsetSpec {
Earliest = 0,
diff --git a/bindings/python/fluss/__init__.pyi
b/bindings/python/fluss/__init__.pyi
index dff90c3..daccca8 100644
--- a/bindings/python/fluss/__init__.pyi
+++ b/bindings/python/fluss/__init__.pyi
@@ -848,7 +848,5 @@ class OffsetType:
# Constant for earliest offset (-2)
EARLIEST_OFFSET: int
-# Constant for latest offset (-1)
-LATEST_OFFSET: int
__version__: str
diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs
index 41d516e..801db2c 100644
--- a/bindings/python/src/lib.rs
+++ b/bindings/python/src/lib.rs
@@ -99,7 +99,6 @@ fn _fluss(m: &Bound<'_, PyModule>) -> PyResult<()> {
// Register constants
m.add("EARLIEST_OFFSET", fcore::client::EARLIEST_OFFSET)?;
- m.add("LATEST_OFFSET", fcore::client::LATEST_OFFSET)?;
// Register exception types and error codes
m.add_class::<FlussError>()?;
diff --git a/crates/fluss/src/client/table/mod.rs
b/crates/fluss/src/client/table/mod.rs
index 4e5b5d1..4c3dfe2 100644
--- a/crates/fluss/src/client/table/mod.rs
+++ b/crates/fluss/src/client/table/mod.rs
@@ -22,7 +22,6 @@ use crate::metadata::{TableInfo, TablePath};
use std::sync::Arc;
pub const EARLIEST_OFFSET: i64 = -2;
-pub const LATEST_OFFSET: i64 = -1;
mod append;
mod lookup;
diff --git a/crates/fluss/tests/integration/log_table.rs
b/crates/fluss/tests/integration/log_table.rs
index efb445f..7642067 100644
--- a/crates/fluss/tests/integration/log_table.rs
+++ b/crates/fluss/tests/integration/log_table.rs
@@ -38,7 +38,7 @@ mod table_test {
create_partitions, create_table, get_cluster, start_cluster,
stop_cluster,
};
use arrow::array::record_batch;
- use fluss::client::{FlussTable, TableScan};
+ use fluss::client::{EARLIEST_OFFSET, FlussTable, TableScan};
use fluss::metadata::{DataTypes, Schema, TableBucket, TableDescriptor,
TablePath};
use fluss::record::ScanRecord;
use fluss::row::InternalRow;
@@ -122,9 +122,9 @@ mod table_test {
.expect("Failed to create log scanner");
for bucket_id in 0..num_buckets {
log_scanner
- .subscribe(bucket_id, 0)
+ .subscribe(bucket_id, EARLIEST_OFFSET)
.await
- .expect("Failed to subscribe");
+ .expect("Failed to subscribe with EARLIEST_OFFSET");
}
// Poll for records