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 021afb1f deploy: e497fb12928b414f90eb6524128c12fed2901de7
021afb1f is described below
commit 021afb1f8f00250ad2bbc1dcd02e143ee98209cc
Author: liurenjie1024 <[email protected]>
AuthorDate: Fri Apr 18 11:48:12 2025 +0000
deploy: e497fb12928b414f90eb6524128c12fed2901de7
---
api/iceberg/spec/enum.ViewFormatVersion.html | 14 +--
api/iceberg/spec/struct.ViewMetadata.html | 2 +-
api/iceberg/spec/struct.ViewMetadataBuilder.html | 18 +--
api/iceberg/spec/struct.ViewVersionLog.html | 2 +-
api/src/iceberg/spec/view_metadata.rs.html | 14 ++-
api/src/iceberg/spec/view_metadata_builder.rs.html | 132 +++++++++++++++++++--
6 files changed, 156 insertions(+), 26 deletions(-)
diff --git a/api/iceberg/spec/enum.ViewFormatVersion.html
b/api/iceberg/spec/enum.ViewFormatVersion.html
index 7ac143aa..24f92f87 100644
--- a/api/iceberg/spec/enum.ViewFormatVersion.html
+++ b/api/iceberg/spec/enum.ViewFormatVersion.html
@@ -1,17 +1,17 @@
-<!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="Iceberg
format version"><title>ViewFormatVersion in iceberg::spec -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro
[...]
+<!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="Iceberg
format version"><title>ViewFormatVersion in iceberg::spec -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro
[...]
V1 = 1,
}</code></pre><details class="toggle top-doc" open><summary
class="hideme"><span>Expand description</span></summary><div
class="docblock"><p>Iceberg format version</p>
</div></details><h2 id="variants" class="variants section-header">Variants<a
href="#variants" class="anchor">§</a></h2><div class="variants"><section
id="variant.V1" class="variant"><a href="#variant.V1" class="anchor">§</a><h3
class="code-header">V1 = 1</h3></section><div class="docblock"><p>Iceberg view
spec version 1</p>
-</div></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-ViewFormatVersion" class="impl"><a
class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#367">Source</a><a
href="#impl-Clone-for-ViewFormatVersion" class="anchor">§</a><h3
class="code-header">impl <a class [...]
- D: <a class="trait"
href="https://docs.rs/serde/1.0.217/serde/de/trait.Deserializer.html"
title="trait
serde::de::Deserializer">Deserializer</a><'de>,</div></h4></section></summary><div
class='docblock'>Deserialize this value from the given Serde deserializer. <a
href="https://docs.rs/serde/1.0.217/serde/de/trait.Deserialize.html#tymethod.deserialize">Read
more</a></div></details></div></details><details class="toggle
implementors-toggle" open><summary><section id="impl-Display [...]
+</div></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-ViewFormatVersion" class="impl"><a
class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#373">Source</a><a
href="#impl-Clone-for-ViewFormatVersion" class="anchor">§</a><h3
class="code-header">impl <a class [...]
+ D: <a class="trait"
href="https://docs.rs/serde/1.0.217/serde/de/trait.Deserializer.html"
title="trait
serde::de::Deserializer">Deserializer</a><'de>,</div></h4></section></summary><div
class='docblock'>Deserialize this value from the given Serde deserializer. <a
href="https://docs.rs/serde/1.0.217/serde/de/trait.Deserialize.html#tymethod.deserialize">Read
more</a></div></details></div></details><details class="toggle
implementors-toggle" open><summary><section id="impl-Display [...]
Self: <a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"
title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div
class='docblock'>Compares and returns the maximum of two values. <a
href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read
more</a></div></details><details class="toggle method-toggle"
open><summary><section id="method.min" class="method trait-impl"><span
class="rightside"><span class="si [...]
Self: <a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"
title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div
class='docblock'>Compares and returns the minimum of two values. <a
href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read
more</a></div></details><details class="toggle method-toggle"
open><summary><section id="method.clamp" class="method trait-impl"><span
class="rightside"><span class=" [...]
- Self: <a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"
title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div
class='docblock'>Restrict a value to a certain interval. <a
href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read
more</a></div></details></div></details><details class="toggle
implementors-toggle" open><summary><section
id="impl-PartialEq-for-ViewFormatVersion" class="impl"><a class=" [...]
-and should not be overridden without very good
reason.</div></details></div></details><details class="toggle
implementors-toggle" open><summary><section
id="impl-PartialOrd-for-ViewFormatVersion" class="impl"><a class="src
rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#375-379">Source</a><a
href="#impl-PartialOrd-for-ViewFormatVersion" class="anchor">§</a><h3
class="code-header">impl <a class="trait"
href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" t [...]
+ Self: <a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"
title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div
class='docblock'>Restrict a value to a certain interval. <a
href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read
more</a></div></details></div></details><details class="toggle
implementors-toggle" open><summary><section
id="impl-PartialEq-for-ViewFormatVersion" class="impl"><a class=" [...]
+and should not be overridden without very good
reason.</div></details></div></details><details class="toggle
implementors-toggle" open><summary><section
id="impl-PartialOrd-for-ViewFormatVersion" class="impl"><a class="src
rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#381-385">Source</a><a
href="#impl-PartialOrd-for-ViewFormatVersion" class="anchor">§</a><h3
class="code-header">impl <a class="trait"
href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" t [...]
<code><=</code> operator. <a
href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read
more</a></div></details><details class="toggle method-toggle"
open><summary><section id="method.gt" 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#1371">Source</a></span><a
href="#method.gt" class="anchor">§</a><h4 clas [...]
operator. <a
href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read
more</a></div></details><details class="toggle method-toggle"
open><summary><section id="method.ge" 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#1389">Source</a></span><a
href="#method.ge" class="anchor">§</a><h4 class="code-header">fn [...]
-the <code>>=</code> operator. <a
href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read
more</a></div></details></div></details><details class="toggle
implementors-toggle" open><summary><section
id="impl-Serialize-for-ViewFormatVersion" class="impl"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#367">Source</a><a
href="#impl-Serialize-for-ViewFormatVersion" class="anchor">§</a><h3
class="code-header">impl <a class="trait" hr [...]
- S: <a class="trait"
href="https://docs.rs/serde/1.0.217/serde/ser/trait.Serializer.html"
title="trait
serde::ser::Serializer">Serializer</a>,</div></h4></section></summary><div
class='docblock'>Serialize this value into the given Serde serializer. <a
href="https://docs.rs/serde/1.0.217/serde/ser/trait.Serialize.html#tymethod.serialize">Read
more</a></div></details></div></details><section
id="impl-Copy-for-ViewFormatVersion" class="impl"><a class="src rightside"
href="../../src/icebe [...]
+the <code>>=</code> operator. <a
href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read
more</a></div></details></div></details><details class="toggle
implementors-toggle" open><summary><section
id="impl-Serialize-for-ViewFormatVersion" class="impl"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#373">Source</a><a
href="#impl-Serialize-for-ViewFormatVersion" class="anchor">§</a><h3
class="code-header">impl <a class="trait" hr [...]
+ S: <a class="trait"
href="https://docs.rs/serde/1.0.217/serde/ser/trait.Serializer.html"
title="trait
serde::ser::Serializer">Serializer</a>,</div></h4></section></summary><div
class='docblock'>Serialize this value into the given Serde serializer. <a
href="https://docs.rs/serde/1.0.217/serde/ser/trait.Serialize.html#tymethod.serialize">Read
more</a></div></details></div></details><section
id="impl-Copy-for-ViewFormatVersion" class="impl"><a class="src rightside"
href="../../src/icebe [...]
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/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:/ [...]
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#218">Source</a><a
href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a
href= [...]
diff --git a/api/iceberg/spec/struct.ViewMetadata.html
b/api/iceberg/spec/struct.ViewMetadata.html
index 747dd531..7592246d 100644
--- a/api/iceberg/spec/struct.ViewMetadata.html
+++ b/api/iceberg/spec/struct.ViewMetadata.html
@@ -19,7 +19,7 @@ We check the validity of this data structure when
constructing.</p>
</div></details><details class="toggle method-toggle" open><summary><section
id="method.history" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#160-162">Source</a><h4
class="code-header">pub fn <a href="#method.history"
class="fn">history</a>(&self) -> &[<a class="struct"
href="struct.ViewVersionLog.html" title="struct
iceberg::spec::ViewVersionLog">ViewVersionLog</a>]</h4></section></summary><div
class="docblock"><p>Returns view his [...]
</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-ViewMetadata" class="impl"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#53">Source</a><a
href="#impl-Clone-for-ViewMetadata" class="anchor">§</a><h3 class="code-header
[...]
__D: <a class="trait"
href="https://docs.rs/serde/1.0.217/serde/de/trait.Deserializer.html"
title="trait
serde::de::Deserializer">Deserializer</a><'de>,</div></h4></section></summary><div
class='docblock'>Deserialize this value from the given Serde deserializer. <a
href="https://docs.rs/serde/1.0.217/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 [...]
-and should not be overridden without very good
reason.</div></details></div></details><details class="toggle
implementors-toggle" open><summary><section
id="impl-Serialize-for-ViewMetadata" class="impl"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#271-280">Source</a><a
href="#impl-Serialize-for-ViewMetadata" class="anchor">§</a><h3
class="code-header">impl <a class="trait"
href="https://docs.rs/serde/1.0.217/serde/ser/trait.Serialize.html"
title="trait serd [...]
+and should not be overridden without very good
reason.</div></details></div></details><details class="toggle
implementors-toggle" open><summary><section
id="impl-Serialize-for-ViewMetadata" class="impl"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#277-286">Source</a><a
href="#impl-Serialize-for-ViewMetadata" class="anchor">§</a><h3
class="code-header">impl <a class="trait"
href="https://docs.rs/serde/1.0.217/serde/ser/trait.Serialize.html"
title="trait serd [...]
S: <a class="trait"
href="https://docs.rs/serde/1.0.217/serde/ser/trait.Serializer.html"
title="trait
serde::ser::Serializer">Serializer</a>,</div></h4></section></summary><div
class='docblock'>Serialize this value into the given Serde serializer. <a
href="https://docs.rs/serde/1.0.217/serde/ser/trait.Serialize.html#tymethod.serialize">Read
more</a></div></details></div></details><section id="impl-Eq-for-ViewMetadata"
class="impl"><a class="src rightside" href="../../src/iceberg/spec [...]
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/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/iceberg/spec/struct.ViewMetadataBuilder.html
b/api/iceberg/spec/struct.ViewMetadataBuilder.html
index bc47a343..96d89951 100644
--- a/api/iceberg/spec/struct.ViewMetadataBuilder.html
+++ b/api/iceberg/spec/struct.ViewMetadataBuilder.html
@@ -4,7 +4,7 @@ All operations applied to the <code>ViewMetadata</code> are
tracked in <code>cha
ordered vec of <code>ViewUpdate</code>.
If an operation does not lead to a change of the <code>ViewMetadata</code>,
the corresponding update
is omitted from <code>changes</code>.</p>
-</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-ViewMetadataBuilder"
class="impl"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#65-550">Source</a><a
href="#impl-ViewMetadataBuilder" class="anchor">§</a><h3
class="code-header">impl <a class="struct" href="struct.Vi [...]
+</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-ViewMetadataBuilder"
class="impl"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#65-561">Source</a><a
href="#impl-ViewMetadataBuilder" class="anchor">§</a><h3
class="code-header">impl <a class="struct" href="struct.Vi [...]
location: <a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>,
schema: <a class="struct" href="struct.Schema.html" title="struct
iceberg::spec::Schema">Schema</a>,
view_version: <a class="struct" href="struct.ViewVersion.html"
title="struct iceberg::spec::ViewVersion">ViewVersion</a>,
@@ -22,29 +22,29 @@ is omitted from <code>changes</code>.</p>
<li>Cannot downgrade to older format versions.</li>
</ul>
</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_location" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#166-176">Source</a><h4
class="code-header">pub fn <a href="#method.set_location"
class="fn">set_location</a>(self, location: <a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>) -> Self</h4></section><
[...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_current_version_id" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#183-225">Source</a><h4
class="code-header">pub fn <a href="#method.set_current_version_id"
class="fn">set_current_version_id</a>(self, version_id: <a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) ->
<a class="type" href="../type.Resu [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_current_version_id" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#183-238">Source</a><h4
class="code-header">pub fn <a href="#method.set_current_version_id"
class="fn">set_current_version_id</a>(self, version_id: <a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) ->
<a class="type" href="../type.Resu [...]
<h5 id="errors-1"><a class="doc-anchor" href="#errors-1">§</a>Errors</h5>
<ul>
<li>The specified <code>version_id</code> does not exist.</li>
<li>The specified <code>version_id</code> is <code>-1</code> but no version
has been added.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_current_version" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#228-237">Source</a><h4
class="code-header">pub fn <a href="#method.set_current_version"
class="fn">set_current_version</a>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_current_version" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#241-250">Source</a><h4
class="code-header">pub fn <a href="#method.set_current_version"
class="fn">set_current_version</a>(
self,
view_version: <a class="struct" href="struct.ViewVersion.html"
title="struct iceberg::spec::ViewVersion">ViewVersion</a>,
schema: <a class="struct" href="struct.Schema.html" title="struct
iceberg::spec::Schema">Schema</a>,
) -> <a class="type" href="../type.Result.html" title="type
iceberg::Result">Result</a><Self></h4></section></summary><div
class="docblock"><p>Add a new view version and set it as current.</p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_version" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#245-249">Source</a><h4
class="code-header">pub fn <a href="#method.add_version"
class="fn">add_version</a>(self, view_version: <a class="struct"
href="struct.ViewVersion.html" title="struct
iceberg::spec::ViewVersion">ViewVersion</a>) -> <a class="type"
href="../type.Result.html" title="t [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_version" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#258-262">Source</a><h4
class="code-header">pub fn <a href="#method.add_version"
class="fn">add_version</a>(self, view_version: <a class="struct"
href="struct.ViewVersion.html" title="struct
iceberg::spec::ViewVersion">ViewVersion</a>) -> <a class="type"
href="../type.Result.html" title="t [...]
<h5 id="errors-2"><a class="doc-anchor" href="#errors-2">§</a>Errors</h5>
<ul>
<li>The schema ID of the version is set to <code>-1</code>, but no schema has
been added.</li>
<li>The schema ID of the specified version is unknown.</li>
<li>Multiple queries for the same dialect are added.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_schema" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#356-360">Source</a><h4
class="code-header">pub fn <a href="#method.add_schema"
class="fn">add_schema</a>(self, schema: <a class="struct"
href="struct.Schema.html" title="struct iceberg::spec::Schema">Schema</a>)
-> Self</h4></section></summary><div class="docblock"><p>Add a new schema to
t [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_properties" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#412-435">Source</a><h4
class="code-header">pub fn <a href="#method.set_properties"
class="fn">set_properties</a>(self, updates: <a class="struct"
href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html"
title="struct std::collections::hash::map::HashMap">HashM [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_properties" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#438-452">Source</a><h4
class="code-header">pub fn <a href="#method.remove_properties"
class="fn">remove_properties</a>(self, removals: &[<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>]) -> [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.assign_uuid" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#455-462">Source</a><h4
class="code-header">pub fn <a href="#method.assign_uuid"
class="fn">assign_uuid</a>(self, uuid: <a class="struct"
href="https://docs.rs/uuid/1.16.0/uuid/struct.Uuid.html" title="struct
uuid::Uuid">Uuid</a>) -> Self</h4></section></summary><div
class="docblock"><p>As [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.build" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#465-490">Source</a><h4
class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self)
-> <a class="type" href="../type.Result.html" title="type
iceberg::Result">Result</a><ViewMetadataBuildResult></h4></section></summary><div
class="docblock"><p>Build the <code>ViewMetadata [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_schema" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#367-371">Source</a><h4
class="code-header">pub fn <a href="#method.add_schema"
class="fn">add_schema</a>(self, schema: <a class="struct"
href="struct.Schema.html" title="struct iceberg::spec::Schema">Schema</a>)
-> Self</h4></section></summary><div class="docblock"><p>Add a new schema to
t [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_properties" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#423-446">Source</a><h4
class="code-header">pub fn <a href="#method.set_properties"
class="fn">set_properties</a>(self, updates: <a class="struct"
href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html"
title="struct std::collections::hash::map::HashMap">HashM [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_properties" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#449-463">Source</a><h4
class="code-header">pub fn <a href="#method.remove_properties"
class="fn">remove_properties</a>(self, removals: &[<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>]) -> [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.assign_uuid" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#466-473">Source</a><h4
class="code-header">pub fn <a href="#method.assign_uuid"
class="fn">assign_uuid</a>(self, uuid: <a class="struct"
href="https://docs.rs/uuid/1.16.0/uuid/struct.Uuid.html" title="struct
uuid::Uuid">Uuid</a>) -> Self</h4></section></summary><div
class="docblock"><p>As [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.build" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#476-501">Source</a><h4
class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self)
-> <a class="type" href="../type.Result.html" title="type
iceberg::Result">Result</a><ViewMetadataBuildResult></h4></section></summary><div
class="docblock"><p>Build the <code>ViewMetadata [...]
</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-ViewMetadataBuilder" class="impl"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata_builder.rs.html#44">Source</a><a
href="#impl-Clone-for-ViewMetadataBuilder" class="anchor">§</a> [...]
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/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/iceberg/spec/struct.ViewVersionLog.html
b/api/iceberg/spec/struct.ViewVersionLog.html
index b4e5a604..3a7c6a3e 100644
--- a/api/iceberg/spec/struct.ViewVersionLog.html
+++ b/api/iceberg/spec/struct.ViewVersionLog.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="A log of
when each snapshot was made."><title>ViewVersionLog in iceberg::spec -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,S
[...]
-</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-ViewVersionLog"
class="impl"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#206-232">Source</a><a
href="#impl-ViewVersionLog" class="anchor">§</a><h3 class="code-header">impl <a
class="struct" href="struct.ViewVersionLog.html [...]
+</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-ViewVersionLog"
class="impl"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#206-238">Source</a><a
href="#impl-ViewVersionLog" class="anchor">§</a><h3 class="code-header">impl <a
class="struct" href="struct.ViewVersionLog.html [...]
</div></details><details class="toggle method-toggle" open><summary><section
id="method.version_id" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#218-220">Source</a><h4
class="code-header">pub fn <a href="#method.version_id"
class="fn">version_id</a>(&self) -> <a class="type"
href="type.ViewVersionId.html" title="type
iceberg::spec::ViewVersionId">ViewVersionId</a></h4></section></summary><div
class="docblock"><p>Returns the version id.</p>
</div></details><details class="toggle method-toggle" open><summary><section
id="method.timestamp_ms" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#224-226">Source</a><h4
class="code-header">pub fn <a href="#method.timestamp_ms"
class="fn">timestamp_ms</a>(&self) -> <a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div
class="docblock"><p>Returns the timestamp in millis [...]
</div></details><details class="toggle method-toggle" open><summary><section
id="method.timestamp" class="method"><a class="src rightside"
href="../../src/iceberg/spec/view_metadata.rs.html#229-231">Source</a><h4
class="code-header">pub fn <a href="#method.timestamp"
class="fn">timestamp</a>(&self) -> <a class="type"
href="../type.Result.html" title="type iceberg::Result">Result</a><<a
class="struct"
href="https://docs.rs/chrono/latest/chrono/datetime/struct.DateTime.html" titl
[...]
diff --git a/api/src/iceberg/spec/view_metadata.rs.html
b/api/src/iceberg/spec/view_metadata.rs.html
index d4710242..e75367e8 100644
--- a/api/src/iceberg/spec/view_metadata.rs.html
+++ b/api/src/iceberg/spec/view_metadata.rs.html
@@ -697,7 +697,13 @@
<a href="#696" id="696">696</a>
<a href="#697" id="697">697</a>
<a href="#698" id="698">698</a>
-<a href="#699" id="699">699</a></pre></div><pre class="rust"><code><span
class="comment">// Licensed to the Apache Software Foundation (ASF) under one
+<a href="#699" id="699">699</a>
+<a href="#700" id="700">700</a>
+<a href="#701" id="701">701</a>
+<a href="#702" id="702">702</a>
+<a href="#703" id="703">703</a>
+<a href="#704" id="704">704</a>
+<a href="#705" id="705">705</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
// regarding copyright ownership. The ASF licenses this file
@@ -928,6 +934,12 @@
</span><span class="kw">pub fn </span>timestamp(<span
class="kw-2">&</span><span class="self">self</span>) -> <span
class="prelude-ty">Result</span><DateTime<Utc>> {
timestamp_ms_to_utc(<span class="self">self</span>.timestamp_ms)
}
+
+ <span class="doccomment">/// Update the timestamp of this version log.
+ </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span
class="kw">fn </span>set_timestamp_ms(<span class="kw-2">&mut </span><span
class="self">self</span>, timestamp_ms: i64) -> <span class="kw-2">&mut
</span><span class="self">Self </span>{
+ <span class="self">self</span>.timestamp_ms = timestamp_ms;
+ <span class="self">self
+ </span>}
}
<span class="kw">pub</span>(<span class="kw">super</span>) <span
class="kw">mod </span>_serde {
diff --git a/api/src/iceberg/spec/view_metadata_builder.rs.html
b/api/src/iceberg/spec/view_metadata_builder.rs.html
index fa991a48..96e6b1ff 100644
--- a/api/src/iceberg/spec/view_metadata_builder.rs.html
+++ b/api/src/iceberg/spec/view_metadata_builder.rs.html
@@ -1599,7 +1599,66 @@
<a href="#1598" id="1598">1598</a>
<a href="#1599" id="1599">1599</a>
<a href="#1600" id="1600">1600</a>
-<a href="#1601" id="1601">1601</a></pre></div><pre class="rust"><code><span
class="comment">// Licensed to the Apache Software Foundation (ASF) under one
+<a href="#1601" id="1601">1601</a>
+<a href="#1602" id="1602">1602</a>
+<a href="#1603" id="1603">1603</a>
+<a href="#1604" id="1604">1604</a>
+<a href="#1605" id="1605">1605</a>
+<a href="#1606" id="1606">1606</a>
+<a href="#1607" id="1607">1607</a>
+<a href="#1608" id="1608">1608</a>
+<a href="#1609" id="1609">1609</a>
+<a href="#1610" id="1610">1610</a>
+<a href="#1611" id="1611">1611</a>
+<a href="#1612" id="1612">1612</a>
+<a href="#1613" id="1613">1613</a>
+<a href="#1614" id="1614">1614</a>
+<a href="#1615" id="1615">1615</a>
+<a href="#1616" id="1616">1616</a>
+<a href="#1617" id="1617">1617</a>
+<a href="#1618" id="1618">1618</a>
+<a href="#1619" id="1619">1619</a>
+<a href="#1620" id="1620">1620</a>
+<a href="#1621" id="1621">1621</a>
+<a href="#1622" id="1622">1622</a>
+<a href="#1623" id="1623">1623</a>
+<a href="#1624" id="1624">1624</a>
+<a href="#1625" id="1625">1625</a>
+<a href="#1626" id="1626">1626</a>
+<a href="#1627" id="1627">1627</a>
+<a href="#1628" id="1628">1628</a>
+<a href="#1629" id="1629">1629</a>
+<a href="#1630" id="1630">1630</a>
+<a href="#1631" id="1631">1631</a>
+<a href="#1632" id="1632">1632</a>
+<a href="#1633" id="1633">1633</a>
+<a href="#1634" id="1634">1634</a>
+<a href="#1635" id="1635">1635</a>
+<a href="#1636" id="1636">1636</a>
+<a href="#1637" id="1637">1637</a>
+<a href="#1638" id="1638">1638</a>
+<a href="#1639" id="1639">1639</a>
+<a href="#1640" id="1640">1640</a>
+<a href="#1641" id="1641">1641</a>
+<a href="#1642" id="1642">1642</a>
+<a href="#1643" id="1643">1643</a>
+<a href="#1644" id="1644">1644</a>
+<a href="#1645" id="1645">1645</a>
+<a href="#1646" id="1646">1646</a>
+<a href="#1647" id="1647">1647</a>
+<a href="#1648" id="1648">1648</a>
+<a href="#1649" id="1649">1649</a>
+<a href="#1650" id="1650">1650</a>
+<a href="#1651" id="1651">1651</a>
+<a href="#1652" id="1652">1652</a>
+<a href="#1653" id="1653">1653</a>
+<a href="#1654" id="1654">1654</a>
+<a href="#1655" id="1655">1655</a>
+<a href="#1656" id="1656">1656</a>
+<a href="#1657" id="1657">1657</a>
+<a href="#1658" id="1658">1658</a>
+<a href="#1659" id="1659">1659</a>
+<a href="#1660" id="1660">1660</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
// regarding copyright ownership. The ASF licenses this file
@@ -1820,7 +1879,20 @@
});
}
- <span class="self">self</span>.history_entry = <span
class="prelude-val">Some</span>(version.log());
+ <span class="comment">// Use the timestamp of the snapshot if it was
added in this set of changes,
+ // otherwise use a current timestamp for the log. The view version was
added
+ // by a past transaction.
+ </span><span class="kw">let </span>version_added_in_this_changes =
<span class="self">self
+ </span>.changes
+ .iter()
+ .any(|update| <span class="macro">matches!</span>(update,
ViewUpdate::AddViewVersion { view_version } <span class="kw">if
</span>view_version.version_id() == version_id));
+
+ <span class="kw">let </span><span class="kw-2">mut </span>log =
version.log();
+ <span class="kw">if </span>!version_added_in_this_changes {
+ log.set_timestamp_ms(Utc::now().timestamp_millis());
+ }
+
+ <span class="self">self</span>.history_entry = <span
class="prelude-val">Some</span>(log);
<span class="prelude-val">Ok</span>(<span class="self">self</span>)
}
@@ -1858,9 +1930,8 @@
// in this case. I prefer to add changes as the state of the
builder is
// potentially mutated (`last_added_version_id`), thus we should
record the change.
</span><span class="kw">if </span><span
class="self">self</span>.last_added_version_id != <span
class="prelude-val">Some</span>(version_id) {
- <span
class="self">self</span>.changes.push(ViewUpdate::AddViewVersion {
- view_version: view_version.with_version_id(version_id),
- });
+ <span class="self">self</span>.changes
+ .push(ViewUpdate::AddViewVersion { view_version });
<span class="self">self</span>.last_added_version_id = <span
class="prelude-val">Some</span>(version_id);
}
<span class="kw">return </span><span
class="prelude-val">Ok</span>(version_id);
@@ -1894,8 +1965,7 @@
require_unique_dialects(<span
class="kw-2">&</span>view_version)<span class="question-mark">?</span>;
- <span class="comment">// ToDo Discuss: This check is not present in
Java.
- // The `TableMetadataBuilder` uses these checks in multiple places -
also in Java.
+ <span class="comment">// The `TableMetadataBuilder` uses these checks
in multiple places - also in Java.
// If we think delayed requests are a problem, I think we should also
add it here.
</span><span class="kw">if let </span><span
class="prelude-val">Some</span>(last) = <span
class="self">self</span>.metadata.version_log.last() {
<span class="comment">// commits can happen concurrently from
different machines.
@@ -2453,6 +2523,54 @@
);
}
+ <span class="attr">#[test]
+ </span><span class="kw">fn </span>test_use_previously_added_version() {
+ <span class="kw">let </span>v2 = new_view_version(<span
class="number">2</span>, <span class="number">1</span>, <span
class="string">"select 1 as count"</span>);
+ <span class="kw">let </span>v3 = new_view_version(<span
class="number">3</span>, <span class="number">1</span>, <span
class="string">"select count(1) as count from t2"</span>);
+ <span class="kw">let </span>schema =
Schema::builder().build().unwrap();
+
+ <span class="kw">let </span>log_v2 = ViewVersionLog::new(<span
class="number">2</span>, v2.timestamp_ms());
+ <span class="kw">let </span>log_v3 = ViewVersionLog::new(<span
class="number">3</span>, v3.timestamp_ms());
+
+ <span class="kw">let </span>metadata_v2 = builder_without_changes()
+ .set_current_version(v2.clone(), schema.clone())
+ .unwrap()
+ .build()
+ .unwrap()
+ .metadata;
+
+ <span class="comment">// Log should use the exact timestamp of v1
+ </span><span
class="macro">assert_eq!</span>(metadata_v2.version_log.last().unwrap(), <span
class="kw-2">&</span>log_v2);
+
+ <span class="comment">// Add second version, should use exact
timestamp of v2
+ </span><span class="kw">let </span>metadata_v3 = metadata_v2
+ .into_builder()
+ .set_current_version(v3.clone(), schema)
+ .unwrap()
+ .build()
+ .unwrap()
+ .metadata;
+
+ <span class="macro">assert_eq!</span>(metadata_v3.version_log[<span
class="number">1</span>..], <span class="macro">vec!</span>[
+ log_v2.clone(),
+ log_v3.clone()
+ ]);
+
+ <span class="comment">// Re-use Version 1, add a new log entry with a
new timestamp
+ </span><span class="kw">let </span>metadata_v4 = metadata_v3
+ .into_builder()
+ .set_current_version_id(<span class="number">2</span>)
+ .unwrap()
+ .build()
+ .unwrap()
+ .metadata;
+
+ <span class="comment">// Last entry should be equal to v2 but with an
updated timestamp
+ </span><span class="kw">let </span>entry =
metadata_v4.version_log.last().unwrap();
+ <span class="macro">assert_eq!</span>(entry.version_id(), <span
class="number">2</span>);
+ <span class="macro">assert!</span>(entry.timestamp_ms() >
v2.timestamp_ms());
+ }
+
<span class="attr">#[test]
</span><span class="kw">fn </span>test_assign_uuid() {
<span class="kw">let </span>builder = builder_without_changes();