This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git
The following commit(s) were added to refs/heads/gh-pages by this push:
new f1faf23da deploy: 5d07594becbe9d774105b208c87a4bd9aae68065
f1faf23da is described below
commit f1faf23dad42a6af2581a9ada94caa7719435ff3
Author: liurenjie1024 <[email protected]>
AuthorDate: Thu Jan 22 01:20:53 2026 +0000
deploy: 5d07594becbe9d774105b208c87a4bd9aae68065
---
api/iceberg_catalog_hms/struct.HmsCatalog.html | 90 ++---
.../struct.HmsCatalogBuilder.html | 4 +-
api/src/iceberg/io/file_io.rs.html | 6 +-
api/src/iceberg/io/storage.rs.html | 16 +-
api/src/iceberg_datafusion/schema.rs.html | 386 ++++++++++++---------
api/trait.impl/iceberg/catalog/trait.Catalog.js | 4 +-
.../iceberg/catalog/trait.CatalogBuilder.js | 4 +-
7 files changed, 292 insertions(+), 218 deletions(-)
diff --git a/api/iceberg_catalog_hms/struct.HmsCatalog.html
b/api/iceberg_catalog_hms/struct.HmsCatalog.html
index 7a840c12c..94ba92e31 100644
--- a/api/iceberg_catalog_hms/struct.HmsCatalog.html
+++ b/api/iceberg_catalog_hms/struct.HmsCatalog.html
@@ -1,19 +1,19 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta
name="viewport" content="width=device-width, initial-scale=1.0"><meta
name="generator" content="rustdoc"><meta name="description" content="Hive
metastore Catalog."><title>HmsCatalog in iceberg_catalog_hms -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medi
[...]
-</div></details><h2 id="implementations"
class="section-header">Implementations<a href="#implementations"
class="anchor">§</a></h2><div id="implementations-list"><details class="toggle
implementors-toggle" open><summary><section id="impl-HmsCatalog"
class="impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#170-211">Source</a><a
href="#impl-HmsCatalog" class="anchor">§</a><h3 class="code-header">impl <a
class="struct" href="struct.HmsCatalog.html" title="struc [...]
-</div></details></div></details></div><h2 id="trait-implementations"
class="section-header">Trait Implementations<a href="#trait-implementations"
class="anchor">§</a></h2><div id="trait-implementations-list"><details
class="toggle implementors-toggle" open><summary><section
id="impl-Catalog-for-HmsCatalog" class="impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#214-612">Source</a><a
href="#impl-Catalog-for-HmsCatalog" class="anchor">§</a><h3 class="code-hea
[...]
+</div></details><h2 id="implementations"
class="section-header">Implementations<a href="#implementations"
class="anchor">§</a></h2><div id="implementations-list"><details class="toggle
implementors-toggle" open><summary><section id="impl-HmsCatalog"
class="impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#170-211">Source</a><a
href="#impl-HmsCatalog" class="anchor">§</a><h3 class="code-header">impl <a
class="struct" href="struct.HmsCatalog.html" title="struc [...]
+</div></details></div></details></div><h2 id="trait-implementations"
class="section-header">Trait Implementations<a href="#trait-implementations"
class="anchor">§</a></h2><div id="trait-implementations-list"><details
class="toggle implementors-toggle" open><summary><section
id="impl-Catalog-for-HmsCatalog" class="impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#214-612">Source</a><a
href="#impl-Catalog-for-HmsCatalog" class="anchor">§</a><h3 class="code-hea
[...]
&'life0 self,
- parent: <a class="enum"
href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"
title="enum core::option::Option">Option</a><&'life1 <a class="struct"
href="../iceberg/catalog/struct.NamespaceIdent.html" title="struct
iceberg::catalog::NamespaceIdent">NamespaceIdent</a>>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+ parent: <a class="enum"
href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"
title="enum core::option::Option">Option</a><&'life1 NamespaceIdent>,
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = Result<<a
class="struct" href="https://doc.rust-lang.org/nig [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</div></h4></section></summary><div
class="docblock"><p>HMS doesn’t support nested namespaces.</p>
<p>We will return empty list if parent is some.</p>
<p>Align with java implementation: <a
href="https://github.com/apache/iceberg/blob/9bd62f79f8cd973c39d14e89163cb1c707470ed2/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java#L305C26-L330">https://github.com/apache/iceberg/blob/9bd62f79f8cd973c39d14e89163cb1c707470ed2/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java#L305C26-L330</a></p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.create_namespace" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#256-270">Source</a><a
href="#method.create_namespace" class="anchor">§</a><h4 class="code-header">fn
<a href="../iceberg/catalog/trait.Catalog.html#tymethod.create_namespace"
class="fn">create_namespace</a><'life0, 'life1, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.create_namespace" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#256-270">Source</a><a
href="#method.create_namespace" class="anchor">§</a><h4 class="code-header">fn
<a class="fn">create_namespace</a><'life0, 'life1, 'async_trait>(
&'life0 self,
- namespace: &'life1 <a class="struct"
href="../iceberg/catalog/struct.NamespaceIdent.html" title="struct
iceberg::catalog::NamespaceIdent">NamespaceIdent</a>,
+ namespace: &'life1 NamespaceIdent,
properties: <a class="struct"
href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html"
title="struct std::collections::hash::map::HashMap">HashMap</a><<a
class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>, <a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output =
Result<Namespace>> + <a class="trait" href="https://do [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</div></h4></section></summary><div
class="docblock"><p>Creates a new namespace with the given identifier and
properties.</p>
@@ -30,10 +30,10 @@ successfully converted into a database configuration.</li>
<li>Errors from the underlying database creation process, converted using
<code>from_thrift_error</code>.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.get_namespace" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#282-296">Source</a><a
href="#method.get_namespace" class="anchor">§</a><h4 class="code-header">fn <a
href="../iceberg/catalog/trait.Catalog.html#tymethod.get_namespace"
class="fn">get_namespace</a><'life0, 'life1, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.get_namespace" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#282-296">Source</a><a
href="#method.get_namespace" class="anchor">§</a><h4 class="code-header">fn <a
class="fn">get_namespace</a><'life0, 'life1, 'async_trait>(
&'life0 self,
- namespace: &'life1 <a class="struct"
href="../iceberg/catalog/struct.NamespaceIdent.html" title="struct
iceberg::catalog::NamespaceIdent">NamespaceIdent</a>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+ namespace: &'life1 NamespaceIdent,
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output =
Result<Namespace>> + <a class="trait" href="https://do [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</div></h4></section></summary><div
class="docblock"><p>Retrieves a namespace by its identifier.</p>
@@ -46,10 +46,10 @@ Constructs a <code>Namespace</code> object with the
retrieved data and returns i
<li>If there is an error querying the database, returned by
<code>from_thrift_error</code>.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.namespace_exists" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#310-327">Source</a><a
href="#method.namespace_exists" class="anchor">§</a><h4 class="code-header">fn
<a href="../iceberg/catalog/trait.Catalog.html#tymethod.namespace_exists"
class="fn">namespace_exists</a><'life0, 'life1, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.namespace_exists" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#310-327">Source</a><a
href="#method.namespace_exists" class="anchor">§</a><h4 class="code-header">fn
<a class="fn">namespace_exists</a><'life0, 'life1, 'async_trait>(
&'life0 self,
- namespace: &'life1 <a class="struct"
href="../iceberg/catalog/struct.NamespaceIdent.html" title="struct
iceberg::catalog::NamespaceIdent">NamespaceIdent</a>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+ namespace: &'life1 NamespaceIdent,
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = Result<<a
class="primitive" href="https://doc.rust-lang.org/ [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</div></h4></section></summary><div
class="docblock"><p>Checks if a namespace exists within the Hive Metastore.</p>
@@ -64,11 +64,11 @@ to determine if the specified namespace (database)
exists.</p>
<li><code>Err(...)</code> if an error occurs during validation or the Hive
Metastore
query, with the error encapsulating the issue.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.update_namespace" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#339-363">Source</a><a
href="#method.update_namespace" class="anchor">§</a><h4 class="code-header">fn
<a href="../iceberg/catalog/trait.Catalog.html#tymethod.update_namespace"
class="fn">update_namespace</a><'life0, 'life1, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.update_namespace" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#339-363">Source</a><a
href="#method.update_namespace" class="anchor">§</a><h4 class="code-header">fn
<a class="fn">update_namespace</a><'life0, 'life1, 'async_trait>(
&'life0 self,
- namespace: &'life1 <a class="struct"
href="../iceberg/catalog/struct.NamespaceIdent.html" title="struct
iceberg::catalog::NamespaceIdent">NamespaceIdent</a>,
+ namespace: &'life1 NamespaceIdent,
properties: <a class="struct"
href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html"
title="struct std::collections::hash::map::HashMap">HashMap</a><<a
class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>, <a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = Result<<a
class="primitive" href="https://doc.rust-lang.org/ [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</div></h4></section></summary><div
class="docblock"><p>Asynchronously updates properties of an existing
namespace.</p>
@@ -79,10 +79,10 @@ in the Hive Metastore.</p>
<p>Returns <code>Ok(())</code> if the namespace update is successful. If the
namespace cannot be updated due to missing information or an error
during the update process, an <code>Err(...)</code> is returned.</p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.drop_namespace" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#372-382">Source</a><a
href="#method.drop_namespace" class="anchor">§</a><h4 class="code-header">fn <a
href="../iceberg/catalog/trait.Catalog.html#tymethod.drop_namespace"
class="fn">drop_namespace</a><'life0, 'life1, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.drop_namespace" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#372-382">Source</a><a
href="#method.drop_namespace" class="anchor">§</a><h4 class="code-header">fn <a
class="fn">drop_namespace</a><'life0, 'life1, 'async_trait>(
&'life0 self,
- namespace: &'life1 <a class="struct"
href="../iceberg/catalog/struct.NamespaceIdent.html" title="struct
iceberg::catalog::NamespaceIdent">NamespaceIdent</a>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+ namespace: &'life1 NamespaceIdent,
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = Result<<a
class="primitive" href="https://doc.rust-lang.org/ [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</div></h4></section></summary><div
class="docblock"><p>Asynchronously drops a namespace from the Hive
Metastore.</p>
@@ -93,10 +93,10 @@ during the update process, an <code>Err(...)</code> is
returned.</p>
<li><code>Err(...)</code> signifies failure to drop the namespace due to
validation
errors, connectivity issues, or Hive Metastore constraints.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.list_tables" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#393-410">Source</a><a
href="#method.list_tables" class="anchor">§</a><h4 class="code-header">fn <a
href="../iceberg/catalog/trait.Catalog.html#tymethod.list_tables"
class="fn">list_tables</a><'life0, 'life1, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.list_tables" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#393-410">Source</a><a
href="#method.list_tables" class="anchor">§</a><h4 class="code-header">fn <a
class="fn">list_tables</a><'life0, 'life1, 'async_trait>(
&'life0 self,
- namespace: &'life1 <a class="struct"
href="../iceberg/catalog/struct.NamespaceIdent.html" title="struct
iceberg::catalog::NamespaceIdent">NamespaceIdent</a>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+ namespace: &'life1 NamespaceIdent,
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = Result<<a
class="struct" href="https://doc.rust-lang.org/nig [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</div></h4></section></summary><div
class="docblock"><p>Asynchronously lists all tables within a specified
namespace.</p>
@@ -108,11 +108,11 @@ representing a table within the specified namespace.</li>
<li><code>Err(...)</code> if an error occurs during namespace validation or
while
querying the database.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.create_table" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#424-471">Source</a><a
href="#method.create_table" class="anchor">§</a><h4 class="code-header">fn <a
href="../iceberg/catalog/trait.Catalog.html#tymethod.create_table"
class="fn">create_table</a><'life0, 'life1, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.create_table" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#424-471">Source</a><a
href="#method.create_table" class="anchor">§</a><h4 class="code-header">fn <a
class="fn">create_table</a><'life0, 'life1, 'async_trait>(
&'life0 self,
- namespace: &'life1 <a class="struct"
href="../iceberg/catalog/struct.NamespaceIdent.html" title="struct
iceberg::catalog::NamespaceIdent">NamespaceIdent</a>,
- creation: <a class="struct"
href="../iceberg/catalog/struct.TableCreation.html" title="struct
iceberg::catalog::TableCreation">TableCreation</a>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+ namespace: &'life1 NamespaceIdent,
+ creation: TableCreation,
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output =
Result<Table>> + <a class="trait" href="https://doc.ru [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</div></h4></section></summary><div
class="docblock"><p>Creates a new table within a specified namespace using the
provided
@@ -125,10 +125,10 @@ table.</p>
namespace identifiers, failure to determine a default storage location,
issues generating or writing table metadata, and errors communicating
with the Hive Metastore.</p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.load_table" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#485-509">Source</a><a
href="#method.load_table" class="anchor">§</a><h4 class="code-header">fn <a
href="../iceberg/catalog/trait.Catalog.html#tymethod.load_table"
class="fn">load_table</a><'life0, 'life1, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.load_table" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#485-509">Source</a><a
href="#method.load_table" class="anchor">§</a><h4 class="code-header">fn <a
class="fn">load_table</a><'life0, 'life1, 'async_trait>(
&'life0 self,
- table: &'life1 <a class="struct"
href="../iceberg/catalog/struct.TableIdent.html" title="struct
iceberg::catalog::TableIdent">TableIdent</a>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+ table: &'life1 TableIdent,
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output =
Result<Table>> + <a class="trait" href="https://doc.ru [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</div></h4></section></summary><div
class="docblock"><p>Loads a table from the Hive Metastore and constructs a
<code>Table</code> object
@@ -143,10 +143,10 @@ based on its metadata.</p>
<li>Absence of metadata location information in the table’s properties.</li>
<li>Issues reading or deserializing the table’s metadata file.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.drop_table" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#521-531">Source</a><a
href="#method.drop_table" class="anchor">§</a><h4 class="code-header">fn <a
href="../iceberg/catalog/trait.Catalog.html#tymethod.drop_table"
class="fn">drop_table</a><'life0, 'life1, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.drop_table" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#521-531">Source</a><a
href="#method.drop_table" class="anchor">§</a><h4 class="code-header">fn <a
class="fn">drop_table</a><'life0, 'life1, 'async_trait>(
&'life0 self,
- table: &'life1 <a class="struct"
href="../iceberg/catalog/struct.TableIdent.html" title="struct
iceberg::catalog::TableIdent">TableIdent</a>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+ table: &'life1 TableIdent,
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = Result<<a
class="primitive" href="https://doc.rust-lang.org/ [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</div></h4></section></summary><div
class="docblock"><p>Asynchronously drops a table from the database.</p>
@@ -160,10 +160,10 @@ attempting to drop the table. This includes scenarios
where
the table does not exist.</li>
<li>Any network or communication error occurs with the database backend.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.table_exists" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#540-560">Source</a><a
href="#method.table_exists" class="anchor">§</a><h4 class="code-header">fn <a
href="../iceberg/catalog/trait.Catalog.html#tymethod.table_exists"
class="fn">table_exists</a><'life0, 'life1, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.table_exists" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#540-560">Source</a><a
href="#method.table_exists" class="anchor">§</a><h4 class="code-header">fn <a
class="fn">table_exists</a><'life0, 'life1, 'async_trait>(
&'life0 self,
- table: &'life1 <a class="struct"
href="../iceberg/catalog/struct.TableIdent.html" title="struct
iceberg::catalog::TableIdent">TableIdent</a>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+ table: &'life1 TableIdent,
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = Result<<a
class="primitive" href="https://doc.rust-lang.org/ [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</div></h4></section></summary><div
class="docblock"><p>Asynchronously checks the existence of a specified table
@@ -174,11 +174,11 @@ in the database.</p>
<li><code>Ok(false)</code> if the table does not exist in the database.</li>
<li><code>Err(...)</code> if an error occurs during the process</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.rename_table" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#568-593">Source</a><a
href="#method.rename_table" class="anchor">§</a><h4 class="code-header">fn <a
href="../iceberg/catalog/trait.Catalog.html#tymethod.rename_table"
class="fn">rename_table</a><'life0, 'life1, 'life2, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.rename_table" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#568-593">Source</a><a
href="#method.rename_table" class="anchor">§</a><h4 class="code-header">fn <a
class="fn">rename_table</a><'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
- src: &'life1 <a class="struct"
href="../iceberg/catalog/struct.TableIdent.html" title="struct
iceberg::catalog::TableIdent">TableIdent</a>,
- dest: &'life2 <a class="struct"
href="../iceberg/catalog/struct.TableIdent.html" title="struct
iceberg::catalog::TableIdent">TableIdent</a>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+ src: &'life1 TableIdent,
+ dest: &'life2 TableIdent,
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = Result<<a
class="primitive" href="https://doc.rust-lang.org/ [...]
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
@@ -189,17 +189,17 @@ or moves it between namespaces (databases).</p>
<li><code>Ok(())</code> on successful rename or move of the table.</li>
<li><code>Err(...)</code> if an error occurs during the process.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.register_table" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#595-604">Source</a><a
href="#method.register_table" class="anchor">§</a><h4 class="code-header">fn <a
href="../iceberg/catalog/trait.Catalog.html#tymethod.register_table"
class="fn">register_table</a><'life0, 'life1, 'async_trait>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.register_table" class="method trait-impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#595-604">Source</a><a
href="#method.register_table" class="anchor">§</a><h4 class="code-header">fn <a
class="fn">register_table</a><'life0, 'life1, 'async_trait>(
&'life0 self,
- _table_ident: &'life1 <a class="struct"
href="../iceberg/catalog/struct.TableIdent.html" title="struct
iceberg::catalog::TableIdent">TableIdent</a>,
+ _table_ident: &'life1 TableIdent,
_metadata_location: <a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output =
Result<Table>> + <a class="trait" href="https://doc.ru [...]
Self: 'async_trait,
'life0: 'async_trait,
- 'life1: 'async_trait,</div></h4></section></summary><div
class='docblock'>Register an existing table to the
catalog.</div></details><details class="toggle method-toggle"
open><summary><section id="method.update_table" class="method trait-impl"><a
class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#606-611">Source</a><a
href="#method.update_table" class="anchor">§</a><h4 class="code-header">fn <a
href="../iceberg/catalog/trait.Catalog.html#tymethod.update_table" cla [...]
+ 'life1: 'async_trait,</div></h4></section></summary><div
class='docblock'>Register an existing table to the
catalog.</div></details><details class="toggle method-toggle"
open><summary><section id="method.update_table" class="method trait-impl"><a
class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#606-611">Source</a><a
href="#method.update_table" class="anchor">§</a><h4 class="code-header">fn <a
class="fn">update_table</a><'life0, 'async_trait>(
&'life0 self,
- _commit: <a class="struct"
href="../iceberg/catalog/struct.TableCommit.html" title="struct
iceberg::catalog::TableCommit">TableCommit</a>,
-) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title= [...]
+ _commit: TableCommit,
+) -> <a class="struct"
href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct
core::pin::Pin">Pin</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html"
title="struct alloc::boxed::Box">Box</a><dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output =
Result<Table>> + <a class="trait" href="https://doc.ru [...]
Self: 'async_trait,
'life0: 'async_trait,</div></h4></section></summary><div
class='docblock'>Update a table to the
catalog.</div></details></div></details><details class="toggle
implementors-toggle" open><summary><section id="impl-Debug-for-HmsCatalog"
class="impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#162-168">Source</a><a
href="#impl-Debug-for-HmsCatalog" class="anchor">§</a><h3
class="code-header">impl <a class="trait"
href="https://doc.rust-lang.org/nightly/core/ [...]
T: 'static + ?<a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"
title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div
class="impl-items"><details class="toggle method-toggle" open><summary><section
id="method.type_id" class="method trait-impl"><a class="src rightside"
href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#139">Source</a><a
href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href
[...]
diff --git a/api/iceberg_catalog_hms/struct.HmsCatalogBuilder.html
b/api/iceberg_catalog_hms/struct.HmsCatalogBuilder.html
index a907f8168..881c2e49b 100644
--- a/api/iceberg_catalog_hms/struct.HmsCatalogBuilder.html
+++ b/api/iceberg_catalog_hms/struct.HmsCatalogBuilder.html
@@ -1,9 +1,9 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta
name="viewport" content="width=device-width, initial-scale=1.0"><meta
name="generator" content="rustdoc"><meta name="description" content="Builder
for [`RestCatalog`]."><title>HmsCatalogBuilder in iceberg_catalog_hms -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,F
[...]
-</div></details><h2 id="trait-implementations" class="section-header">Trait
Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div
id="trait-implementations-list"><details class="toggle implementors-toggle"
open><summary><section id="impl-CatalogBuilder-for-HmsCatalogBuilder"
class="impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#69-130">Source</a><a
href="#impl-CatalogBuilder-for-HmsCatalogBuilder" class="anchor">§</a><h3
class="cod [...]
+</div></details><h2 id="trait-implementations" class="section-header">Trait
Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div
id="trait-implementations-list"><details class="toggle implementors-toggle"
open><summary><section id="impl-CatalogBuilder-for-HmsCatalogBuilder"
class="impl"><a class="src rightside"
href="../src/iceberg_catalog_hms/catalog.rs.html#69-130">Source</a><a
href="#impl-CatalogBuilder-for-HmsCatalogBuilder" class="anchor">§</a><h3
class="cod [...]
self,
name: impl <a class="trait"
href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"
title="trait core::convert::Into">Into</a><<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>>,
props: <a class="struct"
href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html"
title="struct std::collections::hash::map::HashMap">HashMap</a><<a
class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>, <a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>>,
-) -> impl <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output = <a
class="type" href="../iceberg/error/type.Result.html" title="type
iceberg::error::Result">Result</a><Self::<a class="associatedtype"
href="../iceberg/catalog/trait.CatalogBuilder.html#associatedtype.C"
title="type iceberg::catalog::CatalogBuilder::C">C</a>>> + <a
class="trait" href="https://doc.rust-lang. [...]
+) -> impl <a class="trait"
href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html"
title="trait core::future::future::Future">Future</a><Output =
Result<Self::C>> + <a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html"
title="trait core::marker::Send">Send</a></h4></section></summary><div
class='docblock'>Create a new catalog
instance.</div></details></div></details><details class="toggle
implementors-toggle" open><summ [...]
T: 'static + ?<a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"
title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div
class="impl-items"><details class="toggle method-toggle" open><summary><section
id="method.type_id" class="method trait-impl"><a class="src rightside"
href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#139">Source</a><a
href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href
[...]
T: <a class="trait"
href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait
core::any::Any">Any</a>,</div></h3></section></summary><div
class="impl-items"><section id="method.as_any" class="method trait-impl"><a
href="#method.as_any" class="anchor">§</a><h4 class="code-header">fn <a
class="fn">as_any</a>(&self) -> &(dyn <a class="trait"
href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait
core::any::Any">Any</a> + 'static)</h4 [...]
T: ?<a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"
title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div
class="impl-items"><details class="toggle method-toggle" open><summary><section
id="method.borrow" class="method trait-impl"><a class="src rightside"
href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">Source</a><a
href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a
href="https:/ [...]
diff --git a/api/src/iceberg/io/file_io.rs.html
b/api/src/iceberg/io/file_io.rs.html
index 1703ae0b9..7d74a6022 100644
--- a/api/src/iceberg/io/file_io.rs.html
+++ b/api/src/iceberg/io/file_io.rs.html
@@ -24,7 +24,7 @@
<a href=#24 id=24 data-nosnippet>24</a><span class="kw">use
</span>opendal::Operator;
<a href=#25 id=25 data-nosnippet>25</a><span class="kw">use </span>url::Url;
<a href=#26 id=26 data-nosnippet>26</a>
-<a href=#27 id=27 data-nosnippet>27</a><span class="kw">use </span><span
class="kw">super</span>::storage::Storage;
+<a href=#27 id=27 data-nosnippet>27</a><span class="kw">use </span><span
class="kw">super</span>::storage::OpenDalStorage;
<a href=#28 id=28 data-nosnippet>28</a><span class="kw">use
crate</span>::{Error, ErrorKind, <span class="prelude-ty">Result</span>};
<a href=#29 id=29 data-nosnippet>29</a>
<a href=#30 id=30 data-nosnippet>30</a><span class="doccomment">/// FileIO
implementation, used to manipulate files in underlying storage.
@@ -48,7 +48,7 @@
<a href=#48 id=48 data-nosnippet>48</a></span><span class="kw">pub struct
</span>FileIO {
<a href=#49 id=49 data-nosnippet>49</a> builder: FileIOBuilder,
<a href=#50 id=50 data-nosnippet>50</a>
-<a href=#51 id=51 data-nosnippet>51</a> inner: Arc<Storage>,
+<a href=#51 id=51 data-nosnippet>51</a> inner: Arc<OpenDalStorage>,
<a href=#52 id=52 data-nosnippet>52</a>}
<a href=#53 id=53 data-nosnippet>53</a>
<a href=#54 id=54 data-nosnippet>54</a><span class="kw">impl </span>FileIO {
@@ -262,7 +262,7 @@
<a href=#262 id=262 data-nosnippet>262</a>
<a href=#263 id=263 data-nosnippet>263</a> <span class="doccomment">///
Builds [`FileIO`].
<a href=#264 id=264 data-nosnippet>264</a> </span><span class="kw">pub fn
</span>build(<span class="self">self</span>) -> <span
class="prelude-ty">Result</span><FileIO> {
-<a href=#265 id=265 data-nosnippet>265</a> <span class="kw">let
</span>storage = Storage::build(<span class="self">self</span>.clone())<span
class="question-mark">?</span>;
+<a href=#265 id=265 data-nosnippet>265</a> <span class="kw">let
</span>storage = OpenDalStorage::build(<span
class="self">self</span>.clone())<span class="question-mark">?</span>;
<a href=#266 id=266 data-nosnippet>266</a> <span
class="prelude-val">Ok</span>(FileIO {
<a href=#267 id=267 data-nosnippet>267</a> builder: <span
class="self">self</span>,
<a href=#268 id=268 data-nosnippet>268</a> inner: Arc::new(storage),
diff --git a/api/src/iceberg/io/storage.rs.html
b/api/src/iceberg/io/storage.rs.html
index b48ae177d..591033b76 100644
--- a/api/src/iceberg/io/storage.rs.html
+++ b/api/src/iceberg/io/storage.rs.html
@@ -43,7 +43,7 @@
<a href=#43 id=43 data-nosnippet>43</a>
<a href=#44 id=44 data-nosnippet>44</a><span class="doccomment">/// The
storage carries all supported storage services in iceberg
<a href=#45 id=45 data-nosnippet>45</a></span><span
class="attr">#[derive(Debug)]
-<a href=#46 id=46 data-nosnippet>46</a></span><span
class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">enum
</span>Storage {
+<a href=#46 id=46 data-nosnippet>46</a></span><span
class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">enum
</span>OpenDalStorage {
<a href=#47 id=47 data-nosnippet>47</a> <span class="attr">#[cfg(feature =
<span class="string">"storage-memory"</span>)]
<a href=#48 id=48 data-nosnippet>48</a> </span>Memory(Operator),
<a href=#49 id=49 data-nosnippet>49</a> <span class="attr">#[cfg(feature =
<span class="string">"storage-fs"</span>)]
@@ -73,7 +73,7 @@
<a href=#73 id=73 data-nosnippet>73</a> },
<a href=#74 id=74 data-nosnippet>74</a>}
<a href=#75 id=75 data-nosnippet>75</a>
-<a href=#76 id=76 data-nosnippet>76</a><span class="kw">impl </span>Storage {
+<a href=#76 id=76 data-nosnippet>76</a><span class="kw">impl
</span>OpenDalStorage {
<a href=#77 id=77 data-nosnippet>77</a> <span class="doccomment">///
Convert iceberg config to opendal config.
<a href=#78 id=78 data-nosnippet>78</a> </span><span
class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn
</span>build(file_io_builder: FileIOBuilder) -> <span
class="kw">crate</span>::Result<<span class="self">Self</span>> {
<a href=#79 id=79 data-nosnippet>79</a> <span class="kw">let
</span>(scheme_str, props, extensions) = file_io_builder.into_parts();
@@ -137,7 +137,7 @@
<a href=#137 id=137 data-nosnippet>137</a> <span class="kw">let _
</span>= path;
<a href=#138 id=138 data-nosnippet>138</a> <span class="kw">let
</span>(operator, relative_path): (Operator, <span
class="kw-2">&</span>str) = <span class="kw">match </span><span
class="self">self </span>{
<a href=#139 id=139 data-nosnippet>139</a> <span
class="attr">#[cfg(feature = <span class="string">"storage-memory"</span>)]
-<a href=#140 id=140 data-nosnippet>140</a>
</span>Storage::Memory(op) => {
+<a href=#140 id=140 data-nosnippet>140</a>
</span>OpenDalStorage::Memory(op) => {
<a href=#141 id=141 data-nosnippet>141</a> <span class="kw">if
let </span><span class="prelude-val">Some</span>(stripped) =
path.strip_prefix(<span class="string">"memory:/"</span>) {
<a href=#142 id=142 data-nosnippet>142</a> <span
class="prelude-val">Ok</span>::<<span class="kw">_</span>, <span
class="kw">crate</span>::Error>((op.clone(), stripped))
<a href=#143 id=143 data-nosnippet>143</a> } <span
class="kw">else </span>{
@@ -145,7 +145,7 @@
<a href=#145 id=145 data-nosnippet>145</a> }
<a href=#146 id=146 data-nosnippet>146</a> }
<a href=#147 id=147 data-nosnippet>147</a> <span
class="attr">#[cfg(feature = <span class="string">"storage-fs"</span>)]
-<a href=#148 id=148 data-nosnippet>148</a> </span>Storage::LocalFs
=> {
+<a href=#148 id=148 data-nosnippet>148</a>
</span>OpenDalStorage::LocalFs => {
<a href=#149 id=149 data-nosnippet>149</a> <span class="kw">let
</span>op = <span class="kw">super</span>::fs_config_build()<span
class="question-mark">?</span>;
<a href=#150 id=150 data-nosnippet>150</a>
<a href=#151 id=151 data-nosnippet>151</a> <span class="kw">if
let </span><span class="prelude-val">Some</span>(stripped) =
path.strip_prefix(<span class="string">"file:/"</span>) {
@@ -155,7 +155,7 @@
<a href=#155 id=155 data-nosnippet>155</a> }
<a href=#156 id=156 data-nosnippet>156</a> }
<a href=#157 id=157 data-nosnippet>157</a> <span
class="attr">#[cfg(feature = <span class="string">"storage-s3"</span>)]
-<a href=#158 id=158 data-nosnippet>158</a> </span>Storage::S3 {
+<a href=#158 id=158 data-nosnippet>158</a>
</span>OpenDalStorage::S3 {
<a href=#159 id=159 data-nosnippet>159</a> configured_scheme,
<a href=#160 id=160 data-nosnippet>160</a> config,
<a href=#161 id=161 data-nosnippet>161</a>
customized_credential_load,
@@ -175,7 +175,7 @@
<a href=#175 id=175 data-nosnippet>175</a> }
<a href=#176 id=176 data-nosnippet>176</a> }
<a href=#177 id=177 data-nosnippet>177</a> <span
class="attr">#[cfg(feature = <span class="string">"storage-gcs"</span>)]
-<a href=#178 id=178 data-nosnippet>178</a> </span>Storage::Gcs {
config } => {
+<a href=#178 id=178 data-nosnippet>178</a>
</span>OpenDalStorage::Gcs { config } => {
<a href=#179 id=179 data-nosnippet>179</a> <span class="kw">let
</span>operator = <span class="kw">super</span>::gcs_config_build(config,
path)<span class="question-mark">?</span>;
<a href=#180 id=180 data-nosnippet>180</a> <span class="kw">let
</span>prefix = <span class="macro">format!</span>(<span
class="string">"gs://{}/"</span>, operator.info().name());
<a href=#181 id=181 data-nosnippet>181</a> <span class="kw">if
</span>path.starts_with(<span class="kw-2">&</span>prefix) {
@@ -188,7 +188,7 @@
<a href=#188 id=188 data-nosnippet>188</a> }
<a href=#189 id=189 data-nosnippet>189</a> }
<a href=#190 id=190 data-nosnippet>190</a> <span
class="attr">#[cfg(feature = <span class="string">"storage-oss"</span>)]
-<a href=#191 id=191 data-nosnippet>191</a> </span>Storage::Oss {
config } => {
+<a href=#191 id=191 data-nosnippet>191</a>
</span>OpenDalStorage::Oss { config } => {
<a href=#192 id=192 data-nosnippet>192</a> <span class="kw">let
</span>op = <span class="kw">super</span>::oss_config_build(config, path)<span
class="question-mark">?</span>;
<a href=#193 id=193 data-nosnippet>193</a>
<a href=#194 id=194 data-nosnippet>194</a> <span
class="comment">// Check prefix of oss path.
@@ -203,7 +203,7 @@
<a href=#203 id=203 data-nosnippet>203</a> }
<a href=#204 id=204 data-nosnippet>204</a> }
<a href=#205 id=205 data-nosnippet>205</a> <span
class="attr">#[cfg(feature = <span class="string">"storage-azdls"</span>)]
-<a href=#206 id=206 data-nosnippet>206</a> </span>Storage::Azdls {
+<a href=#206 id=206 data-nosnippet>206</a>
</span>OpenDalStorage::Azdls {
<a href=#207 id=207 data-nosnippet>207</a> configured_scheme,
<a href=#208 id=208 data-nosnippet>208</a> config,
<a href=#209 id=209 data-nosnippet>209</a> } => <span
class="kw">super</span>::azdls_create_operator(path, config, configured_scheme),
diff --git a/api/src/iceberg_datafusion/schema.rs.html
b/api/src/iceberg_datafusion/schema.rs.html
index 794963741..0fd76856f 100644
--- a/api/src/iceberg_datafusion/schema.rs.html
+++ b/api/src/iceberg_datafusion/schema.rs.html
@@ -29,7 +29,7 @@
<a href=#29 id=29 data-nosnippet>29</a><span class="kw">use
</span>futures::future::try_join_all;
<a href=#30 id=30 data-nosnippet>30</a><span class="kw">use
</span>iceberg::arrow::arrow_schema_to_schema_auto_assign_ids;
<a href=#31 id=31 data-nosnippet>31</a><span class="kw">use
</span>iceberg::inspect::MetadataTableType;
-<a href=#32 id=32 data-nosnippet>32</a><span class="kw">use
</span>iceberg::{Catalog, Error, ErrorKind, NamespaceIdent, <span
class="prelude-ty">Result</span>, TableCreation};
+<a href=#32 id=32 data-nosnippet>32</a><span class="kw">use
</span>iceberg::{Catalog, Error, ErrorKind, NamespaceIdent, <span
class="prelude-ty">Result</span>, TableCreation, TableIdent};
<a href=#33 id=33 data-nosnippet>33</a>
<a href=#34 id=34 data-nosnippet>34</a><span class="kw">use </span><span
class="kw">crate</span>::table::IcebergTableProvider;
<a href=#35 id=35 data-nosnippet>35</a><span class="kw">use </span><span
class="kw">crate</span>::to_datafusion_error;
@@ -211,161 +211,235 @@
<a href=#211 id=211 data-nosnippet>211</a>
DataFusionError::Execution(<span class="macro">format!</span>(<span
class="string">"Failed to create Iceberg table: {e}"</span>))
<a href=#212 id=212 data-nosnippet>212</a> })<span
class="question-mark">?
<a href=#213 id=213 data-nosnippet>213</a> </span>}
-<a href=#214 id=214 data-nosnippet>214</a>}
-<a href=#215 id=215 data-nosnippet>215</a>
-<a href=#216 id=216 data-nosnippet>216</a><span class="doccomment">///
Verifies that a table provider contains no data by scanning with LIMIT 1.
-<a href=#217 id=217 data-nosnippet>217</a>/// Returns an error if the table
has any rows.
-<a href=#218 id=218 data-nosnippet>218</a></span><span class="kw">async fn
</span>ensure_table_is_empty(table: <span class="kw-2">&</span>Arc<<span
class="kw">dyn </span>TableProvider>) -> <span
class="prelude-ty">Result</span><()> {
-<a href=#219 id=219 data-nosnippet>219</a> <span class="kw">let
</span>session_ctx = SessionContext::new();
-<a href=#220 id=220 data-nosnippet>220</a> <span class="kw">let
</span>exec_plan = table
-<a href=#221 id=221 data-nosnippet>221</a> .scan(<span
class="kw-2">&</span>session_ctx.state(), <span
class="prelude-val">None</span>, <span class="kw-2">&</span>[], <span
class="prelude-val">Some</span>(<span class="number">1</span>))
-<a href=#222 id=222 data-nosnippet>222</a> .<span class="kw">await
-<a href=#223 id=223 data-nosnippet>223</a> </span>.map_err(|e|
Error::new(ErrorKind::Unexpected, <span class="macro">format!</span>(<span
class="string">"Failed to scan table: {e}"</span>)))<span
class="question-mark">?</span>;
-<a href=#224 id=224 data-nosnippet>224</a>
-<a href=#225 id=225 data-nosnippet>225</a> <span class="kw">let
</span>task_ctx = Arc::new(TaskContext::default());
-<a href=#226 id=226 data-nosnippet>226</a> <span class="kw">let
</span>stream = exec_plan.execute(<span class="number">0</span>,
task_ctx).map_err(|e| {
-<a href=#227 id=227 data-nosnippet>227</a> Error::new(
-<a href=#228 id=228 data-nosnippet>228</a> ErrorKind::Unexpected,
-<a href=#229 id=229 data-nosnippet>229</a> <span
class="macro">format!</span>(<span class="string">"Failed to execute scan:
{e}"</span>),
-<a href=#230 id=230 data-nosnippet>230</a> )
-<a href=#231 id=231 data-nosnippet>231</a> })<span
class="question-mark">?</span>;
-<a href=#232 id=232 data-nosnippet>232</a>
-<a href=#233 id=233 data-nosnippet>233</a> <span class="kw">let
</span>batches: Vec<<span class="kw">_</span>> = stream.collect().<span
class="kw">await</span>;
-<a href=#234 id=234 data-nosnippet>234</a> <span class="kw">let
</span>has_data = batches
-<a href=#235 id=235 data-nosnippet>235</a> .into_iter()
-<a href=#236 id=236 data-nosnippet>236</a> .filter_map(|r| r.ok())
-<a href=#237 id=237 data-nosnippet>237</a> .any(|batch|
batch.num_rows() > <span class="number">0</span>);
-<a href=#238 id=238 data-nosnippet>238</a>
-<a href=#239 id=239 data-nosnippet>239</a> <span class="kw">if
</span>has_data {
-<a href=#240 id=240 data-nosnippet>240</a> <span class="kw">return
</span><span class="prelude-val">Err</span>(Error::new(
-<a href=#241 id=241 data-nosnippet>241</a> ErrorKind::Unexpected,
-<a href=#242 id=242 data-nosnippet>242</a> <span
class="string">"register_table does not support tables with data."</span>,
-<a href=#243 id=243 data-nosnippet>243</a> ));
-<a href=#244 id=244 data-nosnippet>244</a> }
-<a href=#245 id=245 data-nosnippet>245</a>
-<a href=#246 id=246 data-nosnippet>246</a> <span
class="prelude-val">Ok</span>(())
-<a href=#247 id=247 data-nosnippet>247</a>}
-<a href=#248 id=248 data-nosnippet>248</a>
-<a href=#249 id=249 data-nosnippet>249</a><span class="attr">#[cfg(test)]
-<a href=#250 id=250 data-nosnippet>250</a></span><span class="kw">mod
</span>tests {
-<a href=#251 id=251 data-nosnippet>251</a> <span class="kw">use
</span>std::collections::HashMap;
-<a href=#252 id=252 data-nosnippet>252</a> <span class="kw">use
</span>std::sync::Arc;
-<a href=#253 id=253 data-nosnippet>253</a>
-<a href=#254 id=254 data-nosnippet>254</a> <span class="kw">use
</span>datafusion::arrow::array::{Int32Array, StringArray};
-<a href=#255 id=255 data-nosnippet>255</a> <span class="kw">use
</span>datafusion::arrow::datatypes::{DataType, Field, Schema <span
class="kw">as </span>ArrowSchema};
-<a href=#256 id=256 data-nosnippet>256</a> <span class="kw">use
</span>datafusion::arrow::record_batch::RecordBatch;
-<a href=#257 id=257 data-nosnippet>257</a> <span class="kw">use
</span>datafusion::datasource::MemTable;
-<a href=#258 id=258 data-nosnippet>258</a> <span class="kw">use
</span>iceberg::memory::{MEMORY_CATALOG_WAREHOUSE, MemoryCatalogBuilder};
-<a href=#259 id=259 data-nosnippet>259</a> <span class="kw">use
</span>iceberg::{Catalog, CatalogBuilder, NamespaceIdent};
-<a href=#260 id=260 data-nosnippet>260</a> <span class="kw">use
</span>tempfile::TempDir;
-<a href=#261 id=261 data-nosnippet>261</a>
-<a href=#262 id=262 data-nosnippet>262</a> <span class="kw">use
super</span>::<span class="kw-2">*</span>;
-<a href=#263 id=263 data-nosnippet>263</a>
-<a href=#264 id=264 data-nosnippet>264</a> <span class="kw">async fn
</span>create_test_schema_provider() -> (IcebergSchemaProvider, TempDir) {
-<a href=#265 id=265 data-nosnippet>265</a> <span class="kw">let
</span>temp_dir = TempDir::new().unwrap();
-<a href=#266 id=266 data-nosnippet>266</a> <span class="kw">let
</span>warehouse_path = temp_dir.path().to_str().unwrap().to_string();
-<a href=#267 id=267 data-nosnippet>267</a>
-<a href=#268 id=268 data-nosnippet>268</a> <span class="kw">let
</span>catalog = MemoryCatalogBuilder::default()
-<a href=#269 id=269 data-nosnippet>269</a> .load(
-<a href=#270 id=270 data-nosnippet>270</a> <span
class="string">"memory"</span>,
-<a href=#271 id=271 data-nosnippet>271</a>
HashMap::from([(MEMORY_CATALOG_WAREHOUSE.to_string(), warehouse_path.clone())]),
-<a href=#272 id=272 data-nosnippet>272</a> )
-<a href=#273 id=273 data-nosnippet>273</a> .<span class="kw">await
-<a href=#274 id=274 data-nosnippet>274</a> </span>.unwrap();
-<a href=#275 id=275 data-nosnippet>275</a>
-<a href=#276 id=276 data-nosnippet>276</a> <span class="kw">let
</span>namespace = NamespaceIdent::new(<span
class="string">"test_ns"</span>.to_string());
-<a href=#277 id=277 data-nosnippet>277</a> catalog
-<a href=#278 id=278 data-nosnippet>278</a> .create_namespace(<span
class="kw-2">&</span>namespace, HashMap::new())
-<a href=#279 id=279 data-nosnippet>279</a> .<span class="kw">await
-<a href=#280 id=280 data-nosnippet>280</a> </span>.unwrap();
+<a href=#214 id=214 data-nosnippet>214</a>
+<a href=#215 id=215 data-nosnippet>215</a> <span class="kw">fn
</span>deregister_table(<span class="kw-2">&</span><span
class="self">self</span>, name: <span class="kw-2">&</span>str) ->
DFResult<<span class="prelude-ty">Option</span><Arc<<span
class="kw">dyn </span>TableProvider>>> {
+<a href=#216 id=216 data-nosnippet>216</a> <span class="comment">//
Check if table exists
+<a href=#217 id=217 data-nosnippet>217</a> </span><span class="kw">if
</span>!<span class="self">self</span>.table_exist(name) {
+<a href=#218 id=218 data-nosnippet>218</a> <span class="kw">return
</span><span class="prelude-val">Ok</span>(<span
class="prelude-val">None</span>);
+<a href=#219 id=219 data-nosnippet>219</a> }
+<a href=#220 id=220 data-nosnippet>220</a>
+<a href=#221 id=221 data-nosnippet>221</a> <span class="kw">let
</span>catalog = <span class="self">self</span>.catalog.clone();
+<a href=#222 id=222 data-nosnippet>222</a> <span class="kw">let
</span>namespace = <span class="self">self</span>.namespace.clone();
+<a href=#223 id=223 data-nosnippet>223</a> <span class="kw">let
</span>tables = <span class="self">self</span>.tables.clone();
+<a href=#224 id=224 data-nosnippet>224</a> <span class="kw">let
</span>table_name = name.to_string();
+<a href=#225 id=225 data-nosnippet>225</a>
+<a href=#226 id=226 data-nosnippet>226</a> <span class="comment">// Use
tokio's spawn_blocking to handle the async work on a blocking thread pool
+<a href=#227 id=227 data-nosnippet>227</a> </span><span class="kw">let
</span>result = tokio::task::spawn_blocking(<span class="kw">move </span>|| {
+<a href=#228 id=228 data-nosnippet>228</a> <span class="kw">let
</span>rt = tokio::runtime::Handle::current();
+<a href=#229 id=229 data-nosnippet>229</a> rt.block_on(<span
class="kw">async move </span>{
+<a href=#230 id=230 data-nosnippet>230</a> <span class="kw">let
</span>table_ident = TableIdent::new(namespace, table_name.clone());
+<a href=#231 id=231 data-nosnippet>231</a>
+<a href=#232 id=232 data-nosnippet>232</a> <span
class="comment">// Drop the table from the Iceberg catalog
+<a href=#233 id=233 data-nosnippet>233</a> </span>catalog
+<a href=#234 id=234 data-nosnippet>234</a>
.drop_table(<span class="kw-2">&</span>table_ident)
+<a href=#235 id=235 data-nosnippet>235</a> .<span
class="kw">await
+<a href=#236 id=236 data-nosnippet>236</a>
</span>.map_err(to_datafusion_error)<span class="question-mark">?</span>;
+<a href=#237 id=237 data-nosnippet>237</a>
+<a href=#238 id=238 data-nosnippet>238</a> <span
class="comment">// Remove from local cache and return the removed provider
+<a href=#239 id=239 data-nosnippet>239</a> </span><span
class="kw">let </span>removed = tables
+<a href=#240 id=240 data-nosnippet>240</a> .remove(<span
class="kw-2">&</span>table_name)
+<a href=#241 id=241 data-nosnippet>241</a> .map(|(<span
class="kw">_</span>, table)| table <span class="kw">as </span>Arc<<span
class="kw">dyn </span>TableProvider>);
+<a href=#242 id=242 data-nosnippet>242</a>
+<a href=#243 id=243 data-nosnippet>243</a> <span
class="prelude-val">Ok</span>(removed)
+<a href=#244 id=244 data-nosnippet>244</a> })
+<a href=#245 id=245 data-nosnippet>245</a> });
+<a href=#246 id=246 data-nosnippet>246</a>
+<a href=#247 id=247 data-nosnippet>247</a>
futures::executor::block_on(result)
+<a href=#248 id=248 data-nosnippet>248</a> .map_err(|e|
DataFusionError::Execution(<span class="macro">format!</span>(<span
class="string">"Failed to drop Iceberg table: {e}"</span>)))<span
class="question-mark">?
+<a href=#249 id=249 data-nosnippet>249</a> </span>}
+<a href=#250 id=250 data-nosnippet>250</a>}
+<a href=#251 id=251 data-nosnippet>251</a>
+<a href=#252 id=252 data-nosnippet>252</a><span class="doccomment">///
Verifies that a table provider contains no data by scanning with LIMIT 1.
+<a href=#253 id=253 data-nosnippet>253</a>/// Returns an error if the table
has any rows.
+<a href=#254 id=254 data-nosnippet>254</a></span><span class="kw">async fn
</span>ensure_table_is_empty(table: <span class="kw-2">&</span>Arc<<span
class="kw">dyn </span>TableProvider>) -> <span
class="prelude-ty">Result</span><()> {
+<a href=#255 id=255 data-nosnippet>255</a> <span class="kw">let
</span>session_ctx = SessionContext::new();
+<a href=#256 id=256 data-nosnippet>256</a> <span class="kw">let
</span>exec_plan = table
+<a href=#257 id=257 data-nosnippet>257</a> .scan(<span
class="kw-2">&</span>session_ctx.state(), <span
class="prelude-val">None</span>, <span class="kw-2">&</span>[], <span
class="prelude-val">Some</span>(<span class="number">1</span>))
+<a href=#258 id=258 data-nosnippet>258</a> .<span class="kw">await
+<a href=#259 id=259 data-nosnippet>259</a> </span>.map_err(|e|
Error::new(ErrorKind::Unexpected, <span class="macro">format!</span>(<span
class="string">"Failed to scan table: {e}"</span>)))<span
class="question-mark">?</span>;
+<a href=#260 id=260 data-nosnippet>260</a>
+<a href=#261 id=261 data-nosnippet>261</a> <span class="kw">let
</span>task_ctx = Arc::new(TaskContext::default());
+<a href=#262 id=262 data-nosnippet>262</a> <span class="kw">let
</span>stream = exec_plan.execute(<span class="number">0</span>,
task_ctx).map_err(|e| {
+<a href=#263 id=263 data-nosnippet>263</a> Error::new(
+<a href=#264 id=264 data-nosnippet>264</a> ErrorKind::Unexpected,
+<a href=#265 id=265 data-nosnippet>265</a> <span
class="macro">format!</span>(<span class="string">"Failed to execute scan:
{e}"</span>),
+<a href=#266 id=266 data-nosnippet>266</a> )
+<a href=#267 id=267 data-nosnippet>267</a> })<span
class="question-mark">?</span>;
+<a href=#268 id=268 data-nosnippet>268</a>
+<a href=#269 id=269 data-nosnippet>269</a> <span class="kw">let
</span>batches: Vec<<span class="kw">_</span>> = stream.collect().<span
class="kw">await</span>;
+<a href=#270 id=270 data-nosnippet>270</a> <span class="kw">let
</span>has_data = batches
+<a href=#271 id=271 data-nosnippet>271</a> .into_iter()
+<a href=#272 id=272 data-nosnippet>272</a> .filter_map(|r| r.ok())
+<a href=#273 id=273 data-nosnippet>273</a> .any(|batch|
batch.num_rows() > <span class="number">0</span>);
+<a href=#274 id=274 data-nosnippet>274</a>
+<a href=#275 id=275 data-nosnippet>275</a> <span class="kw">if
</span>has_data {
+<a href=#276 id=276 data-nosnippet>276</a> <span class="kw">return
</span><span class="prelude-val">Err</span>(Error::new(
+<a href=#277 id=277 data-nosnippet>277</a> ErrorKind::Unexpected,
+<a href=#278 id=278 data-nosnippet>278</a> <span
class="string">"register_table does not support tables with data."</span>,
+<a href=#279 id=279 data-nosnippet>279</a> ));
+<a href=#280 id=280 data-nosnippet>280</a> }
<a href=#281 id=281 data-nosnippet>281</a>
-<a href=#282 id=282 data-nosnippet>282</a> <span class="kw">let
</span>provider = IcebergSchemaProvider::try_new(Arc::new(catalog), namespace)
-<a href=#283 id=283 data-nosnippet>283</a> .<span class="kw">await
-<a href=#284 id=284 data-nosnippet>284</a> </span>.unwrap();
-<a href=#285 id=285 data-nosnippet>285</a>
-<a href=#286 id=286 data-nosnippet>286</a> (provider, temp_dir)
-<a href=#287 id=287 data-nosnippet>287</a> }
-<a href=#288 id=288 data-nosnippet>288</a>
-<a href=#289 id=289 data-nosnippet>289</a> <span class="attr">#[tokio::test]
-<a href=#290 id=290 data-nosnippet>290</a> </span><span class="kw">async fn
</span>test_register_table_with_data_fails() {
-<a href=#291 id=291 data-nosnippet>291</a> <span class="kw">let
</span>(schema_provider, _temp_dir) = create_test_schema_provider().<span
class="kw">await</span>;
-<a href=#292 id=292 data-nosnippet>292</a>
-<a href=#293 id=293 data-nosnippet>293</a> <span class="comment">//
Create a MemTable with data
-<a href=#294 id=294 data-nosnippet>294</a> </span><span class="kw">let
</span>arrow_schema = Arc::new(ArrowSchema::new(<span class="macro">vec!</span>[
-<a href=#295 id=295 data-nosnippet>295</a> Field::new(<span
class="string">"id"</span>, DataType::Int32, <span
class="bool-val">false</span>),
-<a href=#296 id=296 data-nosnippet>296</a> Field::new(<span
class="string">"name"</span>, DataType::Utf8, <span
class="bool-val">true</span>),
-<a href=#297 id=297 data-nosnippet>297</a> ]));
-<a href=#298 id=298 data-nosnippet>298</a>
-<a href=#299 id=299 data-nosnippet>299</a> <span class="kw">let
</span>batch = RecordBatch::try_new(arrow_schema.clone(), <span
class="macro">vec!</span>[
-<a href=#300 id=300 data-nosnippet>300</a>
Arc::new(Int32Array::from(<span class="macro">vec!</span>[<span
class="number">1</span>, <span class="number">2</span>, <span
class="number">3</span>])),
-<a href=#301 id=301 data-nosnippet>301</a>
Arc::new(StringArray::from(<span class="macro">vec!</span>[<span
class="string">"Alice"</span>, <span class="string">"Bob"</span>, <span
class="string">"Charlie"</span>])),
-<a href=#302 id=302 data-nosnippet>302</a> ])
-<a href=#303 id=303 data-nosnippet>303</a> .unwrap();
-<a href=#304 id=304 data-nosnippet>304</a>
-<a href=#305 id=305 data-nosnippet>305</a> <span class="kw">let
</span>mem_table = MemTable::try_new(arrow_schema, <span
class="macro">vec!</span>[<span class="macro">vec!</span>[batch]]).unwrap();
-<a href=#306 id=306 data-nosnippet>306</a>
-<a href=#307 id=307 data-nosnippet>307</a> <span class="comment">//
Attempt to register the table with data - should fail
-<a href=#308 id=308 data-nosnippet>308</a> </span><span class="kw">let
</span>result = schema_provider.register_table(<span
class="string">"test_table"</span>.to_string(), Arc::new(mem_table));
-<a href=#309 id=309 data-nosnippet>309</a>
-<a href=#310 id=310 data-nosnippet>310</a> <span
class="macro">assert!</span>(result.is_err());
-<a href=#311 id=311 data-nosnippet>311</a> <span class="kw">let
</span>err = result.unwrap_err();
-<a href=#312 id=312 data-nosnippet>312</a> <span
class="macro">assert!</span>(
-<a href=#313 id=313 data-nosnippet>313</a> err.to_string()
-<a href=#314 id=314 data-nosnippet>314</a> .contains(<span
class="string">"register_table does not support tables with data."</span>),
-<a href=#315 id=315 data-nosnippet>315</a> <span
class="string">"Expected error about tables with data, got: {err}"</span>,
-<a href=#316 id=316 data-nosnippet>316</a> );
-<a href=#317 id=317 data-nosnippet>317</a> }
-<a href=#318 id=318 data-nosnippet>318</a>
-<a href=#319 id=319 data-nosnippet>319</a> <span class="attr">#[tokio::test]
-<a href=#320 id=320 data-nosnippet>320</a> </span><span class="kw">async fn
</span>test_register_empty_table_succeeds() {
-<a href=#321 id=321 data-nosnippet>321</a> <span class="kw">let
</span>(schema_provider, _temp_dir) = create_test_schema_provider().<span
class="kw">await</span>;
-<a href=#322 id=322 data-nosnippet>322</a>
-<a href=#323 id=323 data-nosnippet>323</a> <span class="comment">//
Create an empty MemTable (schema only, no data rows)
-<a href=#324 id=324 data-nosnippet>324</a> </span><span class="kw">let
</span>arrow_schema = Arc::new(ArrowSchema::new(<span class="macro">vec!</span>[
-<a href=#325 id=325 data-nosnippet>325</a> Field::new(<span
class="string">"id"</span>, DataType::Int32, <span
class="bool-val">false</span>),
-<a href=#326 id=326 data-nosnippet>326</a> Field::new(<span
class="string">"name"</span>, DataType::Utf8, <span
class="bool-val">true</span>),
-<a href=#327 id=327 data-nosnippet>327</a> ]));
+<a href=#282 id=282 data-nosnippet>282</a> <span
class="prelude-val">Ok</span>(())
+<a href=#283 id=283 data-nosnippet>283</a>}
+<a href=#284 id=284 data-nosnippet>284</a>
+<a href=#285 id=285 data-nosnippet>285</a><span class="attr">#[cfg(test)]
+<a href=#286 id=286 data-nosnippet>286</a></span><span class="kw">mod
</span>tests {
+<a href=#287 id=287 data-nosnippet>287</a> <span class="kw">use
</span>std::collections::HashMap;
+<a href=#288 id=288 data-nosnippet>288</a> <span class="kw">use
</span>std::sync::Arc;
+<a href=#289 id=289 data-nosnippet>289</a>
+<a href=#290 id=290 data-nosnippet>290</a> <span class="kw">use
</span>datafusion::arrow::array::{Int32Array, StringArray};
+<a href=#291 id=291 data-nosnippet>291</a> <span class="kw">use
</span>datafusion::arrow::datatypes::{DataType, Field, Schema <span
class="kw">as </span>ArrowSchema};
+<a href=#292 id=292 data-nosnippet>292</a> <span class="kw">use
</span>datafusion::arrow::record_batch::RecordBatch;
+<a href=#293 id=293 data-nosnippet>293</a> <span class="kw">use
</span>datafusion::datasource::MemTable;
+<a href=#294 id=294 data-nosnippet>294</a> <span class="kw">use
</span>iceberg::memory::{MEMORY_CATALOG_WAREHOUSE, MemoryCatalogBuilder};
+<a href=#295 id=295 data-nosnippet>295</a> <span class="kw">use
</span>iceberg::{Catalog, CatalogBuilder, NamespaceIdent};
+<a href=#296 id=296 data-nosnippet>296</a> <span class="kw">use
</span>tempfile::TempDir;
+<a href=#297 id=297 data-nosnippet>297</a>
+<a href=#298 id=298 data-nosnippet>298</a> <span class="kw">use
super</span>::<span class="kw-2">*</span>;
+<a href=#299 id=299 data-nosnippet>299</a>
+<a href=#300 id=300 data-nosnippet>300</a> <span class="kw">async fn
</span>create_test_schema_provider() -> (IcebergSchemaProvider, TempDir) {
+<a href=#301 id=301 data-nosnippet>301</a> <span class="kw">let
</span>temp_dir = TempDir::new().unwrap();
+<a href=#302 id=302 data-nosnippet>302</a> <span class="kw">let
</span>warehouse_path = temp_dir.path().to_str().unwrap().to_string();
+<a href=#303 id=303 data-nosnippet>303</a>
+<a href=#304 id=304 data-nosnippet>304</a> <span class="kw">let
</span>catalog = MemoryCatalogBuilder::default()
+<a href=#305 id=305 data-nosnippet>305</a> .load(
+<a href=#306 id=306 data-nosnippet>306</a> <span
class="string">"memory"</span>,
+<a href=#307 id=307 data-nosnippet>307</a>
HashMap::from([(MEMORY_CATALOG_WAREHOUSE.to_string(), warehouse_path.clone())]),
+<a href=#308 id=308 data-nosnippet>308</a> )
+<a href=#309 id=309 data-nosnippet>309</a> .<span class="kw">await
+<a href=#310 id=310 data-nosnippet>310</a> </span>.unwrap();
+<a href=#311 id=311 data-nosnippet>311</a>
+<a href=#312 id=312 data-nosnippet>312</a> <span class="kw">let
</span>namespace = NamespaceIdent::new(<span
class="string">"test_ns"</span>.to_string());
+<a href=#313 id=313 data-nosnippet>313</a> catalog
+<a href=#314 id=314 data-nosnippet>314</a> .create_namespace(<span
class="kw-2">&</span>namespace, HashMap::new())
+<a href=#315 id=315 data-nosnippet>315</a> .<span class="kw">await
+<a href=#316 id=316 data-nosnippet>316</a> </span>.unwrap();
+<a href=#317 id=317 data-nosnippet>317</a>
+<a href=#318 id=318 data-nosnippet>318</a> <span class="kw">let
</span>provider = IcebergSchemaProvider::try_new(Arc::new(catalog), namespace)
+<a href=#319 id=319 data-nosnippet>319</a> .<span class="kw">await
+<a href=#320 id=320 data-nosnippet>320</a> </span>.unwrap();
+<a href=#321 id=321 data-nosnippet>321</a>
+<a href=#322 id=322 data-nosnippet>322</a> (provider, temp_dir)
+<a href=#323 id=323 data-nosnippet>323</a> }
+<a href=#324 id=324 data-nosnippet>324</a>
+<a href=#325 id=325 data-nosnippet>325</a> <span class="attr">#[tokio::test]
+<a href=#326 id=326 data-nosnippet>326</a> </span><span class="kw">async fn
</span>test_register_table_with_data_fails() {
+<a href=#327 id=327 data-nosnippet>327</a> <span class="kw">let
</span>(schema_provider, _temp_dir) = create_test_schema_provider().<span
class="kw">await</span>;
<a href=#328 id=328 data-nosnippet>328</a>
-<a href=#329 id=329 data-nosnippet>329</a> <span class="comment">//
Create an empty batch (0 rows) - MemTable requires at least one partition
-<a href=#330 id=330 data-nosnippet>330</a> </span><span class="kw">let
</span>empty_batch = RecordBatch::new_empty(arrow_schema.clone());
-<a href=#331 id=331 data-nosnippet>331</a> <span class="kw">let
</span>mem_table = MemTable::try_new(arrow_schema, <span
class="macro">vec!</span>[<span
class="macro">vec!</span>[empty_batch]]).unwrap();
-<a href=#332 id=332 data-nosnippet>332</a>
-<a href=#333 id=333 data-nosnippet>333</a> <span class="comment">//
Attempt to register the empty table - should succeed
-<a href=#334 id=334 data-nosnippet>334</a> </span><span class="kw">let
</span>result = schema_provider.register_table(<span
class="string">"empty_table"</span>.to_string(), Arc::new(mem_table));
-<a href=#335 id=335 data-nosnippet>335</a>
-<a href=#336 id=336 data-nosnippet>336</a> <span
class="macro">assert!</span>(result.is_ok(), <span class="string">"Expected
success, got: {result:?}"</span>);
-<a href=#337 id=337 data-nosnippet>337</a>
-<a href=#338 id=338 data-nosnippet>338</a> <span class="comment">//
Verify the table was registered
-<a href=#339 id=339 data-nosnippet>339</a> </span><span
class="macro">assert!</span>(schema_provider.table_exist(<span
class="string">"empty_table"</span>));
-<a href=#340 id=340 data-nosnippet>340</a> }
-<a href=#341 id=341 data-nosnippet>341</a>
-<a href=#342 id=342 data-nosnippet>342</a> <span class="attr">#[tokio::test]
-<a href=#343 id=343 data-nosnippet>343</a> </span><span class="kw">async fn
</span>test_register_duplicate_table_fails() {
-<a href=#344 id=344 data-nosnippet>344</a> <span class="kw">let
</span>(schema_provider, _temp_dir) = create_test_schema_provider().<span
class="kw">await</span>;
+<a href=#329 id=329 data-nosnippet>329</a> <span class="comment">//
Create a MemTable with data
+<a href=#330 id=330 data-nosnippet>330</a> </span><span class="kw">let
</span>arrow_schema = Arc::new(ArrowSchema::new(<span class="macro">vec!</span>[
+<a href=#331 id=331 data-nosnippet>331</a> Field::new(<span
class="string">"id"</span>, DataType::Int32, <span
class="bool-val">false</span>),
+<a href=#332 id=332 data-nosnippet>332</a> Field::new(<span
class="string">"name"</span>, DataType::Utf8, <span
class="bool-val">true</span>),
+<a href=#333 id=333 data-nosnippet>333</a> ]));
+<a href=#334 id=334 data-nosnippet>334</a>
+<a href=#335 id=335 data-nosnippet>335</a> <span class="kw">let
</span>batch = RecordBatch::try_new(arrow_schema.clone(), <span
class="macro">vec!</span>[
+<a href=#336 id=336 data-nosnippet>336</a>
Arc::new(Int32Array::from(<span class="macro">vec!</span>[<span
class="number">1</span>, <span class="number">2</span>, <span
class="number">3</span>])),
+<a href=#337 id=337 data-nosnippet>337</a>
Arc::new(StringArray::from(<span class="macro">vec!</span>[<span
class="string">"Alice"</span>, <span class="string">"Bob"</span>, <span
class="string">"Charlie"</span>])),
+<a href=#338 id=338 data-nosnippet>338</a> ])
+<a href=#339 id=339 data-nosnippet>339</a> .unwrap();
+<a href=#340 id=340 data-nosnippet>340</a>
+<a href=#341 id=341 data-nosnippet>341</a> <span class="kw">let
</span>mem_table = MemTable::try_new(arrow_schema, <span
class="macro">vec!</span>[<span class="macro">vec!</span>[batch]]).unwrap();
+<a href=#342 id=342 data-nosnippet>342</a>
+<a href=#343 id=343 data-nosnippet>343</a> <span class="comment">//
Attempt to register the table with data - should fail
+<a href=#344 id=344 data-nosnippet>344</a> </span><span class="kw">let
</span>result = schema_provider.register_table(<span
class="string">"test_table"</span>.to_string(), Arc::new(mem_table));
<a href=#345 id=345 data-nosnippet>345</a>
-<a href=#346 id=346 data-nosnippet>346</a> <span class="comment">//
Create empty MemTables
-<a href=#347 id=347 data-nosnippet>347</a> </span><span class="kw">let
</span>arrow_schema = Arc::new(ArrowSchema::new(<span
class="macro">vec!</span>[Field::new(
-<a href=#348 id=348 data-nosnippet>348</a> <span
class="string">"id"</span>,
-<a href=#349 id=349 data-nosnippet>349</a> DataType::Int32,
-<a href=#350 id=350 data-nosnippet>350</a> <span
class="bool-val">false</span>,
-<a href=#351 id=351 data-nosnippet>351</a> )]));
-<a href=#352 id=352 data-nosnippet>352</a>
-<a href=#353 id=353 data-nosnippet>353</a> <span class="kw">let
</span>empty_batch1 = RecordBatch::new_empty(arrow_schema.clone());
-<a href=#354 id=354 data-nosnippet>354</a> <span class="kw">let
</span>empty_batch2 = RecordBatch::new_empty(arrow_schema.clone());
-<a href=#355 id=355 data-nosnippet>355</a> <span class="kw">let
</span>mem_table1 = MemTable::try_new(arrow_schema.clone(), <span
class="macro">vec!</span>[<span
class="macro">vec!</span>[empty_batch1]]).unwrap();
-<a href=#356 id=356 data-nosnippet>356</a> <span class="kw">let
</span>mem_table2 = MemTable::try_new(arrow_schema, <span
class="macro">vec!</span>[<span
class="macro">vec!</span>[empty_batch2]]).unwrap();
-<a href=#357 id=357 data-nosnippet>357</a>
-<a href=#358 id=358 data-nosnippet>358</a> <span class="comment">//
Register first table - should succeed
-<a href=#359 id=359 data-nosnippet>359</a> </span><span class="kw">let
</span>result1 = schema_provider.register_table(<span
class="string">"dup_table"</span>.to_string(), Arc::new(mem_table1));
-<a href=#360 id=360 data-nosnippet>360</a> <span
class="macro">assert!</span>(result1.is_ok());
-<a href=#361 id=361 data-nosnippet>361</a>
-<a href=#362 id=362 data-nosnippet>362</a> <span class="comment">//
Register second table with same name - should fail
-<a href=#363 id=363 data-nosnippet>363</a> </span><span class="kw">let
</span>result2 = schema_provider.register_table(<span
class="string">"dup_table"</span>.to_string(), Arc::new(mem_table2));
-<a href=#364 id=364 data-nosnippet>364</a> <span
class="macro">assert!</span>(result2.is_err());
-<a href=#365 id=365 data-nosnippet>365</a> <span class="kw">let
</span>err = result2.unwrap_err();
-<a href=#366 id=366 data-nosnippet>366</a> <span
class="macro">assert!</span>(
-<a href=#367 id=367 data-nosnippet>367</a>
err.to_string().contains(<span class="string">"already exists"</span>),
-<a href=#368 id=368 data-nosnippet>368</a> <span
class="string">"Expected error about table already existing, got: {err}"</span>,
-<a href=#369 id=369 data-nosnippet>369</a> );
-<a href=#370 id=370 data-nosnippet>370</a> }
-<a href=#371 id=371
data-nosnippet>371</a>}</code></pre></div></section></main></body></html>
\ No newline at end of file
+<a href=#346 id=346 data-nosnippet>346</a> <span
class="macro">assert!</span>(result.is_err());
+<a href=#347 id=347 data-nosnippet>347</a> <span class="kw">let
</span>err = result.unwrap_err();
+<a href=#348 id=348 data-nosnippet>348</a> <span
class="macro">assert!</span>(
+<a href=#349 id=349 data-nosnippet>349</a> err.to_string()
+<a href=#350 id=350 data-nosnippet>350</a> .contains(<span
class="string">"register_table does not support tables with data."</span>),
+<a href=#351 id=351 data-nosnippet>351</a> <span
class="string">"Expected error about tables with data, got: {err}"</span>,
+<a href=#352 id=352 data-nosnippet>352</a> );
+<a href=#353 id=353 data-nosnippet>353</a> }
+<a href=#354 id=354 data-nosnippet>354</a>
+<a href=#355 id=355 data-nosnippet>355</a> <span class="attr">#[tokio::test]
+<a href=#356 id=356 data-nosnippet>356</a> </span><span class="kw">async fn
</span>test_register_empty_table_succeeds() {
+<a href=#357 id=357 data-nosnippet>357</a> <span class="kw">let
</span>(schema_provider, _temp_dir) = create_test_schema_provider().<span
class="kw">await</span>;
+<a href=#358 id=358 data-nosnippet>358</a>
+<a href=#359 id=359 data-nosnippet>359</a> <span class="comment">//
Create an empty MemTable (schema only, no data rows)
+<a href=#360 id=360 data-nosnippet>360</a> </span><span class="kw">let
</span>arrow_schema = Arc::new(ArrowSchema::new(<span class="macro">vec!</span>[
+<a href=#361 id=361 data-nosnippet>361</a> Field::new(<span
class="string">"id"</span>, DataType::Int32, <span
class="bool-val">false</span>),
+<a href=#362 id=362 data-nosnippet>362</a> Field::new(<span
class="string">"name"</span>, DataType::Utf8, <span
class="bool-val">true</span>),
+<a href=#363 id=363 data-nosnippet>363</a> ]));
+<a href=#364 id=364 data-nosnippet>364</a>
+<a href=#365 id=365 data-nosnippet>365</a> <span class="comment">//
Create an empty batch (0 rows) - MemTable requires at least one partition
+<a href=#366 id=366 data-nosnippet>366</a> </span><span class="kw">let
</span>empty_batch = RecordBatch::new_empty(arrow_schema.clone());
+<a href=#367 id=367 data-nosnippet>367</a> <span class="kw">let
</span>mem_table = MemTable::try_new(arrow_schema, <span
class="macro">vec!</span>[<span
class="macro">vec!</span>[empty_batch]]).unwrap();
+<a href=#368 id=368 data-nosnippet>368</a>
+<a href=#369 id=369 data-nosnippet>369</a> <span class="comment">//
Attempt to register the empty table - should succeed
+<a href=#370 id=370 data-nosnippet>370</a> </span><span class="kw">let
</span>result = schema_provider.register_table(<span
class="string">"empty_table"</span>.to_string(), Arc::new(mem_table));
+<a href=#371 id=371 data-nosnippet>371</a>
+<a href=#372 id=372 data-nosnippet>372</a> <span
class="macro">assert!</span>(result.is_ok(), <span class="string">"Expected
success, got: {result:?}"</span>);
+<a href=#373 id=373 data-nosnippet>373</a>
+<a href=#374 id=374 data-nosnippet>374</a> <span class="comment">//
Verify the table was registered
+<a href=#375 id=375 data-nosnippet>375</a> </span><span
class="macro">assert!</span>(schema_provider.table_exist(<span
class="string">"empty_table"</span>));
+<a href=#376 id=376 data-nosnippet>376</a> }
+<a href=#377 id=377 data-nosnippet>377</a>
+<a href=#378 id=378 data-nosnippet>378</a> <span class="attr">#[tokio::test]
+<a href=#379 id=379 data-nosnippet>379</a> </span><span class="kw">async fn
</span>test_register_duplicate_table_fails() {
+<a href=#380 id=380 data-nosnippet>380</a> <span class="kw">let
</span>(schema_provider, _temp_dir) = create_test_schema_provider().<span
class="kw">await</span>;
+<a href=#381 id=381 data-nosnippet>381</a>
+<a href=#382 id=382 data-nosnippet>382</a> <span class="comment">//
Create empty MemTables
+<a href=#383 id=383 data-nosnippet>383</a> </span><span class="kw">let
</span>arrow_schema = Arc::new(ArrowSchema::new(<span
class="macro">vec!</span>[Field::new(
+<a href=#384 id=384 data-nosnippet>384</a> <span
class="string">"id"</span>,
+<a href=#385 id=385 data-nosnippet>385</a> DataType::Int32,
+<a href=#386 id=386 data-nosnippet>386</a> <span
class="bool-val">false</span>,
+<a href=#387 id=387 data-nosnippet>387</a> )]));
+<a href=#388 id=388 data-nosnippet>388</a>
+<a href=#389 id=389 data-nosnippet>389</a> <span class="kw">let
</span>empty_batch1 = RecordBatch::new_empty(arrow_schema.clone());
+<a href=#390 id=390 data-nosnippet>390</a> <span class="kw">let
</span>empty_batch2 = RecordBatch::new_empty(arrow_schema.clone());
+<a href=#391 id=391 data-nosnippet>391</a> <span class="kw">let
</span>mem_table1 = MemTable::try_new(arrow_schema.clone(), <span
class="macro">vec!</span>[<span
class="macro">vec!</span>[empty_batch1]]).unwrap();
+<a href=#392 id=392 data-nosnippet>392</a> <span class="kw">let
</span>mem_table2 = MemTable::try_new(arrow_schema, <span
class="macro">vec!</span>[<span
class="macro">vec!</span>[empty_batch2]]).unwrap();
+<a href=#393 id=393 data-nosnippet>393</a>
+<a href=#394 id=394 data-nosnippet>394</a> <span class="comment">//
Register first table - should succeed
+<a href=#395 id=395 data-nosnippet>395</a> </span><span class="kw">let
</span>result1 = schema_provider.register_table(<span
class="string">"dup_table"</span>.to_string(), Arc::new(mem_table1));
+<a href=#396 id=396 data-nosnippet>396</a> <span
class="macro">assert!</span>(result1.is_ok());
+<a href=#397 id=397 data-nosnippet>397</a>
+<a href=#398 id=398 data-nosnippet>398</a> <span class="comment">//
Register second table with same name - should fail
+<a href=#399 id=399 data-nosnippet>399</a> </span><span class="kw">let
</span>result2 = schema_provider.register_table(<span
class="string">"dup_table"</span>.to_string(), Arc::new(mem_table2));
+<a href=#400 id=400 data-nosnippet>400</a> <span
class="macro">assert!</span>(result2.is_err());
+<a href=#401 id=401 data-nosnippet>401</a> <span class="kw">let
</span>err = result2.unwrap_err();
+<a href=#402 id=402 data-nosnippet>402</a> <span
class="macro">assert!</span>(
+<a href=#403 id=403 data-nosnippet>403</a>
err.to_string().contains(<span class="string">"already exists"</span>),
+<a href=#404 id=404 data-nosnippet>404</a> <span
class="string">"Expected error about table already existing, got: {err}"</span>,
+<a href=#405 id=405 data-nosnippet>405</a> );
+<a href=#406 id=406 data-nosnippet>406</a> }
+<a href=#407 id=407 data-nosnippet>407</a>
+<a href=#408 id=408 data-nosnippet>408</a> <span class="attr">#[tokio::test]
+<a href=#409 id=409 data-nosnippet>409</a> </span><span class="kw">async fn
</span>test_deregister_table_succeeds() {
+<a href=#410 id=410 data-nosnippet>410</a> <span class="kw">let
</span>(schema_provider, _temp_dir) = create_test_schema_provider().<span
class="kw">await</span>;
+<a href=#411 id=411 data-nosnippet>411</a>
+<a href=#412 id=412 data-nosnippet>412</a> <span class="comment">//
Create and register an empty table
+<a href=#413 id=413 data-nosnippet>413</a> </span><span class="kw">let
</span>arrow_schema = Arc::new(ArrowSchema::new(<span
class="macro">vec!</span>[Field::new(
+<a href=#414 id=414 data-nosnippet>414</a> <span
class="string">"id"</span>,
+<a href=#415 id=415 data-nosnippet>415</a> DataType::Int32,
+<a href=#416 id=416 data-nosnippet>416</a> <span
class="bool-val">false</span>,
+<a href=#417 id=417 data-nosnippet>417</a> )]));
+<a href=#418 id=418 data-nosnippet>418</a>
+<a href=#419 id=419 data-nosnippet>419</a> <span class="kw">let
</span>empty_batch = RecordBatch::new_empty(arrow_schema.clone());
+<a href=#420 id=420 data-nosnippet>420</a> <span class="kw">let
</span>mem_table = MemTable::try_new(arrow_schema, <span
class="macro">vec!</span>[<span
class="macro">vec!</span>[empty_batch]]).unwrap();
+<a href=#421 id=421 data-nosnippet>421</a>
+<a href=#422 id=422 data-nosnippet>422</a> <span class="comment">//
Register the table
+<a href=#423 id=423 data-nosnippet>423</a> </span><span class="kw">let
</span>result = schema_provider.register_table(<span
class="string">"drop_me"</span>.to_string(), Arc::new(mem_table));
+<a href=#424 id=424 data-nosnippet>424</a> <span
class="macro">assert!</span>(result.is_ok());
+<a href=#425 id=425 data-nosnippet>425</a> <span
class="macro">assert!</span>(schema_provider.table_exist(<span
class="string">"drop_me"</span>));
+<a href=#426 id=426 data-nosnippet>426</a>
+<a href=#427 id=427 data-nosnippet>427</a> <span class="comment">//
Deregister the table
+<a href=#428 id=428 data-nosnippet>428</a> </span><span class="kw">let
</span>result = schema_provider.deregister_table(<span
class="string">"drop_me"</span>);
+<a href=#429 id=429 data-nosnippet>429</a> <span
class="macro">assert!</span>(result.is_ok());
+<a href=#430 id=430 data-nosnippet>430</a> <span
class="macro">assert!</span>(result.unwrap().is_some());
+<a href=#431 id=431 data-nosnippet>431</a>
+<a href=#432 id=432 data-nosnippet>432</a> <span class="comment">//
Verify the table no longer exists
+<a href=#433 id=433 data-nosnippet>433</a> </span><span
class="macro">assert!</span>(!schema_provider.table_exist(<span
class="string">"drop_me"</span>));
+<a href=#434 id=434 data-nosnippet>434</a> }
+<a href=#435 id=435 data-nosnippet>435</a>
+<a href=#436 id=436 data-nosnippet>436</a> <span class="attr">#[tokio::test]
+<a href=#437 id=437 data-nosnippet>437</a> </span><span class="kw">async fn
</span>test_deregister_nonexistent_table_returns_none() {
+<a href=#438 id=438 data-nosnippet>438</a> <span class="kw">let
</span>(schema_provider, _temp_dir) = create_test_schema_provider().<span
class="kw">await</span>;
+<a href=#439 id=439 data-nosnippet>439</a>
+<a href=#440 id=440 data-nosnippet>440</a> <span class="comment">//
Attempt to deregister a table that doesn't exist
+<a href=#441 id=441 data-nosnippet>441</a> </span><span class="kw">let
</span>result = schema_provider.deregister_table(<span
class="string">"nonexistent"</span>);
+<a href=#442 id=442 data-nosnippet>442</a> <span
class="macro">assert!</span>(result.is_ok());
+<a href=#443 id=443 data-nosnippet>443</a> <span
class="macro">assert!</span>(result.unwrap().is_none());
+<a href=#444 id=444 data-nosnippet>444</a> }
+<a href=#445 id=445
data-nosnippet>445</a>}</code></pre></div></section></main></body></html>
\ No newline at end of file
diff --git a/api/trait.impl/iceberg/catalog/trait.Catalog.js
b/api/trait.impl/iceberg/catalog/trait.Catalog.js
index 818669858..6a5715595 100644
--- a/api/trait.impl/iceberg/catalog/trait.Catalog.js
+++ b/api/trait.impl/iceberg/catalog/trait.Catalog.js
@@ -1,9 +1,9 @@
(function() {
- var implementors =
Object.fromEntries([["iceberg",[]],["iceberg_catalog_glue",[["impl <a
class=\"trait\" href=\"iceberg/catalog/trait.Catalog.html\" title=\"trait
iceberg::catalog::Catalog\">Catalog</a> for <a class=\"struct\"
href=\"iceberg_catalog_glue/struct.GlueCatalog.html\" title=\"struct
iceberg_catalog_glue::GlueCatalog\">GlueCatalog</a>"]]],["iceberg_catalog_hms",[["impl
<a class=\"trait\" href=\"iceberg/catalog/trait.Catalog.html\" title=\"trait
iceberg::catalog::Catalog\"> [...]
+ var implementors =
Object.fromEntries([["iceberg",[]],["iceberg_catalog_glue",[["impl <a
class=\"trait\" href=\"iceberg/catalog/trait.Catalog.html\" title=\"trait
iceberg::catalog::Catalog\">Catalog</a> for <a class=\"struct\"
href=\"iceberg_catalog_glue/struct.GlueCatalog.html\" title=\"struct
iceberg_catalog_glue::GlueCatalog\">GlueCatalog</a>"]]],["iceberg_catalog_hms",[["impl
Catalog for <a class=\"struct\"
href=\"iceberg_catalog_hms/struct.HmsCatalog.html\" title=\"struct iceber [...]
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
-//{"start":57,"fragment_lengths":[14,298,292,189,213,183]}
\ No newline at end of file
+//{"start":57,"fragment_lengths":[14,298,183,189,213,183]}
\ No newline at end of file
diff --git a/api/trait.impl/iceberg/catalog/trait.CatalogBuilder.js
b/api/trait.impl/iceberg/catalog/trait.CatalogBuilder.js
index 878cb1be5..a53aa68a0 100644
--- a/api/trait.impl/iceberg/catalog/trait.CatalogBuilder.js
+++ b/api/trait.impl/iceberg/catalog/trait.CatalogBuilder.js
@@ -1,9 +1,9 @@
(function() {
- var implementors =
Object.fromEntries([["iceberg",[]],["iceberg_catalog_glue",[["impl <a
class=\"trait\" href=\"iceberg/catalog/trait.CatalogBuilder.html\"
title=\"trait iceberg::catalog::CatalogBuilder\">CatalogBuilder</a> for <a
class=\"struct\" href=\"iceberg_catalog_glue/struct.GlueCatalogBuilder.html\"
title=\"struct
iceberg_catalog_glue::GlueCatalogBuilder\">GlueCatalogBuilder</a>"]]],["iceberg_catalog_hms",[["impl
<a class=\"trait\" href=\"iceberg/catalog/trait.CatalogBuilder. [...]
+ var implementors =
Object.fromEntries([["iceberg",[]],["iceberg_catalog_glue",[["impl <a
class=\"trait\" href=\"iceberg/catalog/trait.CatalogBuilder.html\"
title=\"trait iceberg::catalog::CatalogBuilder\">CatalogBuilder</a> for <a
class=\"struct\" href=\"iceberg_catalog_glue/struct.GlueCatalogBuilder.html\"
title=\"struct
iceberg_catalog_glue::GlueCatalogBuilder\">GlueCatalogBuilder</a>"]]],["iceberg_catalog_hms",[["impl
CatalogBuilder for <a class=\"struct\" href=\"iceberg_catalog_h [...]
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
-//{"start":57,"fragment_lengths":[14,340,334,217,241,211]}
\ No newline at end of file
+//{"start":57,"fragment_lengths":[14,340,211,217,241,211]}
\ No newline at end of file