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 845c9d7  feat: return error for partitioned tables in 
FlussConnection#get_table (#115)
845c9d7 is described below

commit 845c9d7cabe9cb0a1de322d75b4fb55107255835
Author: Arnav_Panjla <[email protected]>
AuthorDate: Tue Jan 6 11:38:02 2026 +0530

    feat: return error for partitioned tables in FlussConnection#get_table 
(#115)
---
 crates/fluss/src/client/connection.rs | 5 +++++
 crates/fluss/src/error.rs             | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/crates/fluss/src/client/connection.rs 
b/crates/fluss/src/client/connection.rs
index 899ad59..595daf5 100644
--- a/crates/fluss/src/client/connection.rs
+++ b/crates/fluss/src/client/connection.rs
@@ -77,6 +77,11 @@ impl FlussConnection {
     pub async fn get_table(&self, table_path: &TablePath) -> 
Result<FlussTable<'_>> {
         self.metadata.update_table_metadata(table_path).await?;
         let table_info = 
self.metadata.get_cluster().get_table(table_path).clone();
+        if table_info.is_partitioned() {
+            return Err(crate::error::Error::UnsupportedOperation {
+                message: "Partitioned tables are not supported".to_string(),
+            });
+        }
         Ok(FlussTable::new(self, self.metadata.clone(), table_info))
     }
 }
diff --git a/crates/fluss/src/error.rs b/crates/fluss/src/error.rs
index 0f4b1b6..e04fde1 100644
--- a/crates/fluss/src/error.rs
+++ b/crates/fluss/src/error.rs
@@ -98,6 +98,12 @@ pub enum Error {
     )]
     IoUnsupported { message: String },
 
+    #[snafu(
+        visibility(pub(crate)),
+        display("Fluss hitting unsupported operation error {}.", message)
+    )]
+    UnsupportedOperation { message: String },
+
     #[snafu(
         visibility(pub(crate)),
         display("Fluss hitting leader not available error {}.", message)

Reply via email to