This is an automated email from the ASF dual-hosted git repository.

liurenjie1024 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new 3d08f04  Rename stat_table to table_exists in Catalog trait (#257)
3d08f04 is described below

commit 3d08f0485c4738de45466a834a50a9371143e5d9
Author: 张林伟 <[email protected]>
AuthorDate: Fri Mar 15 07:57:22 2024 +0800

    Rename stat_table to table_exists in Catalog trait (#257)
---
 crates/catalog/hms/src/catalog.rs  | 2 +-
 crates/catalog/rest/src/catalog.rs | 4 ++--
 crates/iceberg/src/catalog/mod.rs  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/crates/catalog/hms/src/catalog.rs 
b/crates/catalog/hms/src/catalog.rs
index 57e3824..aba6a45 100644
--- a/crates/catalog/hms/src/catalog.rs
+++ b/crates/catalog/hms/src/catalog.rs
@@ -303,7 +303,7 @@ impl Catalog for HmsCatalog {
         todo!()
     }
 
-    async fn stat_table(&self, _table: &TableIdent) -> Result<bool> {
+    async fn table_exists(&self, _table: &TableIdent) -> Result<bool> {
         todo!()
     }
 
diff --git a/crates/catalog/rest/src/catalog.rs 
b/crates/catalog/rest/src/catalog.rs
index c10d904..812ac82 100644
--- a/crates/catalog/rest/src/catalog.rs
+++ b/crates/catalog/rest/src/catalog.rs
@@ -429,7 +429,7 @@ impl Catalog for RestCatalog {
     }
 
     /// Check if a table exists in the catalog.
-    async fn stat_table(&self, table: &TableIdent) -> Result<bool> {
+    async fn table_exists(&self, table: &TableIdent) -> Result<bool> {
         let request = self
             .client
             .0
@@ -1036,7 +1036,7 @@ mod tests {
             .unwrap();
 
         assert!(catalog
-            .stat_table(&TableIdent::new(
+            .table_exists(&TableIdent::new(
                 NamespaceIdent::new("ns1".to_string()),
                 "table1".to_string(),
             ))
diff --git a/crates/iceberg/src/catalog/mod.rs 
b/crates/iceberg/src/catalog/mod.rs
index ad7acf4..8d78e9e 100644
--- a/crates/iceberg/src/catalog/mod.rs
+++ b/crates/iceberg/src/catalog/mod.rs
@@ -84,7 +84,7 @@ pub trait Catalog: Debug + Sync + Send {
     async fn drop_table(&self, table: &TableIdent) -> Result<()>;
 
     /// Check if a table exists in the catalog.
-    async fn stat_table(&self, table: &TableIdent) -> Result<bool>;
+    async fn table_exists(&self, table: &TableIdent) -> Result<bool>;
 
     /// Rename a table in the catalog.
     async fn rename_table(&self, src: &TableIdent, dest: &TableIdent) -> 
Result<()>;

Reply via email to