From 0e3ed723fcc891ecfde44a0dbb09c161e6b2da2a Mon Sep 17 00:00:00 2001 From: Arnav-Panjla Date: Mon, 5 Jan 2026 18:33:56 +0530 Subject: [PATCH] feat: return error for partitioned tables in FlussConnection#get_table --- 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 899ad597..595daf55 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> { 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 0f4b1b6d..e04fde14 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)