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 cadf2c0e deploy: e1de63d3ec47ee97d2b22cd193634e9aa9ff6ed8
cadf2c0e is described below

commit cadf2c0ef1ad21e3dbd9bbcd8a50754ae132fc4c
Author: Xuanwo <[email protected]>
AuthorDate: Sat Apr 5 04:03:22 2025 +0000

    deploy: e1de63d3ec47ee97d2b22cd193634e9aa9ff6ed8
---
 api/iceberg/scan/index.html                   |   2 +-
 api/iceberg/scan/struct.TableScan.html        |  12 +-
 api/iceberg/scan/struct.TableScanBuilder.html |   4 +-
 api/search-index.js                           |   2 +-
 api/src/iceberg/scan/mod.rs.html              | 164 +++++++++++++++++++++++---
 5 files changed, 158 insertions(+), 26 deletions(-)

diff --git a/api/iceberg/scan/index.html b/api/iceberg/scan/index.html
index 9a798047..df10f710 100644
--- a/api/iceberg/scan/index.html
+++ b/api/iceberg/scan/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="Table scan 
api."><title>iceberg::scan - 
Rust</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-Reg
 [...]
+<!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="Table scan 
api."><title>iceberg::scan - 
Rust</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-Reg
 [...]
 </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.FileScanTask.html" 
title="struct iceberg::scan::FileScanTask">FileScanTask</a></div><div 
class="desc docblock-short">A task to scan part of file.</div></li><li><div 
class="item-name"><a class="struct" href="struct.FileScanTaskDeleteFile.html" 
title="struct iceberg::scan::FileScanTaskDeleteFile">FileScan [...]
\ No newline at end of file
diff --git a/api/iceberg/scan/struct.TableScan.html 
b/api/iceberg/scan/struct.TableScan.html
index a2938c48..faabed72 100644
--- a/api/iceberg/scan/struct.TableScan.html
+++ b/api/iceberg/scan/struct.TableScan.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="Table 
scan."><title>TableScan in iceberg::scan - 
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCo
 [...]
