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 2f6e77cf deploy: a5aba9a02c06494d9614a5a556bdcde5871829ef
2f6e77cf is described below

commit 2f6e77cf58090af178155b892e1ae48640d19973
Author: Xuanwo <[email protected]>
AuthorDate: Sun Sep 8 16:38:09 2024 +0000

    deploy: a5aba9a02c06494d9614a5a556bdcde5871829ef
---
 api/iceberg/spec/struct.SortOrder.html         |  5 +-
 api/iceberg/spec/struct.SortOrderBuilder.html  |  4 +-
 api/search-index.js                            |  2 +-
 api/search.desc/iceberg/iceberg-desc-0-.js     |  2 +-
 api/src/iceberg/spec/sort.rs.html              | 86 ++++++++++++++++++++++++--
 api/src/iceberg_catalog_memory/catalog.rs.html |  2 +-
 6 files changed, 88 insertions(+), 13 deletions(-)

diff --git a/api/iceberg/spec/struct.SortOrder.html 
b/api/iceberg/spec/struct.SortOrder.html
index 5331119d..ea3fdde8 100644
--- a/api/iceberg/spec/struct.SortOrder.html
+++ b/api/iceberg/spec/struct.SortOrder.html
@@ -1,14 +1,15 @@
-<!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="A sort 
order is defined by a sort order id and a list of sort fields. The order of the 
sort fields within the list defines the order in which the sort is applied to 
the data."><title>SortOrder in iceberg::spec - 
Rust</title><script>if(window.location.protocol!=="file:")document.head.inse 
[...]
+<!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="A sort 
order is defined by a sort order id and a list of sort fields. The order of the 
sort fields within the list defines the order in which the sort is applied to 
the data."><title>SortOrder in iceberg::spec - 
Rust</title><script>if(window.location.protocol!=="file:")document.head.inse 
[...]
     pub order_id: <a class="primitive" 
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html";>i64</a>,
     pub fields: <a class="struct" 
href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"; 
title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" 
href="struct.SortField.html" title="struct 
iceberg::spec::SortField">SortField</a>&gt;,
 }</code></pre><details class="toggle top-doc" open><summary 
class="hideme"><span>Expand description</span></summary><div 
class="docblock"><p>A sort order is defined by a sort order id and a list of 
sort fields.
 The order of the sort fields within the list defines the order in which the 
sort is applied to the data.</p>
 </div></details><h2 id="fields" class="fields section-header">Fields<a 
href="#fields" class="anchor">§</a></h2><span id="structfield.order_id" 
class="structfield section-header"><a href="#structfield.order_id" 
class="anchor field">§</a><code>order_id: <a class="primitive" 
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html";>i64</a></code></span><div
 class="docblock"><p>Identifier for SortOrder, order_id <code>0</code> is no 
sort order.</p>
 </div><span id="structfield.fields" class="structfield section-header"><a 
href="#structfield.fields" class="anchor field">§</a><code>fields: <a 
class="struct" 
href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"; 
title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" 
href="struct.SortField.html" title="struct 
iceberg::spec::SortField">SortField</a>&gt;</code></span><div 
class="docblock"><p>Details of the sort</p>
-</div><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-SortOrder" class="impl"><a class="src 
rightside" href="../../src/iceberg/spec/sort.rs.html#114-136">source</a><a 
href="#impl-SortOrder" class="anchor">§</a><h3 class="code-header">impl <a 
class="struct" href="struct.SortOrder.html" title="struct iceberg::spec::Sor 
[...]
+</div><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-SortOrder" class="impl"><a class="src 
rightside" href="../../src/iceberg/spec/sort.rs.html#114-144">source</a><a 
href="#impl-SortOrder" class="anchor">§</a><h3 class="code-header">impl <a 
class="struct" href="struct.SortOrder.html" title="struct iceberg::spec::Sor 
[...]
 </div></details><details class="toggle method-toggle" open><summary><section 
