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 33523463 deploy: f0150d5c62620fe1fa786fee4c5e83621e21bb13
33523463 is described below
commit 33523463f7cd3661a617fda8d2ace080ee0521b0
Author: liurenjie1024 <[email protected]>
AuthorDate: Wed Mar 12 02:44:16 2025 +0000
deploy: f0150d5c62620fe1fa786fee4c5e83621e21bb13
---
api/help.html | 2 +-
api/iceberg/transaction/index.html | 2 +-
.../transaction/struct.FastAppendAction.html | 7 +-
.../transaction/struct.ReplaceSortOrderAction.html | 8 +-
api/search-index.js | 2 +-
api/search.desc/iceberg/iceberg-desc-0-.js | 2 +-
api/settings.html | 2 +-
api/src/iceberg/transaction.rs.html | 104 ++++++++++++---------
8 files changed, 75 insertions(+), 54 deletions(-)
diff --git a/api/help.html b/api/help.html
index b3855f23..21943ce1 100644
--- a/api/help.html
+++ b/api/help.html
@@ -1 +1 @@
-<!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="Documentation for
Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-5
[...]
\ No newline at end of file
+<!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="Documentation for
Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-5
[...]
\ No newline at end of file
diff --git a/api/iceberg/transaction/index.html
b/api/iceberg/transaction/index.html
index 7f61136f..41e926a3 100644
--- a/api/iceberg/transaction/index.html
+++ b/api/iceberg/transaction/index.html
@@ -1,2 +1,2 @@
-<!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="This
module contains transaction api."><title>iceberg::transaction -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e497
[...]
+<!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="This
module contains transaction api."><title>iceberg::transaction -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e497
[...]
</div></details><h2 id="structs" class="section-header">Structs<a
href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div
class="item-name"><a class="struct" href="struct.FastAppendAction.html"
title="struct
iceberg::transaction::FastAppendAction">FastAppendAction</a></div><div
class="desc docblock-short">FastAppendAction is a transaction action for fast
append data files to the table.</div></li><li><div class="item-name"><a
class="struct" href="struct.ReplaceSortOrderAc [...]
\ No newline at end of file
diff --git a/api/iceberg/transaction/struct.FastAppendAction.html
b/api/iceberg/transaction/struct.FastAppendAction.html
index a0280de6..f52d894e 100644
--- a/api/iceberg/transaction/struct.FastAppendAction.html
+++ b/api/iceberg/transaction/struct.FastAppendAction.html
@@ -1,9 +1,10 @@
-<!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="FastAppendAction is a transaction action for fast append data files to
the table."><title>FastAppendAction in iceberg::transaction -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,Fir
[...]
-</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-FastAppendAction%3C'a%3E"
class="impl"><a class="src rightside"
href="../../src/iceberg/transaction.rs.html#182-296">source</a><a
href="#impl-FastAppendAction%3C'a%3E" class="anchor">§</a><h3
class="code-header">impl<'a> <a class="struct" href="str [...]
+<!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="FastAppendAction is a transaction action for fast append data files to
the table."><title>FastAppendAction in iceberg::transaction -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,Fir
[...]
+</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-FastAppendAction%3C'a%3E"
class="impl"><a class="src rightside"
href="../../src/iceberg/transaction.rs.html#183-306">source</a><a
href="#impl-FastAppendAction%3C'a%3E" class="anchor">§</a><h3
class="code-header">impl<'a> <a class="struct" href="str [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_data_files" class="method"><a class="src rightside"
href="../../src/iceberg/transaction.rs.html#211-217">source</a><h4
class="code-header">pub fn <a href="#method.add_data_files"
class="fn">add_data_files</a>(
&mut self,
data_files: impl <a class="trait"
href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html"
title="trait
core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a
class="struct" href="../spec/struct.DataFile.html" title="struct
iceberg::spec::DataFile">DataFile</a>>,
) -> <a class="type" href="../type.Result.html" title="type
iceberg::Result">Result</a><<a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut
Self</a>></h4></section></summary><div class="docblock"><p>Add data files to
the snapshot.</p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.apply" class="method"><a class="src rightside"
href="../../src/iceberg/transaction.rs.html#243-295">source</a><h4
class="code-header">pub async fn <a href="#method.apply"
class="fn">apply</a>(self) -> <a class="type" href="../type.Result.html"
title="type iceberg::Result">Result</a><<a class="struct"
href="struct.Transaction.html" title="struct
iceberg::transaction::Transaction">Transaction</a>& [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.apply" class="method"><a class="src rightside"
href="../../src/iceberg/transaction.rs.html#251-305">source</a><h4
class="code-header">pub async fn <a href="#method.apply"
class="fn">apply</a>(self) -> <a class="type" href="../type.Result.html"
title="type iceberg::Result">Result</a><<a class="struct"
href="struct.Transaction.html" title="struct
iceberg::transaction::Transaction">Transaction</a>& [...]
</div></details></div></details></div><h2 id="synthetic-implementations"
class="section-header">Auto Trait Implementations<a
href="#synthetic-implementations" class="anchor">§</a></h2><div
id="synthetic-implementations-list"><section
id="impl-Freeze-for-FastAppendAction%3C'a%3E" class="impl"><a
href="#impl-Freeze-for-FastAppendAction%3C'a%3E" class="anchor">§</a><h3
class="code-header">impl<'a> <a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" [...]
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#141">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/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#210">source</a><a
href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a
href="https:/ [...]
diff --git a/api/iceberg/transaction/struct.ReplaceSortOrderAction.html
b/api/iceberg/transaction/struct.ReplaceSortOrderAction.html
index 3603432e..2b5dee33 100644
--- a/api/iceberg/transaction/struct.ReplaceSortOrderAction.html
+++ b/api/iceberg/transaction/struct.ReplaceSortOrderAction.html
@@ -1,7 +1,7 @@
-<!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="Transaction action for replacing sort
order."><title>ReplaceSortOrderAction in iceberg::transaction -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.
[...]
-</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-ReplaceSortOrderAction%3C'a%3E" class="impl"><a class="src rightside"
href="../../src/iceberg/transaction.rs.html#617-684">source</a><a
href="#impl-ReplaceSortOrderAction%3C'a%3E" class="anchor">§</a><h3
class="code-header">impl<'a> <a class="struc [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.desc" class="method"><a class="src rightside"
href="../../src/iceberg/transaction.rs.html#624-626">source</a><h4
class="code-header">pub fn <a href="#method.desc" class="fn">desc</a>(self,
name: &<a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
null_order: <a class="enum" href="../spec/enum.NullOrder.html" title="enum
iceberg::spec::NullOrder">NullOrder [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.apply" class="method"><a class="src rightside"
href="../../src/iceberg/transaction.rs.html#629-653">source</a><h4
class="code-header">pub fn <a href="#method.apply" class="fn">apply</a>(self)
-> <a class="type" href="../type.Result.html" title="type
iceberg::Result">Result</a><<a class="struct" href="struct.Transaction.html"
title="struct iceberg::transaction::Transaction">Transaction</a><'a& [...]
+<!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="Transaction action for replacing sort
order."><title>ReplaceSortOrderAction in iceberg::transaction -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.
[...]
+</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-ReplaceSortOrderAction%3C'a%3E" class="impl"><a class="src rightside"
href="../../src/iceberg/transaction.rs.html#627-694">source</a><a
href="#impl-ReplaceSortOrderAction%3C'a%3E" class="anchor">§</a><h3
class="code-header">impl<'a> <a class="struc [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.desc" class="method"><a class="src rightside"
href="../../src/iceberg/transaction.rs.html#634-636">source</a><h4
class="code-header">pub fn <a href="#method.desc" class="fn">desc</a>(self,
name: &<a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
null_order: <a class="enum" href="../spec/enum.NullOrder.html" title="enum
iceberg::spec::NullOrder">NullOrder [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.apply" class="method"><a class="src rightside"
href="../../src/iceberg/transaction.rs.html#639-663">source</a><h4
class="code-header">pub fn <a href="#method.apply" class="fn">apply</a>(self)
-> <a class="type" href="../type.Result.html" title="type
iceberg::Result">Result</a><<a class="struct" href="struct.Transaction.html"
title="struct iceberg::transaction::Transaction">Transaction</a><'a& [...]
</div></details></div></details></div><h2 id="synthetic-implementations"
class="section-header">Auto Trait Implementations<a
href="#synthetic-implementations" class="anchor">§</a></h2><div
id="synthetic-implementations-list"><section
id="impl-Freeze-for-ReplaceSortOrderAction%3C'a%3E" class="impl"><a
href="#impl-Freeze-for-ReplaceSortOrderAction%3C'a%3E" class="anchor">§</a><h3
class="code-header">impl<'a> <a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.F [...]
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#141">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/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#210">source</a><a
href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a
href="https:/ [...]
diff --git a/api/search-index.js b/api/search-index.js
index 7ed99aba..8b345b9a 100644
--- a/api/search-index.js
+++ b/api/search-index.js
@@ -1,5 +1,5 @@
var searchIndex = new Map(JSON.parse('[\
-["iceberg",{"t":"PPPPPKPPPPPFGPPPFFPPPPPPPPPIPPPPPPPPFFFGGPPPFNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMQNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNCNNNNNNNNNNNCNMMMOONNNOOONOMNNNNNNONOOMOCOONNNNONCOCMNNNNNNNNNNNNNCCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMNNNNNNNNNNNNNCOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFFKSRRSNNNNNNNNHHHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMNMNMHMNNNNNNNNNNHNNNNNNNPPPPPPPPFKRGFIPPPPPPPPFPPPPPPPPPGGFPPFPIPPFNN
[...]
+["iceberg",{"t":"PPPPPKPPPPPFGPPPFFPPPPPPPPPIPPPPPPPPFFFGGPPPFNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMQNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNCNNNNNNNNNNNCNMMMOONNNOOONOMNNNNNNONOOMOCOONNNNONCOCMNNNNNNNNNNNNNCCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMNNNNNNNNNNNNNCOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFFKSRRSNNNNNNNNHHHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMNMNMHMNNNNNNNNNNHNNNNNNNPPPPPPPPFKRGFIPPPPPPPPFPPPPPPPPPGGFPPFPIPPFNN
[...]
["iceberg_catalog_glue",{"t":"SSSSSFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNQ","n":["AWS_ACCESS_KEY_ID","AWS_PROFILE_NAME","AWS_REGION_NAME","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","GlueCatalog","GlueCatalogConfig","borrow","borrow","borrow_mut","borrow_mut","builder","create_namespace","create_table","deref","deref","deref_mut","deref_mut","drop","drop","drop_namespace","drop_table","file_io","fmt","fmt","from","from","get_namespace","init","init","into","into","into_shared","i
[...]
["iceberg_catalog_hms",{"t":"PPFFGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN","n":["Buffered","Framed","HmsCatalog","HmsCatalogConfig","HmsThriftTransport","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","builder","create_namespace","create_table","default","deref","deref","deref","deref_mut","deref_mut","deref_mut","drop","drop","drop","drop_namespace","drop_table","file_io","fmt","fmt","fmt","from","from","from","get_namespace","init","init","init","into
[...]
["iceberg_catalog_memory",{"t":"FNNNNNNNNNNNNNNNNNNNNNNNNNNN","n":["MemoryCatalog","borrow","borrow_mut","create_namespace","create_table","deref","deref_mut","drop","drop_namespace","drop_table","fmt","from","get_namespace","init","into","list_namespaces","list_tables","load_table","namespace_exists","new","rename_table","table_exists","try_from","try_into","type_id","update_namespace","update_table","vzip"],"q":[[0,"iceberg_catalog_memory"],[28,"iceberg_catalog_memory::catalog"],[29,"i
[...]
diff --git a/api/search.desc/iceberg/iceberg-desc-0-.js
b/api/search.desc/iceberg/iceberg-desc-0-.js
index faf01fde..172d976b 100644
--- a/api/search.desc/iceberg/iceberg-desc-0-.js
+++ b/api/search.desc/iceberg/iceberg-desc-0-.js
@@ -1 +1 @@
-searchState.loadedDescShard("iceberg", 0, "Apache Iceberg Official Native Rust
Implementation\nAdd a new schema to the table\nAdd snapshot to table.\nAdd sort
order to table.\nAdd a new partition spec to the table\nAssign a new UUID to
the table\nThe catalog API for Iceberg Rust.\nThe table’s current schema id
must match the requirement.\nIceberg data is invalid.\nThe table’s default sort
order id must match the …\nThe table’s default spec id must match the
requirement.\nContains the err [...]
\ No newline at end of file
+searchState.loadedDescShard("iceberg", 0, "Apache Iceberg Official Native Rust
Implementation\nAdd a new schema to the table\nAdd snapshot to table.\nAdd sort
order to table.\nAdd a new partition spec to the table\nAssign a new UUID to
the table\nThe catalog API for Iceberg Rust.\nThe table’s current schema id
must match the requirement.\nIceberg data is invalid.\nThe table’s default sort
order id must match the …\nThe table’s default spec id must match the
requirement.\nContains the err [...]
\ No newline at end of file
diff --git a/api/settings.html b/api/settings.html
index 0b4d7eab..8bb04340 100644
--- a/api/settings.html
+++ b/api/settings.html
@@ -1 +1 @@
-<!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="Settings
of
Rustdoc"><title>Settings</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562
[...]
\ No newline at end of file
+<!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="Settings
of
Rustdoc"><title>Settings</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562
[...]
\ No newline at end of file
diff --git a/api/src/iceberg/transaction.rs.html
b/api/src/iceberg/transaction.rs.html
index 3daaf5da..10fa8a99 100644
--- a/api/src/iceberg/transaction.rs.html
+++ b/api/src/iceberg/transaction.rs.html
@@ -1034,6 +1034,16 @@
<a href="#1034" id="1034">1034</a>
<a href="#1035" id="1035">1035</a>
<a href="#1036" id="1036">1036</a>
+<a href="#1037" id="1037">1037</a>
+<a href="#1038" id="1038">1038</a>
+<a href="#1039" id="1039">1039</a>
+<a href="#1040" id="1040">1040</a>
+<a href="#1041" id="1041">1041</a>
+<a href="#1042" id="1042">1042</a>
+<a href="#1043" id="1043">1043</a>
+<a href="#1044" id="1044">1044</a>
+<a href="#1045" id="1045">1045</a>
+<a href="#1046" id="1046">1046</a>
</pre></div><pre class="rust"><code><span class="comment">// Licensed to the
Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
@@ -1213,6 +1223,7 @@
<span class="doccomment">/// FastAppendAction is a transaction action for fast
append data files to the table.
</span><span class="kw">pub struct </span>FastAppendAction<<span
class="lifetime">'a</span>> {
snapshot_produce_action: SnapshotProduceAction<<span
class="lifetime">'a</span>>,
+ check_duplicate: bool,
}
<span class="kw">impl</span><<span class="lifetime">'a</span>>
FastAppendAction<<span class="lifetime">'a</span>> {
@@ -1232,9 +1243,16 @@
commit_uuid,
snapshot_properties,
)<span class="question-mark">?</span>,
+ check_duplicate: <span class="bool-val">true</span>,
})
}
+ <span class="doccomment">/// Set whether to check duplicate files
+ </span><span class="kw">pub fn </span>with_check_duplicate(<span
class="kw-2">mut </span><span class="self">self</span>, v: bool) -> <span
class="self">Self </span>{
+ <span class="self">self</span>.check_duplicate = v;
+ <span class="self">self
+ </span>}
+
<span class="doccomment">/// Add data files to the snapshot.
</span><span class="kw">pub fn </span>add_data_files(
<span class="kw-2">&mut </span><span class="self">self</span>,
@@ -1278,51 +1296,53 @@
<span class="doccomment">/// Finished building the action and apply it to
the transaction.
</span><span class="kw">pub async fn </span>apply(<span
class="self">self</span>) -> <span
class="prelude-ty">Result</span><Transaction<<span
class="lifetime">'a</span>>> {
<span class="comment">// Checks duplicate files
- </span><span class="kw">let </span>new_files: HashSet<<span
class="kw-2">&</span>str> = <span class="self">self
- </span>.snapshot_produce_action
- .added_data_files
- .iter()
- .map(|df| df.file_path.as_str())
- .collect();
-
- <span class="kw">let </span><span class="kw-2">mut
</span>manifest_stream = <span class="self">self
- </span>.snapshot_produce_action
- .tx
- .table
- .inspect()
- .manifests()
- .scan()
- .<span class="kw">await</span><span class="question-mark">?</span>;
- <span class="kw">let </span><span class="kw-2">mut
</span>referenced_files = Vec::new();
-
- <span class="kw">while let </span><span
class="prelude-val">Some</span>(batch) = manifest_stream.try_next().<span
class="kw">await</span><span class="question-mark">? </span>{
- <span class="kw">let </span>file_path_array = batch
- .column(<span class="number">1</span>)
- .as_any()
- .downcast_ref::<StringArray>()
- .ok_or_else(|| {
- Error::new(
- ErrorKind::DataInvalid,
- <span class="string">"Failed to downcast file_path
column to StringArray"</span>,
- )
- })<span class="question-mark">?</span>;
-
- <span class="kw">for </span>i <span class="kw">in </span><span
class="number">0</span>..batch.num_rows() {
- <span class="kw">let </span>file_path =
file_path_array.value(i);
- <span class="kw">if </span>new_files.contains(file_path) {
- referenced_files.push(file_path.to_string());
+ </span><span class="kw">if </span><span
class="self">self</span>.check_duplicate {
+ <span class="kw">let </span>new_files: HashSet<<span
class="kw-2">&</span>str> = <span class="self">self
+ </span>.snapshot_produce_action
+ .added_data_files
+ .iter()
+ .map(|df| df.file_path.as_str())
+ .collect();
+
+ <span class="kw">let </span><span class="kw-2">mut
</span>manifest_stream = <span class="self">self
+ </span>.snapshot_produce_action
+ .tx
+ .table
+ .inspect()
+ .manifests()
+ .scan()
+ .<span class="kw">await</span><span
class="question-mark">?</span>;
+ <span class="kw">let </span><span class="kw-2">mut
</span>referenced_files = Vec::new();
+
+ <span class="kw">while let </span><span
class="prelude-val">Some</span>(batch) = manifest_stream.try_next().<span
class="kw">await</span><span class="question-mark">? </span>{
+ <span class="kw">let </span>file_path_array = batch
+ .column(<span class="number">1</span>)
+ .as_any()
+ .downcast_ref::<StringArray>()
+ .ok_or_else(|| {
+ Error::new(
+ ErrorKind::DataInvalid,
+ <span class="string">"Failed to downcast file_path
column to StringArray"</span>,
+ )
+ })<span class="question-mark">?</span>;
+
+ <span class="kw">for </span>i <span class="kw">in </span><span
class="number">0</span>..batch.num_rows() {
+ <span class="kw">let </span>file_path =
file_path_array.value(i);
+ <span class="kw">if </span>new_files.contains(file_path) {
+ referenced_files.push(file_path.to_string());
+ }
}
}
- }
- <span class="kw">if </span>!referenced_files.is_empty() {
- <span class="kw">return </span><span
class="prelude-val">Err</span>(Error::new(
- ErrorKind::DataInvalid,
- <span class="macro">format!</span>(
- <span class="string">"Cannot add files that are already
referenced by table, files: {}"</span>,
- referenced_files.join(<span class="string">", "</span>)
- ),
- ));
+ <span class="kw">if </span>!referenced_files.is_empty() {
+ <span class="kw">return </span><span
class="prelude-val">Err</span>(Error::new(
+ ErrorKind::DataInvalid,
+ <span class="macro">format!</span>(
+ <span class="string">"Cannot add files that are
already referenced by table, files: {}"</span>,
+ referenced_files.join(<span class="string">", "</span>)
+ ),
+ ));
+ }
}
<span class="self">self</span>.snapshot_produce_action