-</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-TableScan" class="impl"><a 
class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#340-569">source</a><a 
href="#impl-TableScan" class="anchor">§</a><h3 class="code-header">impl <a 
class="struct" href="struct.TableScan.html" title="struct iceberg:: [...]
-</div></details><details class="toggle method-toggle" open><summary><section 
id="method.to_arrow" class="method"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#444-458">source</a><h4 
class="code-header">pub async fn <a href="#method.to_arrow" 
class="fn">to_arrow</a>(&amp;self) -&gt; <a class="type" 
href="../type.Result.html" title="type iceberg::Result">Result</a>&lt;<a 
class="type" href="type.ArrowRecordBatchStream.html" title="type 
iceberg::scan::ArrowRecordBatchStre [...]
-</div></details><details class="toggle method-toggle" open><summary><section 
id="method.column_names" class="method"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#461-463">source</a><h4 
class="code-header">pub fn <a href="#method.column_names" 
class="fn">column_names</a>(&amp;self) -&gt; <a class="enum" 
href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"; 
title="enum core::option::Option">Option</a>&lt;&amp;[<a class="struct" 
href="https://doc.rust-la [...]
-</div></details><details class="toggle method-toggle" open><summary><section 
id="method.snapshot" class="method"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#466-468">source</a><h4 
class="code-header">pub fn <a href="#method.snapshot" 
class="fn">snapshot</a>(&amp;self) -&gt; &amp;<a class="type" 
href="../spec/type.SnapshotRef.html" title="type 
iceberg::spec::SnapshotRef">SnapshotRef</a></h4></section></summary><div 
class="docblock"><p>Returns a reference to the snaps [...]
-</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-Debug-for-TableScan" class="impl"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#317">source</a><a 
href="#impl-Debug-for-TableScan" class="anchor">§</a><h3 
class="code-header">impl <a class [...]
+<!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="Table 
scan."><title>TableScan in iceberg::scan - 
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCo
 [...]
+</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-TableScan" class="impl"><a 
class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#352-585">source</a><a 
href="#impl-TableScan" class="anchor">§</a><h3 class="code-header">impl <a 
class="struct" href="struct.TableScan.html" title="struct iceberg:: [...]
+</div></details><details class="toggle method-toggle" open><summary><section 
id="method.to_arrow" class="method"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#460-474">source</a><h4 
class="code-header">pub async fn <a href="#method.to_arrow" 
class="fn">to_arrow</a>(&amp;self) -&gt; <a class="type" 
href="../type.Result.html" title="type iceberg::Result">Result</a>&lt;<a 
class="type" href="type.ArrowRecordBatchStream.html" title="type 
iceberg::scan::ArrowRecordBatchStre [...]
+</div></details><details class="toggle method-toggle" open><summary><section 
id="method.column_names" class="method"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#477-479">source</a><h4 
class="code-header">pub fn <a href="#method.column_names" 
class="fn">column_names</a>(&amp;self) -&gt; <a class="enum" 
href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"; 
title="enum core::option::Option">Option</a>&lt;&amp;[<a class="struct" 
href="https://doc.rust-la [...]
+</div></details><details class="toggle method-toggle" open><summary><section 
id="method.snapshot" class="method"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#482-484">source</a><h4 
class="code-header">pub fn <a href="#method.snapshot" 
class="fn">snapshot</a>(&amp;self) -&gt; <a class="enum" 
href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"; 
title="enum core::option::Option">Option</a>&lt;&amp;<a class="type" 
href="../spec/type.SnapshotRef.html" tit [...]
+</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-Debug-for-TableScan" class="impl"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#326">source</a><a 
href="#impl-Debug-for-TableScan" class="anchor">§</a><h3 
class="code-header">impl <a class [...]
     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:/ [...]
     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_mut" class="method trait-impl"><a class="src rightside" 
href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217";>source</a><a
 href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a 
href= [...]
diff --git a/api/iceberg/scan/struct.TableScanBuilder.html 
b/api/iceberg/scan/struct.TableScanBuilder.html
index f27e39a2..403390a4 100644
--- a/api/iceberg/scan/struct.TableScanBuilder.html
+++ b/api/iceberg/scan/struct.TableScanBuilder.html
@@ -1,5 +1,5 @@
 <!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 to 
create table scan."><title>TableScanBuilder in iceberg::scan - 
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a78
 [...]
-</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-TableScanBuilder%3C'a%3E" 
class="impl"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#69-314">source</a><a 
href="#impl-TableScanBuilder%3C'a%3E" class="anchor">§</a><h3 
class="code-header">impl&lt;'a&gt; <a class="struct" href="struct. [...]
+</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-TableScanBuilder%3C'a%3E" 
class="impl"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#69-323">source</a><a 
href="#impl-TableScanBuilder%3C'a%3E" class="anchor">§</a><h3 
class="code-header">impl&lt;'a&gt; <a class="struct" href="struct. [...]
 to something other than the default</p>
 </div></details><details class="toggle method-toggle" open><summary><section 
id="method.with_case_sensitive" class="method"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#97-100">source</a><h4 
class="code-header">pub fn <a href="#method.with_case_sensitive" 
class="fn">with_case_sensitive</a>(self, case_sensitive: <a class="primitive" 
href="https://doc.rust-lang.org/nightly/std/primitive.bool.html";>bool</a>) 
-&gt; Self</h4></section></summary><div class="docblock"><p>Se [...]
 </div></details><details class="toggle method-toggle" open><summary><section 
id="method.with_filter" class="method"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#103-108">source</a><h4 
class="code-header">pub fn <a href="#method.with_filter" 
class="fn">with_filter</a>(self, predicate: <a class="enum" 
href="../expr/enum.Predicate.html" title="enum 
iceberg::expr::Predicate">Predicate</a>) -&gt; 
Self</h4></section></summary><div class="docblock"><p>Specifies a predicate  
[...]
@@ -42,7 +42,7 @@ order to get the best performance from using row 
selection.</p>
     delete_file_processing_enabled: <a class="primitive" 
href="https://doc.rust-lang.org/nightly/std/primitive.bool.html";>bool</a>,
 ) -&gt; Self</h4></section></summary><div class="docblock"><p>Determines 
whether to enable delete file processing (currently disabled by default)</p>
 <p>When disabled, delete files are ignored.</p>
-</div></details><details class="toggle method-toggle" open><summary><section 
id="method.build" class="method"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#204-313">source</a><h4 
class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self) 
-&gt; <a class="type" href="../type.Result.html" title="type 
iceberg::Result">Result</a>&lt;<a class="struct" href="struct.TableScan.html" 
title="struct iceberg::scan::TableScan">TableScan</a>&gt;</h4></section></su 
[...]
+</div></details><details class="toggle method-toggle" open><summary><section 
id="method.build" class="method"><a class="src rightside" 
href="../../src/iceberg/scan/mod.rs.html#204-322">source</a><h4 
class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self) 
-&gt; <a class="type" href="../type.Result.html" title="type 
iceberg::Result">Result</a>&lt;<a class="struct" href="struct.TableScan.html" 
title="struct iceberg::scan::TableScan">TableScan</a>&gt;</h4></section></su 
[...]
 </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-TableScanBuilder%3C'a%3E" class="impl"><a 