id="method.unsorted_order" class="method"><a class="src rightside" 
href="../../src/iceberg/spec/sort.rs.html#123-128">source</a><h4 
class="code-header">pub fn <a href="#method.unsorted_order" 
class="fn">unsorted_order</a>() -&gt; <a class="struct" 
href="struct.SortOrder.html" title="struct 
iceberg::spec::SortOrder">SortOrder</a></h4></section></summary><div 
class="docblock"><p>Create an unbound unsorted order</p>
 </div></details><details class="toggle method-toggle" open><summary><section 
id="method.is_unsorted" class="method"><a class="src rightside" 
href="../../src/iceberg/spec/sort.rs.html#133-135">source</a><h4 
class="code-header">pub fn <a href="#method.is_unsorted" 
class="fn">is_unsorted</a>(&amp;self) -&gt; <a class="primitive" 
href="https://doc.rust-lang.org/nightly/std/primitive.bool.html";>bool</a></h4></section></summary><div
 class="docblock"><p>Returns true if the sort order is unsorted.</p>
 <p>A <a href="struct.SortOrder.html" title="struct 
iceberg::spec::SortOrder"><code>SortOrder</code></a> is unsorted if it has no 
sort fields.</p>
+</div></details><details class="toggle method-toggle" open><summary><section 
id="method.with_order_id" class="method"><a class="src rightside" 
href="../../src/iceberg/spec/sort.rs.html#138-143">source</a><h4 
class="code-header">pub fn <a href="#method.with_order_id" 
class="fn">with_order_id</a>(self, order_id: <a class="primitive" 
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html";>i64</a>) -&gt; 
<a class="struct" href="struct.SortOrder.html" title="struct 
iceberg::spec::Sort [...]
 </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-Clone-for-SortOrder" class="impl"><a class="src rightside" 
href="../../src/iceberg/spec/sort.rs.html#99">source</a><a 
href="#impl-Clone-for-SortOrder" class="anchor">§</a><h3 
class="code-header">impl <a class [...]
     __D: <a class="trait" 
href="https://docs.rs/serde/1.0.210/serde/de/trait.Deserializer.html"; 
title="trait 
serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,</div></h4></section></summary><div
 class='docblock'>Deserialize this value from the given Serde deserializer. <a 
href="https://docs.rs/serde/1.0.210/serde/de/trait.Deserialize.html#tymethod.deserialize";>Read
 more</a></div></details></div></details><details class="toggle 
implementors-toggle" open><summary><section id="impl-Parti [...]
 by <code>==</code>.</div></details><details class="toggle method-toggle" 
open><summary><section id="method.ne" class="method trait-impl"><span 
class="rightside"><span class="since" title="Stable since Rust version 
1.0.0">1.0.0</span> · <a class="src" 
href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#263";>source</a></span><a
 href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a 
href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne";
 class= [...]
diff --git a/api/iceberg/spec/struct.SortOrderBuilder.html 
b/api/iceberg/spec/struct.SortOrderBuilder.html
index df6f2be2..59e0900c 100644
--- a/api/iceberg/spec/struct.SortOrderBuilder.html
+++ b/api/iceberg/spec/struct.SortOrderBuilder.html
@@ -3,8 +3,8 @@
 </div></details><details class="toggle method-toggle" open><summary><section 
id="method.with_fields" class="method"><a class="src rightside" 
href="../../src/iceberg/spec/sort.rs.html#99">source</a><h4 
class="code-header">pub fn <a href="#method.with_fields" 
class="fn">with_fields</a>(&amp;mut self, value: <a class="struct" 
href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"; 
title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" 
href="struct.SortField.html" title="stru [...]
 </div></details><details class="toggle method-toggle" open><summary><section 
id="method.with_sort_field" class="method"><a class="src rightside" 
href="../../src/iceberg/spec/sort.rs.html#99">source</a><h4 
class="code-header">pub fn <a href="#method.with_sort_field" 
class="fn">with_sort_field</a>&lt;VALUE&gt;(&amp;mut self, item: VALUE) -&gt; 
<a class="primitive" 
href="https://doc.rust-lang.org/nightly/std/primitive.reference.html";>&amp;mut 
Self</a><div class="where">where
     <a class="struct" 
href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"; 
title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" 
href="struct.SortField.html" title="struct 
iceberg::spec::SortField">SortField</a>&gt;: <a class="trait" 
href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html"; 
title="trait core::default::Default">Default</a> + <a class="trait" 
href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.Extend.html";
 title="trait  [...]
-</div></details></div></details><details class="toggle implementors-toggle" 
open><summary><section id="impl-SortOrderBuilder-1" class="impl"><a class="src 
rightside" href="../../src/iceberg/spec/sort.rs.html#138-204">source</a><a 
href="#impl-SortOrderBuilder-1" class="anchor">§</a><h3 
class="code-header">impl <a class="struct" href="struct.SortOrderBuilder.html" 
title="struct 
iceberg::spec::SortOrderBuilder">SortOrderBuilder</a></h3></section></summary><div
 class="impl-items"><details cl [...]
-</div></details><details class="toggle method-toggle" open><summary><section 
id="method.build" class="method"><a class="src rightside" 
href="../../src/iceberg/spec/sort.rs.html#163-166">source</a><h4 
class="code-header">pub fn <a href="#method.build" 
class="fn">build</a>(&amp;self, schema: <a class="struct" 
href="struct.Schema.html" title="struct iceberg::spec::Schema">Schema</a>) 
-&gt; <a class="type" href="../type.Result.html" title="type 
iceberg::Result">Result</a>&lt;<a class="struct [...]
+</div></details></div></details><details class="toggle implementors-toggle" 
open><summary><section id="impl-SortOrderBuilder-1" class="impl"><a class="src 
rightside" href="../../src/iceberg/spec/sort.rs.html#146-212">source</a><a 
href="#impl-SortOrderBuilder-1" class="anchor">§</a><h3 
class="code-header">impl <a class="struct" href="struct.SortOrderBuilder.html" 
title="struct 
iceberg::spec::SortOrderBuilder">SortOrderBuilder</a></h3></section></summary><div
 class="impl-items"><details cl [...]
+</div></details><details class="toggle method-toggle" open><summary><section 
id="method.build" class="method"><a class="src rightside" 
href="../../src/iceberg/spec/sort.rs.html#171-174">source</a><h4 
class="code-header">pub fn <a href="#method.build" 
class="fn">build</a>(&amp;self, schema: &amp;<a class="struct" 
href="struct.Schema.html" title="struct iceberg::spec::Schema">Schema</a>) 
-&gt; <a class="type" href="../type.Result.html" title="type 
iceberg::Result">Result</a>&lt;<a class="s [...]
 </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-Clone-for-SortOrderBuilder" class="impl"><a class="src rightside" 
href="../../src/iceberg/spec/sort.rs.html#99">source</a><a 
href="#impl-Clone-for-SortOrderBuilder" class="anchor">§</a><h3 
class="code-header" [...]
     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 313a1da4..7ea6ea2d 100644
--- a/api/search-index.js
+++ b/api/search-index.js
@@ -1,5 +1,5 @@
 var searchIndex = new Map(JSON.parse('[\
-["iceberg",{"t":"PPPPPKPPPPPFGPPPFFPPPPPPIPPPPPPFFFGGPPPFNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMQNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNCNMMMOONNNOOONOMNNNNNONOOMOCOONNNNONCOCMNNNNNNNNNNCCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMNNNNNNNNNNNNNCOOOOOOOOOOOOOOOOOOOOOOOOOFFKRRNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNMMMNMHMNNNNNNNNNNNNPPPPPPPPFKRGFIPPPPPPPPFPPPPPPPPPGGFPPFPIPPFNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
 [...]
+["iceberg",{"t":"PPPPPKPPPPPFGPPPFFPPPPPPIPPPPPPFFFGGPPPFNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMQNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNCNMMMOONNNOOONOMNNNNNONOOMOCOONNNNONCOCMNNNNNNNNNNCCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMMNNNNNNNNNNNNNCOOOOOOOOOOOOOOOOOOOOOOOOOFFKRRNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNMMMNMHMNNNNNNNNNNNNPPPPPPPPFKRGFIPPPPPPPPFPPPPPPPPPGGFPPFPIPPFNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
 [...]
 
["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 90017a7a..12dc286a 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/src/iceberg/spec/sort.rs.html 
b/api/src/iceberg/spec/sort.rs.html
index b662d2c0..bd88869f 100644
--- a/api/src/iceberg/spec/sort.rs.html
+++ b/api/src/iceberg/spec/sort.rs.html
@@ -479,6 +479,43 @@
 <a href="#479" id="479">479</a>
 <a href="#480" id="480">480</a>
 <a href="#481" id="481">481</a>
+<a href="#482" id="482">482</a>
+<a href="#483" id="483">483</a>
+<a href="#484" id="484">484</a>
+<a href="#485" id="485">485</a>
+<a href="#486" id="486">486</a>
+<a href="#487" id="487">487</a>
+<a href="#488" id="488">488</a>
+<a href="#489" id="489">489</a>
+<a href="#490" id="490">490</a>
+<a href="#491" id="491">491</a>
+<a href="#492" id="492">492</a>
+<a href="#493" id="493">493</a>
+<a href="#494" id="494">494</a>
+<a href="#495" id="495">495</a>
+<a href="#496" id="496">496</a>
+<a href="#497" id="497">497</a>
+<a href="#498" id="498">498</a>
+<a href="#499" id="499">499</a>
+<a href="#500" id="500">500</a>
+<a href="#501" id="501">501</a>
+<a href="#502" id="502">502</a>
+<a href="#503" id="503">503</a>
+<a href="#504" id="504">504</a>
+<a href="#505" id="505">505</a>
+<a href="#506" id="506">506</a>
+<a href="#507" id="507">507</a>
+<a href="#508" id="508">508</a>
+<a href="#509" id="509">509</a>
+<a href="#510" id="510">510</a>
+<a href="#511" id="511">511</a>
+<a href="#512" id="512">512</a>
+<a href="#513" id="513">513</a>
+<a href="#514" id="514">514</a>
+<a href="#515" id="515">515</a>
+<a href="#516" id="516">516</a>
+<a href="#517" id="517">517</a>
+<a href="#518" id="518">518</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
@@ -614,6 +651,14 @@
     </span><span class="kw">pub fn </span>is_unsorted(<span 
class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
         <span class="self">self</span>.fields.is_empty()
     }
+
+    <span class="doccomment">/// Set the order id for the sort order
+    </span><span class="kw">pub fn </span>with_order_id(<span 
class="self">self</span>, order_id: i64) -&gt; SortOrder {
+        SortOrder {
+            order_id,
+            fields: <span class="self">self</span>.fields,
+        }
+    }
 }
 
 <span class="kw">impl </span>SortOrderBuilder {
@@ -641,13 +686,13 @@
     }
 
     <span class="doccomment">/// Creates a new bound sort order.
-    </span><span class="kw">pub fn </span>build(<span 
class="kw-2">&amp;</span><span class="self">self</span>, schema: Schema) -&gt; 
<span class="prelude-ty">Result</span>&lt;SortOrder&gt; {
+    </span><span class="kw">pub fn </span>build(<span 
class="kw-2">&amp;</span><span class="self">self</span>, schema: <span 
class="kw-2">&amp;</span>Schema) -&gt; <span 
class="prelude-ty">Result</span>&lt;SortOrder&gt; {
         <span class="kw">let </span>unbound_sort_order = <span 
class="self">self</span>.build_unbound()<span class="question-mark">?</span>;
         SortOrderBuilder::check_compatibility(unbound_sort_order, schema)
     }
 
     <span class="doccomment">/// Returns the given sort order if it is 
compatible with the given schema
-    </span><span class="kw">fn </span>check_compatibility(sort_order: 
SortOrder, schema: Schema) -&gt; <span 
class="prelude-ty">Result</span>&lt;SortOrder&gt; {
+    </span><span class="kw">fn </span>check_compatibility(sort_order: 
SortOrder, schema: <span class="kw-2">&amp;</span>Schema) -&gt; <span 
class="prelude-ty">Result</span>&lt;SortOrder&gt; {
         <span class="kw">let </span>sort_fields = <span 
class="kw-2">&amp;</span>sort_order.fields;
         <span class="kw">for </span>sort_field <span class="kw">in 
</span>sort_fields {
             <span class="kw">match 
</span>schema.field_by_id(sort_field.source_id) {
@@ -771,6 +816,35 @@
         </span>)
     }
 
+    <span class="attr">#[test]
+    </span><span class="kw">fn 
</span>test_build_unbound_returns_correct_default_order_id_for_no_fields() {
+        <span class="macro">assert_eq!</span>(
+            SortOrder::builder()
+                .build_unbound()
+                .expect(<span class="string">"Expected an Ok value"</span>)
+                .order_id,
+            SortOrder::UNSORTED_ORDER_ID
+        )
+    }
+
+    <span class="attr">#[test]
+    </span><span class="kw">fn 
</span>test_build_unbound_returns_correct_default_order_id_for_fields() {
+        <span class="kw">let </span>sort_field = SortField::builder()
+            .source_id(<span class="number">2</span>)
+            .direction(SortDirection::Ascending)
+            .null_order(NullOrder::First)
+            .transform(Transform::Identity)
+            .build();
+        <span class="macro">assert_ne!</span>(
+            SortOrder::builder()
+                .with_sort_field(sort_field.clone())
+                .build_unbound()
+                .expect(<span class="string">"Expected an Ok value"</span>)
+                .order_id,
+            SortOrder::UNSORTED_ORDER_ID
+        )
+    }
+
     <span class="attr">#[test]
     </span><span class="kw">fn 
</span>test_build_unbound_should_return_unsorted_sort_order() {
         <span class="macro">assert_eq!</span>(
@@ -848,7 +922,7 @@
                     .transform(Transform::Identity)
                     .build(),
             )
-            .build(schema);
+            .build(<span class="kw-2">&amp;</span>schema);
 
         <span class="macro">assert_eq!</span>(
             sort_order_builder_result
@@ -887,7 +961,7 @@
                     .transform(Transform::Identity)
                     .build(),
             )
-            .build(schema);
+            .build(<span class="kw-2">&amp;</span>schema);
 
         <span class="macro">assert_eq!</span>(
             sort_order_builder_result
@@ -919,7 +993,7 @@
                     .transform(Transform::Year)
                     .build(),
             )
-            .build(schema);
+            .build(<span class="kw-2">&amp;</span>schema);
 
         <span class="macro">assert_eq!</span>(
             sort_order_builder_result
@@ -949,7 +1023,7 @@
 
         <span class="kw">let </span>sort_order_builder_result = 
SortOrder::builder()
             .with_sort_field(sort_field.clone())
-            .build(schema);
+            .build(<span class="kw-2">&amp;</span>schema);
 
         <span class="macro">assert_eq!</span>(
             sort_order_builder_result.expect(<span class="string">"Expected an 
Ok value"</span>),
diff --git a/api/src/iceberg_catalog_memory/catalog.rs.html 
b/api/src/iceberg_catalog_memory/catalog.rs.html
index 6969340d..95f098b5 100644
--- a/api/src/iceberg_catalog_memory/catalog.rs.html
+++ b/api/src/iceberg_catalog_memory/catalog.rs.html
@@ -2049,7 +2049,7 @@
         <span class="kw">let </span>expected_sorted_order = 
SortOrder::builder()
             .with_order_id(<span class="number">0</span>)
             .with_fields(<span class="macro">vec!</span>[])
-            .build(expected_schema.clone())
+            .build(expected_schema)
             .unwrap();
 
         <span class="macro">assert_eq!</span>(

Reply via email to