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 25a7cb88 deploy: c6cf0e98c49c3c27241a11883f053084927225bf
25a7cb88 is described below
commit 25a7cb88342b627e5e5f2c37dc65614ff7c1db58
Author: liurenjie1024 <[email protected]>
AuthorDate: Thu Feb 20 03:02:16 2025 +0000
deploy: c6cf0e98c49c3c27241a11883f053084927225bf
---
api/help.html | 2 +-
api/iceberg/spec/struct.TableMetadata.html | 2 +-
.../spec/struct.TableMetadataBuildResult.html | 6 +-
api/iceberg/spec/struct.TableMetadataBuilder.html | 58 ++++++------
api/settings.html | 2 +-
.../iceberg/spec/table_metadata_builder.rs.html | 102 +++++++++++++++++++--
6 files changed, 127 insertions(+), 45 deletions(-)
diff --git a/api/help.html b/api/help.html
index 21943ce1..b3855f23 100644
--- a/api/help.html
+++ b/api/help.html
@@ -1 +1 @@
-<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta
name="viewport" content="width=device-width, initial-scale=1.0"><meta
name="generator" content="rustdoc"><meta name="description"
content="Documentation for
Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-5
[...]
\ No newline at end of file
+<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta
name="viewport" content="width=device-width, initial-scale=1.0"><meta
name="generator" content="rustdoc"><meta name="description"
content="Documentation for
Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-5
[...]
\ No newline at end of file
diff --git a/api/iceberg/spec/struct.TableMetadata.html
b/api/iceberg/spec/struct.TableMetadata.html
index cc5ebb6f..8a8f2104 100644
--- a/api/iceberg/spec/struct.TableMetadata.html
+++ b/api/iceberg/spec/struct.TableMetadata.html
@@ -56,7 +56,7 @@ Returns an option if the <code>ref_name</code> is not
found</p>
) -> <a class="enum"
href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"
title="enum core::option::Option">Option</a><&<a class="struct"
href="struct.PartitionStatisticsFile.html" title="struct
iceberg::spec::PartitionStatisticsFile">PartitionStatisticsFile</a>></h4></section></summary><div
class="docblock"><p>Get a partition statistics file for a snapshot id.</p>
</div></details><details class="toggle method-toggle" open><summary><section
id="method.append_snapshot" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata.rs.html#406-426">source</a><h4
class="code-header">pub fn <a href="#method.append_snapshot"
class="fn">append_snapshot</a>(&mut self, snapshot: <a class="struct"
href="struct.Snapshot.html" title="struct
iceberg::spec::Snapshot">Snapshot</a>)</h4></section><span
class="item-info"><div class="stab d [...]
</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-TableMetadata" class="impl"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata.rs.html#100">source</a><a
href="#impl-Clone-for-TableMetadata" class="anchor">§</a><h3 class="code-he
[...]
- __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-From% [...]
+ __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-From% [...]
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= [...]
sufficient, 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-TableMetadata" class="impl"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata.rs.html#745-754">source</a><a
href="#impl-Serialize-for-TableMetadata" class="anchor">§</a><h3
class="code-header">impl <a class="trait"
href="https://docs.rs/serde/1.0.217/serde/ser/trait.Serialize.html" ti [...]
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-TableMetadata" class="impl"><a class="src rightside"
href="../../src/iceberg/spe [...]
diff --git a/api/iceberg/spec/struct.TableMetadataBuildResult.html
b/api/iceberg/spec/struct.TableMetadataBuildResult.html
index 6b6eaa91..c3f721e2 100644
--- a/api/iceberg/spec/struct.TableMetadataBuildResult.html
+++ b/api/iceberg/spec/struct.TableMetadataBuildResult.html
@@ -1,4 +1,4 @@
-<!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="Result of
modifying or creating a `TableMetadata`."><title>TableMetadataBuildResult in
iceberg::spec -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd
[...]
+<!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="Result of
modifying or creating a `TableMetadata`."><title>TableMetadataBuildResult in
iceberg::spec -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd
[...]
pub metadata: <a class="struct" href="struct.TableMetadata.html"
title="struct iceberg::spec::TableMetadata">TableMetadata</a>,
pub changes: <a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"
title="struct alloc::vec::Vec">Vec</a><<a class="enum"
href="../enum.TableUpdate.html" title="enum
iceberg::TableUpdate">TableUpdate</a>>,
pub expired_metadata_logs: <a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"
title="struct alloc::vec::Vec">Vec</a><<a class="struct"
href="struct.MetadataLog.html" title="struct
iceberg::spec::MetadataLog">MetadataLog</a>>,
@@ -6,9 +6,9 @@
</div></details><h2 id="fields" class="fields section-header">Fields<a
href="#fields" class="anchor">§</a></h2><span id="structfield.metadata"
class="structfield section-header"><a href="#structfield.metadata"
class="anchor field">§</a><code>metadata: <a class="struct"
href="struct.TableMetadata.html" title="struct
iceberg::spec::TableMetadata">TableMetadata</a></code></span><div
class="docblock"><p>The new <code>TableMetadata</code>.</p>
</div><span id="structfield.changes" class="structfield section-header"><a
href="#structfield.changes" class="anchor field">§</a><code>changes: <a
class="struct"
href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"
title="struct alloc::vec::Vec">Vec</a><<a class="enum"
href="../enum.TableUpdate.html" title="enum
iceberg::TableUpdate">TableUpdate</a>></code></span><div
class="docblock"><p>The changes that were applied to the metadata.</p>
</div><span id="structfield.expired_metadata_logs" class="structfield
section-header"><a href="#structfield.expired_metadata_logs" class="anchor
field">§</a><code>expired_metadata_logs: <a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"
title="struct alloc::vec::Vec">Vec</a><<a class="struct"
href="struct.MetadataLog.html" title="struct
iceberg::spec::MetadataLog">MetadataLog</a>></code></span><div
class="docblock"><p>Expired metadata logs</p>
-</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-TableMetadataBuildResult"
class="impl"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#59">source</a><a
href="#impl-Clone-for-TableMetadataBuildResult" class="anchor">§</a><h3
class="code-heade [...]
+</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-TableMetadataBuildResult"
class="impl"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#60">source</a><a
href="#impl-Clone-for-TableMetadataBuildResult" class="anchor">§</a><h3
class="code-heade [...]
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= [...]
-sufficient, and should not be overridden without very good
reason.</div></details></div></details><section
id="impl-StructuralPartialEq-for-TableMetadataBuildResult" class="impl"><a
class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#59">source</a><a
href="#impl-StructuralPartialEq-for-TableMetadataBuildResult"
class="anchor">§</a><h3 class="code-header">impl <a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html"
[...]
+sufficient, and should not be overridden without very good
reason.</div></details></div></details><section
id="impl-StructuralPartialEq-for-TableMetadataBuildResult" class="impl"><a
class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#60">source</a><a
href="#impl-StructuralPartialEq-for-TableMetadataBuildResult"
class="anchor">§</a><h3 class="code-header">impl <a class="trait"
href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.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:/ [...]
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/spec/struct.TableMetadataBuilder.html
b/api/iceberg/spec/struct.TableMetadataBuilder.html
index 8fecde8d..88233a7e 100644
--- a/api/iceberg/spec/struct.TableMetadataBuilder.html
+++ b/api/iceberg/spec/struct.TableMetadataBuilder.html
@@ -1,4 +1,4 @@
-<!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="Manipulating table metadata."><title>TableMetadataBuilder in
iceberg::spec -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9
[...]
+<!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="Manipulating table metadata."><title>TableMetadataBuilder in
iceberg::spec -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9
[...]
<p>For this builder the order of called functions matters. Functions are
applied in-order.
All operations applied to the <code>TableMetadata</code> are tracked in
<code>changes</code> as a chronologically
ordered vec of <code>TableUpdate</code>.
@@ -10,8 +10,8 @@ Some basic rules:</p>
<li><code>add_schema</code> must be called before
<code>set_current_schema</code>.</li>
<li>If a new partition spec and schema are added, the schema should be added
first.</li>
</ul>
-</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-TableMetadataBuilder"
class="impl"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#70-1203">source</a><a
href="#impl-TableMetadataBuilder" class="anchor">§</a><h3
class="code-header">impl <a class="struct" href="struc [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.new" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#78-136">source</a><h4
class="code-header">pub fn <a href="#method.new" class="fn">new</a>(
+</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-TableMetadataBuilder"
class="impl"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#71-1214">source</a><a
href="#impl-TableMetadataBuilder" class="anchor">§</a><h3
class="code-header">impl <a class="struct" href="struc [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.new" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#79-138">source</a><h4
class="code-header">pub fn <a href="#method.new" class="fn">new</a>(
schema: <a class="struct" href="struct.Schema.html" title="struct
iceberg::spec::Schema">Schema</a>,
spec: impl <a class="trait"
href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"
title="trait core::convert::Into">Into</a><<a class="struct"
href="struct.UnboundPartitionSpec.html" title="struct
iceberg::spec::UnboundPartitionSpec">UnboundPartitionSpec</a>>,
sort_order: <a class="struct" href="struct.SortOrder.html" title="struct
iceberg::spec::SortOrder">SortOrder</a>,
@@ -21,7 +21,7 @@ Some basic rules:</p>
) -> <a class="type" href="../type.Result.html" title="type
iceberg::Result">Result</a><Self></h4></section></summary><div
class="docblock"><p>Create a <code>TableMetadata</code> object from scratch.</p>
<p>This method re-assign ids of fields in the schema, schema.id, sort_order.id
and
spec.id. It should only be used to create new table metadata from scratch.</p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.new_from_metadata" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#145-160">source</a><h4
class="code-header">pub fn <a href="#method.new_from_metadata"
class="fn">new_from_metadata</a>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.new_from_metadata" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#147-163">source</a><h4
class="code-header">pub fn <a href="#method.new_from_metadata"
class="fn">new_from_metadata</a>(
previous: <a class="struct" href="struct.TableMetadata.html" title="struct
iceberg::spec::TableMetadata">TableMetadata</a>,
current_file_location: <a class="enum"
href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"
title="enum core::option::Option">Option</a><<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></summary><div class="docblock"><p>Creates a new
table metadata builder from the given metadata to modify it.
@@ -29,9 +29,9 @@ spec.id. It should only be used to create new table metadata
from scratch.</p>
of the metadata file is stored. This is used to update the metadata log.
If <code>current_file_location</code> is <code>None</code>, the metadata log
will not be updated.
This should only be used to stage-create tables.</p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.from_table_creation" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#163-192">source</a><h4
class="code-header">pub fn <a href="#method.from_table_creation"
class="fn">from_table_creation</a>(table_creation: <a class="struct"
href="../struct.TableCreation.html" title="struct
iceberg::TableCreation">TableCreation</a>) -> <a class="type" href="../ty
[...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.assign_uuid" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#195-202">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.13.2/uuid/struct.Uuid.html" title="struct
uuid::Uuid">Uuid</a>) -> Self</h4></section></summary><div
class="docblock"><p>C [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.upgrade_format_version" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#208-233">source</a><h4
class="code-header">pub fn <a href="#method.upgrade_format_version"
class="fn">upgrade_format_version</a>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.from_table_creation" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#166-195">source</a><h4
class="code-header">pub fn <a href="#method.from_table_creation"
class="fn">from_table_creation</a>(table_creation: <a class="struct"
href="../struct.TableCreation.html" title="struct
iceberg::TableCreation">TableCreation</a>) -> <a class="type" href="../ty
[...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.assign_uuid" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#198-205">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.13.2/uuid/struct.Uuid.html" title="struct
uuid::Uuid">Uuid</a>) -> Self</h4></section></summary><div
class="docblock"><p>C [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.upgrade_format_version" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#211-236">source</a><h4
class="code-header">pub fn <a href="#method.upgrade_format_version"
class="fn">upgrade_format_version</a>(
self,
format_version: <a class="enum" href="enum.FormatVersion.html" title="enum
iceberg::spec::FormatVersion">FormatVersion</a>,
) -> <a class="type" href="../type.Result.html" title="type
iceberg::Result">Result</a><Self></h4></section></summary><div
class="docblock"><p>Upgrade <code>FormatVersion</code>. Downgrades are not
allowed.</p>
@@ -39,7 +39,7 @@ This should only be used to stage-create tables.</p>
<ul>
<li>Cannot downgrade to older format versions.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_properties" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#243-271">source</a><h4
class="code-header">pub fn <a href="#method.set_properties"
class="fn">set_properties</a>(self, properties: <a class="struct"
href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html"
title="struct std::collections::hash::map::HashMap">H [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_properties" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#246-274">source</a><h4
class="code-header">pub fn <a href="#method.set_properties"
class="fn">set_properties</a>(self, properties: <a class="struct"
href="https://doc.rust-lang.org/nightly/std/collections/hash/map/struct.HashMap.html"
title="struct std::collections::hash::map::HashMap">H [...]
<p>If a reserved property is set, the corresponding action is performed and
the property is not persisted.
Currently the following reserved properties are supported:</p>
<ul>
@@ -49,20 +49,20 @@ Currently the following reserved properties are
supported:</p>
<ul>
<li>If properties contains a reserved property</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_properties" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#278-310">source</a><h4
class="code-header">pub fn <a href="#method.remove_properties"
class="fn">remove_properties</a>(self, properties: &[<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.remove_properties" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#281-313">source</a><h4
class="code-header">pub fn <a href="#method.remove_properties"
class="fn">remove_properties</a>(self, properties: &[<a class="struct"
href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"
title="struct alloc::string::String">String</a>]) - [...]
Does nothing if the key is not present.</p>
<h5 id="errors-2"><a class="doc-anchor" href="#errors-2">§</a>Errors</h5>
<ul>
<li>If properties to remove contains a reserved property</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/table_metadata_builder.rs.html#313-323">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.add_snapshot" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#330-394">source</a><h4
class="code-header">pub fn <a href="#method.add_snapshot"
class="fn">add_snapshot</a>(self, snapshot: <a class="struct"
href="struct.Snapshot.html" title="struct
iceberg::spec::Snapshot">Snapshot</a>) -> <a class="type"
href="../type.Result.html" title="type icebe [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_location" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#316-326">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.add_snapshot" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#333-401">source</a><h4
class="code-header">pub fn <a href="#method.add_snapshot"
class="fn">add_snapshot</a>(self, snapshot: <a class="struct"
href="struct.Snapshot.html" title="struct
iceberg::spec::Snapshot">Snapshot</a>) -> <a class="type"
href="../type.Result.html" title="type icebe [...]
<h5 id="errors-3"><a class="doc-anchor" href="#errors-3">§</a>Errors</h5>
<ul>
<li>Snapshot id already exists.</li>
<li>For format version > 1: the sequence number of the snapshot is lower
than the highest sequence number specified so far.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_branch_snapshot" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#401-426">source</a><h4
class="code-header">pub fn <a href="#method.set_branch_snapshot"
class="fn">set_branch_snapshot</a>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_branch_snapshot" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#408-433">source</a><h4
class="code-header">pub fn <a href="#method.set_branch_snapshot"
class="fn">set_branch_snapshot</a>(
self,
snapshot: <a class="struct" href="struct.Snapshot.html" title="struct
iceberg::spec::Snapshot">Snapshot</a>,
branch: &<a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
@@ -72,10 +72,10 @@ Retention settings from the <code>branch</code> are
re-used.</p>
<ul>
<li>Any of the preconditions of <code>self.add_snapshot</code> are not
met.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_snapshots" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#431-455">source</a><h4
class="code-header">pub fn <a href="#method.remove_snapshots"
class="fn">remove_snapshots</a>(self, snapshot_ids: &[<a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>]) ->
Self</h4></section></summary><div class="d [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_snapshots" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#438-462">source</a><h4
class="code-header">pub fn <a href="#method.remove_snapshots"
class="fn">remove_snapshots</a>(self, snapshot_ids: &[<a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>]) ->
Self</h4></section></summary><div class="d [...]
Does nothing if a snapshot id is not present.
Keeps as changes only the snapshots that were actually removed.</p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_ref" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#461-509">source</a><h4
class="code-header">pub fn <a href="#method.set_ref" class="fn">set_ref</a>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_ref" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#468-520">source</a><h4
class="code-header">pub fn <a href="#method.set_ref" class="fn">set_ref</a>(
self,
ref_name: &<a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
reference: <a class="struct" href="struct.SnapshotReference.html"
title="struct iceberg::spec::SnapshotReference">SnapshotReference</a>,
@@ -84,28 +84,28 @@ Keeps as changes only the snapshots that were actually
removed.</p>
<ul>
<li>The snapshot id is unknown.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_ref" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#514-527">source</a><h4
class="code-header">pub fn <a href="#method.remove_ref"
class="fn">remove_ref</a>(self, ref_name: &<a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) ->
Self</h4></section></summary><div class="docblock"><p>Remove a ref [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_ref" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#525-538">source</a><h4
class="code-header">pub fn <a href="#method.remove_ref"
class="fn">remove_ref</a>(self, ref_name: &<a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) ->
Self</h4></section></summary><div class="docblock"><p>Remove a ref [...]
<p>If <code>ref_name='main'</code> the current snapshot id is set to -1.</p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_statistics" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#530-538">source</a><h4
class="code-header">pub fn <a href="#method.set_statistics"
class="fn">set_statistics</a>(self, statistics: <a class="struct"
href="struct.StatisticsFile.html" title="struct
iceberg::spec::StatisticsFile">StatisticsFile</a>) ->
Self</h4></section></summary><div [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_statistics" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#541-548">source</a><h4
class="code-header">pub fn <a href="#method.remove_statistics"
class="fn">remove_statistics</a>(self, snapshot_id: <a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) ->
Self</h4></section></summary><div class="docblo [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_partition_statistics" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#551-563">source</a><h4
class="code-header">pub fn <a href="#method.set_partition_statistics"
class="fn">set_partition_statistics</a>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_statistics" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#541-549">source</a><h4
class="code-header">pub fn <a href="#method.set_statistics"
class="fn">set_statistics</a>(self, statistics: <a class="struct"
href="struct.StatisticsFile.html" title="struct
iceberg::spec::StatisticsFile">StatisticsFile</a>) ->
Self</h4></section></summary><div [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_statistics" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#552-559">source</a><h4
class="code-header">pub fn <a href="#method.remove_statistics"
class="fn">remove_statistics</a>(self, snapshot_id: <a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) ->
Self</h4></section></summary><div class="docblo [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_partition_statistics" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#562-574">source</a><h4
class="code-header">pub fn <a href="#method.set_partition_statistics"
class="fn">set_partition_statistics</a>(
self,
partition_statistics_file: <a class="struct"
href="struct.PartitionStatisticsFile.html" title="struct
iceberg::spec::PartitionStatisticsFile">PartitionStatisticsFile</a>,
) -> Self</h4></section></summary><div class="docblock"><p>Set partition
statistics</p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_partition_statistics" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#566-573">source</a><h4
class="code-header">pub fn <a href="#method.remove_partition_statistics"
class="fn">remove_partition_statistics</a>(self, snapshot_id: <a
class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) ->
Self</h4></sectio [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_schema" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#581-616">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 schema to the
[...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_partition_statistics" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#577-584">source</a><h4
class="code-header">pub fn <a href="#method.remove_partition_statistics"
class="fn">remove_partition_statistics</a>(self, snapshot_id: <a
class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) ->
Self</h4></sectio [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_schema" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#592-627">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 schema to the
[...]
<p>The provided <code>schema.schema_id</code> may not be used.</p>
<p>Important: Use this method with caution. The builder does not check
if the added schema is compatible with the current schema.</p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_current_schema" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#625-667">source</a><h4
class="code-header">pub fn <a href="#method.set_current_schema"
class="fn">set_current_schema</a>(self, schema_id: <a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) ->
<a class="type" href="../type.Result.html" tit [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_current_schema" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#636-678">source</a><h4
class="code-header">pub fn <a href="#method.set_current_schema"
class="fn">set_current_schema</a>(self, schema_id: <a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) ->
<a class="type" href="../type.Result.html" tit [...]
<p>If <code>schema_id</code> is -1, the last added schema is set as the
current schema.</p>
<p>Errors:</p>
<ul>
<li>provided <code>schema_id</code> is -1 but no schema has been added via
<code>add_schema</code>.</li>
<li>No schema with the provided <code>schema_id</code> exists.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_current_schema" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#670-672">source</a><h4
class="code-header">pub fn <a href="#method.add_current_schema"
class="fn">add_current_schema</a>(self, schema: <a class="struct"
href="struct.Schema.html" title="struct iceberg::spec::Schema">Schema</a>)
-> <a class="type" href="../type.Result.html" title=" [...]
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_partition_spec" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#684-726">source</a><h4
class="code-header">pub fn <a href="#method.add_partition_spec"
class="fn">add_partition_spec</a>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_current_schema" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#681-683">source</a><h4
class="code-header">pub fn <a href="#method.add_current_schema"
class="fn">add_current_schema</a>(self, schema: <a class="struct"
href="struct.Schema.html" title="struct iceberg::spec::Schema">Schema</a>)
-> <a class="type" href="../type.Result.html" title=" [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_partition_spec" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#695-737">source</a><h4
class="code-header">pub fn <a href="#method.add_partition_spec"
class="fn">add_partition_spec</a>(
self,
unbound_spec: <a class="struct" href="struct.UnboundPartitionSpec.html"
title="struct iceberg::spec::UnboundPartitionSpec">UnboundPartitionSpec</a>,
) -> <a class="type" href="../type.Result.html" title="type
iceberg::Result">Result</a><Self></h4></section></summary><div
class="docblock"><p>Add a partition spec to the table metadata.</p>
@@ -117,24 +117,24 @@ If a schema is added in the same set of changes, the
schema should be added firs
<li>The partition spec cannot be bound to the current schema.</li>
<li>The partition spec has non-sequential field ids and the table format
version is 1.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_default_partition_spec" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#733-779">source</a><h4
class="code-header">pub fn <a href="#method.set_default_partition_spec"
class="fn">set_default_partition_spec</a>(self, spec_id: <a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) ->
<a class="type" href=".. [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_default_partition_spec" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#744-790">source</a><h4
class="code-header">pub fn <a href="#method.set_default_partition_spec"
class="fn">set_default_partition_spec</a>(self, spec_id: <a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) ->
<a class="type" href=".. [...]
<h5 id="errors-7"><a class="doc-anchor" href="#errors-7">§</a>Errors</h5>
<ul>
<li>spec_id is -1 but no spec has been added via
<code>add_partition_spec</code>.</li>
<li>No partition spec with the provided <code>spec_id</code> exists.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_default_partition_spec" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#782-785">source</a><h4
class="code-header">pub fn <a href="#method.add_default_partition_spec"
class="fn">add_default_partition_spec</a>(
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_default_partition_spec" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#793-796">source</a><h4
class="code-header">pub fn <a href="#method.add_default_partition_spec"
class="fn">add_default_partition_spec</a>(
self,
unbound_spec: <a class="struct" href="struct.UnboundPartitionSpec.html"
title="struct iceberg::spec::UnboundPartitionSpec">UnboundPartitionSpec</a>,
) -> <a class="type" href="../type.Result.html" title="type
iceberg::Result">Result</a><Self></h4></section></summary><div
class="docblock"><p>Add a partition spec and set it as the default</p>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_partition_specs" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#793-815">source</a><h4
class="code-header">pub fn <a href="#method.remove_partition_specs"
class="fn">remove_partition_specs</a>(self, spec_ids: &[<a
class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>]) ->
<a class="type" href="../typ [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.remove_partition_specs" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#804-826">source</a><h4
class="code-header">pub fn <a href="#method.remove_partition_specs"
class="fn">remove_partition_specs</a>(self, spec_ids: &[<a
class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>]) ->
<a class="type" href="../typ [...]
Does nothing if a spec id is not present. Active partition specs
should not be removed.</p>
<h5 id="errors-8"><a class="doc-anchor" href="#errors-8">§</a>Errors</h5>
<ul>
<li>Cannot remove the default partition spec.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_sort_order" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#827-862">source</a><h4
class="code-header">pub fn <a href="#method.add_sort_order"
class="fn">add_sort_order</a>(self, sort_order: <a class="struct"
href="struct.SortOrder.html" title="struct
iceberg::spec::SortOrder">SortOrder</a>) -> <a class="type"
href="../type.Result.html" title= [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.add_sort_order" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#838-873">source</a><h4
class="code-header">pub fn <a href="#method.add_sort_order"
class="fn">add_sort_order</a>(self, sort_order: <a class="struct"
href="struct.SortOrder.html" title="struct
iceberg::spec::SortOrder">SortOrder</a>) -> <a class="type"
href="../type.Result.html" title= [...]
<p>The spec is bound eagerly to the current schema and must be valid for it.
If a schema is added in the same set of changes, the schema should be added
first.</p>
<p>Even if <code>sort_order.order_id</code> is provided, it may not be
used.</p>
@@ -143,13 +143,13 @@ If a schema is added in the same set of changes, the
schema should be added firs
<li>Sort order id to add already exists.</li>
<li>Sort order is incompatible with the current schema.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_default_sort_order" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#869-904">source</a><h4
class="code-header">pub fn <a href="#method.set_default_sort_order"
class="fn">set_default_sort_order</a>(self, sort_order_id: <a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) ->
<a class="type" href="../type. [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.set_default_sort_order" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#880-915">source</a><h4
class="code-header">pub fn <a href="#method.set_default_sort_order"
class="fn">set_default_sort_order</a>(self, sort_order_id: <a class="primitive"
href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) ->
<a class="type" href="../type. [...]
<h5 id="errors-10"><a class="doc-anchor" href="#errors-10">§</a>Errors</h5>
<ul>
<li>sort_order_id is -1 but no sort order has been added via
<code>add_sort_order</code>.</li>
<li>No sort order with the provided <code>sort_order_id</code> exists.</li>
</ul>
-</div></details><details class="toggle method-toggle" open><summary><section
id="method.build" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#913-948">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><<a class="struct"
href="struct.TableMetadataBuildResult.html" title="struct
iceberg::spec::TableMetadata [...]
+</div></details><details class="toggle method-toggle" open><summary><section
id="method.build" class="method"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#924-959">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><<a class="struct"
href="struct.TableMetadataBuildResult.html" title="struct
iceberg::spec::TableMetadata [...]
</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-TableMetadataBuilder" class="impl"><a class="src rightside"
href="../../src/iceberg/spec/table_metadata_builder.rs.html#48">source</a><a
href="#impl-Clone-for-TableMetadataBuilder" class="anchor">§< [...]
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/settings.html b/api/settings.html
index 8bb04340..0b4d7eab 100644
--- a/api/settings.html
+++ b/api/settings.html
@@ -1 +1 @@
-<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta
name="viewport" content="width=device-width, initial-scale=1.0"><meta
name="generator" content="rustdoc"><meta name="description" content="Settings
of
Rustdoc"><title>Settings</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562
[...]
\ No newline at end of file
+<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta
name="viewport" content="width=device-width, initial-scale=1.0"><meta
name="generator" content="rustdoc"><meta name="description" content="Settings
of
Rustdoc"><title>Settings</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562
[...]
\ No newline at end of file
diff --git a/api/src/iceberg/spec/table_metadata_builder.rs.html
b/api/src/iceberg/spec/table_metadata_builder.rs.html
index 2f110111..fa3e32bb 100644
--- a/api/src/iceberg/spec/table_metadata_builder.rs.html
+++ b/api/src/iceberg/spec/table_metadata_builder.rs.html
@@ -2342,6 +2342,47 @@
<a href="#2342" id="2342">2342</a>
<a href="#2343" id="2343">2343</a>
<a href="#2344" id="2344">2344</a>
+<a href="#2345" id="2345">2345</a>
+<a href="#2346" id="2346">2346</a>
+<a href="#2347" id="2347">2347</a>
+<a href="#2348" id="2348">2348</a>
+<a href="#2349" id="2349">2349</a>
+<a href="#2350" id="2350">2350</a>
+<a href="#2351" id="2351">2351</a>
+<a href="#2352" id="2352">2352</a>
+<a href="#2353" id="2353">2353</a>
+<a href="#2354" id="2354">2354</a>
+<a href="#2355" id="2355">2355</a>
+<a href="#2356" id="2356">2356</a>
+<a href="#2357" id="2357">2357</a>
+<a href="#2358" id="2358">2358</a>
+<a href="#2359" id="2359">2359</a>
+<a href="#2360" id="2360">2360</a>
+<a href="#2361" id="2361">2361</a>
+<a href="#2362" id="2362">2362</a>
+<a href="#2363" id="2363">2363</a>
+<a href="#2364" id="2364">2364</a>
+<a href="#2365" id="2365">2365</a>
+<a href="#2366" id="2366">2366</a>
+<a href="#2367" id="2367">2367</a>
+<a href="#2368" id="2368">2368</a>
+<a href="#2369" id="2369">2369</a>
+<a href="#2370" id="2370">2370</a>
+<a href="#2371" id="2371">2371</a>
+<a href="#2372" id="2372">2372</a>
+<a href="#2373" id="2373">2373</a>
+<a href="#2374" id="2374">2374</a>
+<a href="#2375" id="2375">2375</a>
+<a href="#2376" id="2376">2376</a>
+<a href="#2377" id="2377">2377</a>
+<a href="#2378" id="2378">2378</a>
+<a href="#2379" id="2379">2379</a>
+<a href="#2380" id="2380">2380</a>
+<a href="#2381" id="2381">2381</a>
+<a href="#2382" id="2382">2382</a>
+<a href="#2383" id="2383">2383</a>
+<a href="#2384" id="2384">2384</a>
+<a href="#2385" id="2385">2385</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
@@ -2398,6 +2439,7 @@
last_added_order_id: <span class="prelude-ty">Option</span><i64>,
<span class="comment">// None if this is a new table (from_metadata)
method not used
</span>previous_history_entry: <span
class="prelude-ty">Option</span><MetadataLog>,
+ last_updated_ms: <span class="prelude-ty">Option</span><i64>,
}
<span class="attr">#[derive(Debug, Clone, PartialEq)]
@@ -2464,6 +2506,7 @@
statistics: HashMap::new(),
partition_statistics: HashMap::new(),
},
+ last_updated_ms: <span class="prelude-val">None</span>,
changes: <span class="macro">vec!</span>[],
last_added_schema_id: <span
class="prelude-val">Some</span>(schema_id),
last_added_spec_id: <span class="prelude-val">None</span>,
@@ -2500,6 +2543,7 @@
last_added_schema_id: <span class="prelude-val">None</span>,
last_added_spec_id: <span class="prelude-val">None</span>,
last_added_order_id: <span class="prelude-val">None</span>,
+ last_updated_ms: <span class="prelude-val">None</span>,
}
}
@@ -2712,13 +2756,17 @@
}
}
- <span class="kw">if </span>snapshot.timestamp_ms() - <span
class="self">self</span>.metadata.last_updated_ms < -ONE_MINUTE_MS {
+ <span class="kw">let </span>max_last_updated = <span class="self">self
+ </span>.last_updated_ms
+ .unwrap_or_default()
+ .max(<span class="self">self</span>.metadata.last_updated_ms);
+ <span class="kw">if </span>snapshot.timestamp_ms() - max_last_updated
< -ONE_MINUTE_MS {
<span class="kw">return </span><span
class="prelude-val">Err</span>(Error::new(
ErrorKind::DataInvalid,
<span class="macro">format!</span>(
<span class="string">"Invalid snapshot timestamp {}:
before last updated timestamp {}"</span>,
snapshot.timestamp_ms(),
- <span class="self">self</span>.metadata.last_updated_ms
+ max_last_updated
),
));
}
@@ -2728,7 +2776,7 @@
snapshot: snapshot.clone(),
});
- <span class="self">self</span>.metadata.last_updated_ms =
snapshot.timestamp_ms();
+ <span class="self">self</span>.last_updated_ms = <span
class="prelude-val">Some</span>(snapshot.timestamp_ms());
<span class="self">self</span>.metadata.last_sequence_number =
snapshot.sequence_number();
<span class="self">self</span>.metadata
.snapshots
@@ -2827,19 +2875,23 @@
<span class="macro">matches!</span>(update,
TableUpdate::AddSnapshot { snapshot: snap } <span class="kw">if
</span>snap.snapshot_id() == snapshot.snapshot_id())
});
<span class="kw">if </span>is_added_snapshot {
- <span class="self">self</span>.metadata.last_updated_ms =
snapshot.timestamp_ms();
+ <span class="self">self</span>.last_updated_ms = <span
class="prelude-val">Some</span>(snapshot.timestamp_ms());
}
<span class="comment">// Current snapshot id is set only for the main
branch
</span><span class="kw">if </span>ref_name == MAIN_BRANCH {
<span class="self">self</span>.metadata.current_snapshot_id =
<span class="prelude-val">Some</span>(snapshot.snapshot_id());
- <span class="kw">if </span><span
class="self">self</span>.metadata.last_updated_ms == i64::default() {
- <span class="self">self</span>.metadata.last_updated_ms =
chrono::Utc::now().timestamp_millis();
+ <span class="kw">let </span>timestamp_ms = <span class="kw">if let
</span><span class="prelude-val">Some</span>(last_updated_ms) = <span
class="self">self</span>.last_updated_ms {
+ last_updated_ms
+ } <span class="kw">else </span>{
+ <span class="kw">let </span>last_updated_ms =
chrono::Utc::now().timestamp_millis();
+ <span class="self">self</span>.last_updated_ms = <span
class="prelude-val">Some</span>(last_updated_ms);
+ last_updated_ms
};
<span
class="self">self</span>.metadata.snapshot_log.push(SnapshotLog {
snapshot_id: snapshot.snapshot_id(),
- timestamp_ms: <span
class="self">self</span>.metadata.last_updated_ms,
+ timestamp_ms,
});
}
@@ -3255,9 +3307,9 @@
<span class="doccomment">/// Build the table metadata.
</span><span class="kw">pub fn </span>build(<span class="kw-2">mut
</span><span class="self">self</span>) -> <span
class="prelude-ty">Result</span><TableMetadataBuildResult> {
- <span class="kw">if </span><span
class="self">self</span>.metadata.last_updated_ms == i64::default() {
- <span class="self">self</span>.metadata.last_updated_ms =
chrono::Utc::now().timestamp_millis();
- }
+ <span class="self">self</span>.metadata.last_updated_ms = <span
class="self">self
+ </span>.last_updated_ms
+ .unwrap_or_else(|| chrono::Utc::now().timestamp_millis());
<span class="comment">// Check compatibility of the current schema to
the default partition spec and sort order.
// We use the `get_xxx` methods from the builder to avoid using the
panicking
@@ -3554,6 +3606,8 @@
<span class="attr">#[cfg(test)]
</span><span class="kw">mod </span>tests {
+ <span class="kw">use </span>std::thread::sleep;
+
<span class="kw">use super</span>::<span class="kw-2">*</span>;
<span class="kw">use </span><span class="kw">crate</span>::spec::{
BlobMetadata, NestedField, NullOrder, Operation, PartitionSpec,
PrimitiveType, Schema,
@@ -4685,5 +4739,33 @@
<span
class="macro">assert_eq!</span>(build_result.metadata.partition_statistics.len(),
<span class="number">0</span>);
<span class="macro">assert_eq!</span>(build_result.changes.len(),
<span class="number">0</span>);
}
+
+ <span class="attr">#[test]
+ </span><span class="kw">fn
</span>last_update_increased_for_property_only_update() {
+ <span class="kw">let </span>builder =
builder_without_changes(FormatVersion::V2);
+
+ <span class="kw">let </span>metadata =
builder.build().unwrap().metadata;
+ <span class="kw">let </span>last_updated_ms = metadata.last_updated_ms;
+ sleep(std::time::Duration::from_millis(<span class="number">2</span>));
+
+ <span class="kw">let </span>build_result = metadata
+ .into_builder(<span class="prelude-val">Some</span>(
+ <span
class="string">"s3://bucket/test/location/metadata/metadata1.json"</span>.to_string(),
+ ))
+ .set_properties(HashMap::from_iter(<span
class="macro">vec!</span>[(
+ <span class="string">"foo"</span>.to_string(),
+ <span class="string">"bar"</span>.to_string(),
+ )]))
+ .unwrap()
+ .build()
+ .unwrap();
+
+ <span class="macro">assert!</span>(
+ build_result.metadata.last_updated_ms > last_updated_ms,
+ <span class="string">"{} > {}"</span>,
+ build_result.metadata.last_updated_ms,
+ last_updated_ms
+ );
+ }
}
</code></pre></div></section></main></body></html>
\ No newline at end of file