href="#impl-Freeze-for-TableScanBuilder%3C'a%3E" class="anchor">§</a><h3 
class="code-header">impl&lt;'a&gt; <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/search-index.js b/api/search-index.js
index 10b8a658..a65a3beb 100644
--- a/api/search-index.js
+++ b/api/search-index.js
@@ -1,5 +1,5 @@
 var searchIndex = new Map(JSON.parse('[\
-["iceberg",{"t":"PPPPPKPPPPPFGPPPFFPPPPPPPPPIPPPPPPPPFFFGGPPPFNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMQNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNCNNNNNNNNNNNCNMMMOONNNOOONOMNNNNNNONOOMOCOONNNNONCOCMNNNNNNNNNNNNNCCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMNNNNNNNNNNNNNCOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFFFKSRRSNNNNNNNNHHHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNMNNNMNMHMNNNNNNNNNNNNNNHNNNNNNNNNNNPPPPPPPPFKRGFIPPPPPPPPFP
 [...]
+["iceberg",{"t":"PPPPPKPPPPPFGPPPFFPPPPPPPPPIPPPPPPPPFFFGGPPPFNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMQNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNCNNNNNNNNNNNCNMMMOONNNOOONOMNNNNNNONOOMOCOONNNNONCOCMNNNNNNNNNNNNNCCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMNNNNNNNNNNNNNCOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFFFKSRRSNNNNNNNNHHHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNMNNNMNMHMNNNNNNNNNNNNNNHNNNNNNNNNNNPPPPPPPPFKRGFIPPPPPPPPFP
 [...]
 
["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/src/iceberg/scan/mod.rs.html b/api/src/iceberg/scan/mod.rs.html
index ec327965..e12fbd97 100644
--- a/api/src/iceberg/scan/mod.rs.html
+++ b/api/src/iceberg/scan/mod.rs.html
@@ -1766,6 +1766,72 @@
 <a href="#1766" id="1766">1766</a>
 <a href="#1767" id="1767">1767</a>
 <a href="#1768" id="1768">1768</a>
+<a href="#1769" id="1769">1769</a>
+<a href="#1770" id="1770">1770</a>
+<a href="#1771" id="1771">1771</a>
+<a href="#1772" id="1772">1772</a>
+<a href="#1773" id="1773">1773</a>
+<a href="#1774" id="1774">1774</a>
+<a href="#1775" id="1775">1775</a>
+<a href="#1776" id="1776">1776</a>
+<a href="#1777" id="1777">1777</a>
+<a href="#1778" id="1778">1778</a>
+<a href="#1779" id="1779">1779</a>
+<a href="#1780" id="1780">1780</a>
+<a href="#1781" id="1781">1781</a>
+<a href="#1782" id="1782">1782</a>
+<a href="#1783" id="1783">1783</a>
+<a href="#1784" id="1784">1784</a>
+<a href="#1785" id="1785">1785</a>
+<a href="#1786" id="1786">1786</a>
+<a href="#1787" id="1787">1787</a>
+<a href="#1788" id="1788">1788</a>
+<a href="#1789" id="1789">1789</a>
+<a href="#1790" id="1790">1790</a>
+<a href="#1791" id="1791">1791</a>
+<a href="#1792" id="1792">1792</a>
+<a href="#1793" id="1793">1793</a>
+<a href="#1794" id="1794">1794</a>
+<a href="#1795" id="1795">1795</a>
+<a href="#1796" id="1796">1796</a>
+<a href="#1797" id="1797">1797</a>
+<a href="#1798" id="1798">1798</a>
+<a href="#1799" id="1799">1799</a>
+<a href="#1800" id="1800">1800</a>
+<a href="#1801" id="1801">1801</a>
+<a href="#1802" id="1802">1802</a>
+<a href="#1803" id="1803">1803</a>
+<a href="#1804" id="1804">1804</a>
+<a href="#1805" id="1805">1805</a>
+<a href="#1806" id="1806">1806</a>
+<a href="#1807" id="1807">1807</a>
+<a href="#1808" id="1808">1808</a>
+<a href="#1809" id="1809">1809</a>
+<a href="#1810" id="1810">1810</a>
+<a href="#1811" id="1811">1811</a>
+<a href="#1812" id="1812">1812</a>
+<a href="#1813" id="1813">1813</a>
+<a href="#1814" id="1814">1814</a>
+<a href="#1815" id="1815">1815</a>
+<a href="#1816" id="1816">1816</a>
+<a href="#1817" id="1817">1817</a>
+<a href="#1818" id="1818">1818</a>
+<a href="#1819" id="1819">1819</a>
+<a href="#1820" id="1820">1820</a>
+<a href="#1821" id="1821">1821</a>
+<a href="#1822" id="1822">1822</a>
+<a href="#1823" id="1823">1823</a>
+<a href="#1824" id="1824">1824</a>
+<a href="#1825" id="1825">1825</a>
+<a href="#1826" id="1826">1826</a>
+<a href="#1827" id="1827">1827</a>
+<a href="#1828" id="1828">1828</a>
+<a href="#1829" id="1829">1829</a>
+<a href="#1830" id="1830">1830</a>
+<a href="#1831" id="1831">1831</a>
+<a href="#1832" id="1832">1832</a>
+<a href="#1833" id="1833">1833</a>
+<a href="#1834" id="1834">1834</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
@@ -1982,14 +2048,23 @@
                     )
                 })<span class="question-mark">?
                 </span>.clone(),
-            <span class="prelude-val">None </span>=&gt; <span class="self">self
-                </span>.table
-                .metadata()
-                .current_snapshot()
-                .ok_or_else(|| {
-                    Error::new(ErrorKind::Unexpected, <span 
class="string">"Can't scan table without snapshots"</span>)
-                })<span class="question-mark">?
-                </span>.clone(),
+            <span class="prelude-val">None </span>=&gt; {
+                <span class="kw">let </span><span 
class="prelude-val">Some</span>(current_snapshot_id) = <span 
class="self">self</span>.table.metadata().current_snapshot() <span 
class="kw">else </span>{
+                    <span class="kw">return </span><span 
class="prelude-val">Ok</span>(TableScan {
+                        batch_size: <span class="self">self</span>.batch_size,
+                        column_names: <span 
class="self">self</span>.column_names,
+                        file_io: <span 
class="self">self</span>.table.file_io().clone(),
+                        plan_context: <span class="prelude-val">None</span>,
+                        concurrency_limit_data_files: <span 
class="self">self</span>.concurrency_limit_data_files,
+                        concurrency_limit_manifest_entries: <span 
class="self">self</span>.concurrency_limit_manifest_entries,
+                        concurrency_limit_manifest_files: <span 
class="self">self</span>.concurrency_limit_manifest_files,
+                        row_group_filtering_enabled: <span 
class="self">self</span>.row_group_filtering_enabled,
+                        row_selection_enabled: <span 
class="self">self</span>.row_selection_enabled,
+                        delete_file_processing_enabled: <span 
class="self">self</span>.delete_file_processing_enabled,
+                    });
+                };
+                current_snapshot_id.clone()
+            }
         };
 
         <span class="kw">let </span>schema = snapshot.schema(<span 
class="self">self</span>.table.metadata())<span class="question-mark">?</span>;
@@ -2070,7 +2145,7 @@
             batch_size: <span class="self">self</span>.batch_size,
             column_names: <span class="self">self</span>.column_names,
             file_io: <span class="self">self</span>.table.file_io().clone(),
-            plan_context,
+            plan_context: <span class="prelude-val">Some</span>(plan_context),
             concurrency_limit_data_files: <span 
class="self">self</span>.concurrency_limit_data_files,
             concurrency_limit_manifest_entries: <span 
class="self">self</span>.concurrency_limit_manifest_entries,
             concurrency_limit_manifest_files: <span 
class="self">self</span>.concurrency_limit_manifest_files,
@@ -2084,7 +2159,10 @@
 <span class="doccomment">/// Table scan.
 </span><span class="attr">#[derive(Debug)]
 </span><span class="kw">pub struct </span>TableScan {
-    plan_context: PlanContext,
+    <span class="doccomment">/// A [PlanContext], if this table has at least 
one snapshot, otherwise None.
+    ///
+    /// If this is None, then the scan contains no rows.
+    </span>plan_context: <span 
class="prelude-ty">Option</span>&lt;PlanContext&gt;,
     batch_size: <span class="prelude-ty">Option</span>&lt;usize&gt;,
     file_io: FileIO,
     column_names: <span 
class="prelude-ty">Option</span>&lt;Vec&lt;String&gt;&gt;,
@@ -2108,6 +2186,10 @@
 <span class="kw">impl </span>TableScan {
     <span class="doccomment">/// Returns a stream of [`FileScanTask`]s.
     </span><span class="kw">pub async fn </span>plan_files(<span 
class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span 
class="prelude-ty">Result</span>&lt;FileScanTaskStream&gt; {
+        <span class="kw">let </span><span 
class="prelude-val">Some</span>(plan_context) = <span 
class="self">self</span>.plan_context.as_ref() <span class="kw">else </span>{
+            <span class="kw">return </span><span 
class="prelude-val">Ok</span>(Box::pin(futures::stream::empty()));
+        };
+
         <span class="kw">let </span>concurrency_limit_manifest_files = <span 
class="self">self</span>.concurrency_limit_manifest_files;
         <span class="kw">let </span>concurrency_limit_manifest_entries = <span 
class="self">self</span>.concurrency_limit_manifest_entries;
 
@@ -2127,12 +2209,12 @@
                 <span class="prelude-val">None
             </span>};
 
-        <span class="kw">let </span>manifest_list = <span 
class="self">self</span>.plan_context.get_manifest_list().<span 
class="kw">await</span><span class="question-mark">?</span>;
+        <span class="kw">let </span>manifest_list = 
plan_context.get_manifest_list().<span class="kw">await</span><span 
class="question-mark">?</span>;
 
         <span class="comment">// get the [`ManifestFile`]s from the 
[`ManifestList`], filtering out any
         // whose partitions cannot match this
         // scan's filter
-        </span><span class="kw">let </span>manifest_file_contexts = <span 
class="self">self</span>.plan_context.build_manifest_file_contexts(
+        </span><span class="kw">let </span>manifest_file_contexts = 
plan_context.build_manifest_file_contexts(
             manifest_list,
             manifest_entry_data_ctx_tx,
             delete_file_idx_and_tx.as_ref().map(|(delete_file_idx, <span 
class="kw">_</span>)| {
@@ -2231,8 +2313,8 @@
     }
 
     <span class="doccomment">/// Returns a reference to the snapshot of the 
table scan.
-    </span><span class="kw">pub fn </span>snapshot(<span 
class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span 
class="kw-2">&amp;</span>SnapshotRef {
-        <span class="kw-2">&amp;</span><span 
class="self">self</span>.plan_context.snapshot
+    </span><span class="kw">pub fn </span>snapshot(<span 
class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span 
class="prelude-ty">Option</span>&lt;<span 
class="kw-2">&amp;</span>SnapshotRef&gt; {
+        <span class="self">self</span>.plan_context.as_ref().map(|x| <span 
class="kw-2">&amp;</span>x.snapshot)
     }
 
     <span class="kw">async fn </span>process_data_manifest_entry(
@@ -2420,6 +2502,45 @@
             }
         }
 
+        <span class="attr">#[allow(clippy::new_without_default)]
+        </span><span class="kw">pub fn </span>new_empty() -&gt; <span 
class="self">Self </span>{
+            <span class="kw">let </span>tmp_dir = TempDir::new().unwrap();
+            <span class="kw">let </span>table_location = 
tmp_dir.path().join(<span class="string">"table1"</span>);
+            <span class="kw">let </span>table_metadata1_location = 
table_location.join(<span class="string">"metadata/v1.json"</span>);
+
+            <span class="kw">let </span>file_io = 
FileIO::from_path(table_location.as_os_str().to_str().unwrap())
+                .unwrap()
+                .build()
+                .unwrap();
+
+            <span class="kw">let </span>table_metadata = {
+                <span class="kw">let </span>template_json_str = 
fs::read_to_string(<span class="macro">format!</span>(
+                    <span 
class="string">"{}/testdata/example_empty_table_metadata_v2.json"</span>,
+                    <span class="macro">env!</span>(<span 
class="string">"CARGO_MANIFEST_DIR"</span>)
+                ))
+                .unwrap();
+                <span class="kw">let </span><span class="kw-2">mut 
</span>context = Context::new();
+                context.insert(<span class="string">"table_location"</span>, 
<span class="kw-2">&amp;</span>table_location);
+                context.insert(<span 
class="string">"table_metadata_1_location"</span>, <span 
class="kw-2">&amp;</span>table_metadata1_location);
+
+                <span class="kw">let </span>metadata_json = 
Tera::one_off(<span class="kw-2">&amp;</span>template_json_str, <span 
class="kw-2">&amp;</span>context, <span class="bool-val">false</span>).unwrap();
+                serde_json::from_str::&lt;TableMetadata&gt;(<span 
class="kw-2">&amp;</span>metadata_json).unwrap()
+            };
+
+            <span class="kw">let </span>table = Table::builder()
+                .metadata(table_metadata)
+                .identifier(TableIdent::from_strs([<span 
class="string">"db"</span>, <span class="string">"table1"</span>]).unwrap())
+                .file_io(file_io.clone())
+                
.metadata_location(table_metadata1_location.as_os_str().to_str().unwrap())
+                .build()
+                .unwrap();
+
+            <span class="self">Self </span>{
+                table_location: table_location.to_str().unwrap().to_string(),
+                table,
+            }
+        }
+
         <span class="kw">pub fn </span>new_unpartitioned() -&gt; <span 
class="self">Self </span>{
             <span class="kw">let </span>tmp_dir = TempDir::new().unwrap();
             <span class="kw">let </span>table_location = 
tmp_dir.path().join(<span class="string">"table1"</span>);
@@ -2946,7 +3067,7 @@
         <span class="kw">let </span>table_scan = table.scan().build().unwrap();
         <span class="macro">assert_eq!</span>(
             table.metadata().current_snapshot().unwrap().snapshot_id(),
-            table_scan.snapshot().snapshot_id()
+            table_scan.snapshot().unwrap().snapshot_id()
         );
     }
 
@@ -2968,7 +3089,18 @@
             .with_row_selection_enabled(<span class="bool-val">true</span>)
             .build()
             .unwrap();
-        <span 
class="macro">assert_eq!</span>(table_scan.snapshot().snapshot_id(), <span 
class="number">3051729675574597004</span>);
+        <span class="macro">assert_eq!</span>(
+            table_scan.snapshot().unwrap().snapshot_id(),
+            <span class="number">3051729675574597004
+        </span>);
+    }
+
+    <span class="attr">#[tokio::test]
+    </span><span class="kw">async fn 
</span>test_plan_files_on_table_without_any_snapshots() {
+        <span class="kw">let </span>table = 
TableTestFixture::new_empty().table;
+        <span class="kw">let </span>batch_stream = 
table.scan().build().unwrap().to_arrow().<span class="kw">await</span>.unwrap();
+        <span class="kw">let </span>batches: Vec&lt;<span 
class="kw">_</span>&gt; = batch_stream.try_collect().<span 
class="kw">await</span>.unwrap();
+        <span class="macro">assert!</span>(batches.is_empty());
     }
 
     <span class="attr">#[tokio::test]

Reply via email to