blob: 11d4cc5c63f21847737995bc5bd99f6c84f43c93 [file]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>iceberg-cpp: iceberg/update/snapshot_update.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">iceberg-cpp
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_51d145386ec5f52aa06ebf5e46944abc.html">iceberg</a></li><li class="navelem"><a class="el" href="dir_6d010e03372010f41233a7d3a31e0117.html">update</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">snapshot_update.h</div></div>
</div><!--header-->
<div class="contents">
<a href="snapshot__update_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"> * or more contributor license agreements. See the NOTICE file</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> * distributed with this work for additional information</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"> * regarding copyright ownership. The ASF licenses this file</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> * to you under the Apache License, Version 2.0 (the</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> * &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"> *</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment"> *</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment"> * Unless required by applicable law or agreed to in writing,</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"> * software distributed under the License is distributed on an</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment"> * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"> * KIND, either express or implied. See the License for the</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment"> * specific language governing permissions and limitations</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment"> * under the License.</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment"> */</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor">#include &lt;atomic&gt;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#include &lt;optional&gt;</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#include &lt;span&gt;</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#include &lt;unordered_map&gt;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;unordered_set&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#include &quot;<a class="code" href="iceberg__export_8h.html">iceberg/iceberg_export.h</a>&quot;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#include &quot;<a class="code" href="result_8h.html">iceberg/result.h</a>&quot;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor">#include &quot;<a class="code" href="snapshot_8h.html">iceberg/snapshot.h</a>&quot;</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="preprocessor">#include &quot;<a class="code" href="type__fwd_8h.html">iceberg/type_fwd.h</a>&quot;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="preprocessor">#include &quot;<a class="code" href="pending__update_8h.html">iceberg/update/pending_update.h</a>&quot;</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="preprocessor">#include &quot;<a class="code" href="executor_8h.html">iceberg/util/executor.h</a>&quot;</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceiceberg.html">iceberg</a> {</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="foldopen" id="foldopen00049" data-start="{" data-end="};">
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html"> 49</a></span><span class="keyword">class </span>ICEBERG_EXPORT <a class="code hl_class" href="classiceberg_1_1SnapshotUpdate.html">SnapshotUpdate</a> : <span class="keyword">public</span> <a class="code hl_class" href="classiceberg_1_1PendingUpdate.html">PendingUpdate</a> {</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00052" data-start="{" data-end="};">
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="structiceberg_1_1SnapshotUpdate_1_1ApplyResult.html"> 52</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structiceberg_1_1SnapshotUpdate_1_1ApplyResult.html">ApplyResult</a> {</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> std::shared_ptr&lt;Snapshot&gt; snapshot;</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> std::string target_branch;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordtype">bool</span> stage_only = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> };</div>
</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <a class="code hl_class" href="classiceberg_1_1SnapshotUpdate.html">~SnapshotUpdate</a>() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#ae194773e0ce37df3780121314322f440"> 60</a></span> Kind <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#ae194773e0ce37df3780121314322f440">kind</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> Kind::kUpdateSnapshot; }</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#a97b2753654e1304914509f29dcf0a7ff"> 61</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#a97b2753654e1304914509f29dcf0a7ff">IsRetryable</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <span class="keyword">true</span>; }</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#af9a810bc1da767ff0c9a613267e6f6f1"> 62</a></span> Status <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#af9a810bc1da767ff0c9a613267e6f6f1">Commit</a>() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="foldopen" id="foldopen00068" data-start="{" data-end="}">
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#afc2c4005cd4f087d2eb3108819de483d"> 68</a></span> <span class="keyword">auto</span>&amp; <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#afc2c4005cd4f087d2eb3108819de483d">ReportWith</a>(<span class="keyword">this</span> <span class="keyword">auto</span>&amp; self, std::shared_ptr&lt;MetricsReporter&gt; reporter) {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">static_cast&lt;</span><a class="code hl_class" href="classiceberg_1_1SnapshotUpdate.html">SnapshotUpdate</a>&amp;<span class="keyword">&gt;</span>(self).reporter_ = std::move(reporter);</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">return</span> self;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="foldopen" id="foldopen00078" data-start="{" data-end="}">
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#af5a84c539ec3c559260b3c6b868943c7"> 78</a></span> <span class="keyword">auto</span>&amp; <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#af5a84c539ec3c559260b3c6b868943c7">DeleteWith</a>(<span class="keyword">this</span> <span class="keyword">auto</span>&amp; self,</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> std::function&lt;Status(<span class="keyword">const</span> std::string&amp;)&gt; delete_func) {</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">if</span> (self.delete_func_) {</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordflow">return</span> self.AddError(ErrorKind::kInvalidArgument,</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="stringliteral">&quot;Cannot set delete callback more than once&quot;</span>);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> }</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> self.delete_func_ = std::move(delete_func);</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">return</span> self;</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> }</div>
</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
<div class="foldopen" id="foldopen00094" data-start="{" data-end="}">
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#a43f427fe952631fffdd3c19e0c5ef434"> 94</a></span> <span class="keyword">auto</span>&amp; <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#a43f427fe952631fffdd3c19e0c5ef434">StageOnly</a>(<span class="keyword">this</span> <span class="keyword">auto</span>&amp; self) {</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> self.stage_only_ = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">return</span> self;</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> }</div>
</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
<div class="foldopen" id="foldopen00103" data-start="{" data-end="}">
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#ab6d8924f99e5ecc2d54a050b7e986ec7"> 103</a></span> <span class="keyword">auto</span>&amp; <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#ab6d8924f99e5ecc2d54a050b7e986ec7">ScanManifestsWith</a>(<span class="keyword">this</span> <span class="keyword">auto</span>&amp; self, <a class="code hl_class" href="classiceberg_1_1Executor.html">Executor</a>&amp; executor) {</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> self.plan_executor_ = std::ref(executor);</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">return</span> self;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="foldopen" id="foldopen00112" data-start="{" data-end="}">
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#a9a05380cb12c07b3b868df790ef0f829"> 112</a></span> <span class="keyword">auto</span>&amp; <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#a9a05380cb12c07b3b868df790ef0f829">ToBranch</a>(<span class="keyword">this</span> <span class="keyword">auto</span>&amp; self, <span class="keyword">const</span> std::string&amp; branch) {</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">if</span> (branch.empty()) [[unlikely]] {</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordflow">return</span> self.AddError(ErrorKind::kInvalidArgument, <span class="stringliteral">&quot;Branch name cannot be empty&quot;</span>);</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> }</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">if</span> (<span class="keyword">auto</span> ref_it = self.base().refs.find(branch); ref_it != self.base().refs.end()) {</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">if</span> (ref_it-&gt;second-&gt;type() != SnapshotRefType::kBranch) {</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">return</span> self.AddError(ErrorKind::kInvalidArgument,</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="stringliteral">&quot;{} is a tag, not a branch. Tags cannot be targets for &quot;</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="stringliteral">&quot;producing snapshots&quot;</span>,</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> branch);</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> }</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> }</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> self.target_branch_ = branch;</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">return</span> self;</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> }</div>
</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
<div class="foldopen" id="foldopen00135" data-start="{" data-end="}">
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#ae19b638ceb6b7e57e4096ec943db223b"> 135</a></span> <span class="keyword">auto</span>&amp; <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#ae19b638ceb6b7e57e4096ec943db223b">Set</a>(<span class="keyword">this</span> <span class="keyword">auto</span>&amp; self, <span class="keyword">const</span> std::string&amp; property, <span class="keyword">const</span> std::string&amp; value) {</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keyword">static_cast&lt;</span><a class="code hl_class" href="classiceberg_1_1SnapshotUpdate.html">SnapshotUpdate</a>&amp;<span class="keyword">&gt;</span>(self).SetSummaryProperty(property, value);</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordflow">return</span> self;</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> }</div>
</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
<div class="foldopen" id="foldopen00147" data-start="{" data-end="}">
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#ad7521b2d10189e112d7c3197c0f6ae4e"> 147</a></span> <span class="keyword">auto</span>&amp; <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#ad7521b2d10189e112d7c3197c0f6ae4e">WriteManifestsWith</a>(<span class="keyword">this</span> <span class="keyword">auto</span>&amp; self, <a class="code hl_class" href="classiceberg_1_1Executor.html">Executor</a>&amp; executor, int32_t parallelism) {</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">if</span> (parallelism &lt;= 0) [[unlikely]] {</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">return</span> self.AddError(</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> ErrorKind::kInvalidArgument,</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="stringliteral">&quot;Manifest write parallelism must be greater than 0, but was: {}&quot;</span>, parallelism);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> }</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> self.write_manifest_executor_ = std::ref(executor);</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> self.write_manifest_parallelism_ = parallelism;</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordflow">return</span> self;</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> }</div>
</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> </div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#a8d8205f070ab0c9cd86422a4b579a066"> 167</a></span> <a class="code hl_typedef" href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">Result&lt;ApplyResult&gt;</a> <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#a8d8205f070ab0c9cd86422a4b579a066">Apply</a>();</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#ad942dda206e9c6454493a63eb48df0e0"> 170</a></span> Status <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#ad942dda206e9c6454493a63eb48df0e0">Finalize</a>(<a class="code hl_typedef" href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">Result&lt;const TableMetadata*&gt;</a> commit_result) <span class="keyword">override</span>;</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keyword">protected</span>:</div>
<div class="foldopen" id="foldopen00173" data-start="{" data-end="};">
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="structiceberg_1_1SnapshotUpdate_1_1ContentFileWithSequenceNumber.html"> 173</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structiceberg_1_1SnapshotUpdate_1_1ContentFileWithSequenceNumber.html">ContentFileWithSequenceNumber</a> {</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> std::shared_ptr&lt;DataFile&gt; file;</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> std::optional&lt;int64_t&gt; data_sequence_number;</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> };</div>
</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> </div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <span class="keyword">explicit</span> <a class="code hl_class" href="classiceberg_1_1SnapshotUpdate.html">SnapshotUpdate</a>(std::shared_ptr&lt;TransactionContext&gt; ctx);</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> </div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#ad839a5b6b8cd54ceb3d013ddadae9fc5"> 186</a></span> <a class="code hl_typedef" href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">Result&lt;std::vector&lt;ManifestFile&gt;</a>&gt; <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#ad839a5b6b8cd54ceb3d013ddadae9fc5">WriteDataManifests</a>(</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> std::span&lt;<span class="keyword">const</span> std::shared_ptr&lt;DataFile&gt;&gt; files,</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="keyword">const</span> std::shared_ptr&lt;PartitionSpec&gt;&amp; spec,</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> std::optional&lt;int64_t&gt; data_sequence_number = std::nullopt);</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> </div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <a class="code hl_typedef" href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">Result&lt;std::vector&lt;ManifestFile&gt;</a>&gt; WriteDeleteManifests(</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> std::span&lt;const ContentFileWithSequenceNumber&gt; files,</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keyword">const</span> std::shared_ptr&lt;PartitionSpec&gt;&amp; spec);</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> </div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keyword">const</span> std::string&amp; target_branch()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> target_branch_; }</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keywordtype">bool</span> can_inherit_snapshot_id()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> can_inherit_snapshot_id_; }</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="keyword">const</span> std::string&amp; commit_uuid()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> commit_uuid_; }</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> int32_t manifest_count()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="keywordflow">return</span> manifest_count_.load(std::memory_order_relaxed);</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> }</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> int32_t attempt()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> attempt_.load(std::memory_order_relaxed); }</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> int64_t target_manifest_size_bytes()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> target_manifest_size_bytes_; }</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> </div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#a8bf7d3ae4432a24f0d9a0887b5d2ed0b"> 214</a></span> <span class="keyword">virtual</span> Status <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#a8bf7d3ae4432a24f0d9a0887b5d2ed0b">CleanUncommitted</a>(<span class="keyword">const</span> std::unordered_set&lt;std::string&gt;&amp; committed) = 0;</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> </div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#a7e5cb52a426032eebf3b602b5674c5e0"> 219</a></span> <span class="keyword">virtual</span> std::string <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#a7e5cb52a426032eebf3b602b5674c5e0">operation</a>() = 0;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> </div>
<div class="foldopen" id="foldopen00227" data-start="{" data-end="}">
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#aa2d22d7708df6b17bfa53e40abb32f86"> 227</a></span> <span class="keyword">virtual</span> Status <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#aa2d22d7708df6b17bfa53e40abb32f86">Validate</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structiceberg_1_1TableMetadata.html">TableMetadata</a>&amp; current_metadata,</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="keyword">const</span> std::shared_ptr&lt;Snapshot&gt;&amp; snapshot) {</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keywordflow">return</span> {};</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> };</div>
</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> </div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#a0d1e461184dd3aa553269ef736202ced"> 237</a></span> <span class="keyword">virtual</span> <a class="code hl_typedef" href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">Result&lt;std::vector&lt;ManifestFile&gt;</a>&gt; <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#a0d1e461184dd3aa553269ef736202ced">Apply</a>(</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <span class="keyword">const</span> <a class="code hl_struct" href="structiceberg_1_1TableMetadata.html">TableMetadata</a>&amp; metadata_to_update,</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> <span class="keyword">const</span> std::shared_ptr&lt;Snapshot&gt;&amp; snapshot) = 0;</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> </div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#a193bc595ce86911870731a8eebf5950e"> 244</a></span> <span class="keyword">virtual</span> std::unordered_map&lt;std::string, std::string&gt; <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#a193bc595ce86911870731a8eebf5950e">Summary</a>() = 0;</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> </div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#afef5bfd67c340f8dc2bc6096b7bb47ca"> 250</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#afef5bfd67c340f8dc2bc6096b7bb47ca">SetSummaryProperty</a>(<span class="keyword">const</span> std::string&amp; property, <span class="keyword">const</span> std::string&amp; value);</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> </div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#aeb89f2ceb3a0fb2abfba3faa6a32e5ac"> 255</a></span> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#aeb89f2ceb3a0fb2abfba3faa6a32e5ac">CleanupAfterCommit</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">true</span>; }</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> </div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#aae99085da77d04a9314e8c4773cfb731"> 258</a></span> int64_t <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#aae99085da77d04a9314e8c4773cfb731">SnapshotId</a>();</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> </div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"><a class="line" href="classiceberg_1_1SnapshotUpdate.html#af9fc2b6a382fb3c9c9f8e30056d1f7de"> 264</a></span> Status <a class="code hl_function" href="classiceberg_1_1SnapshotUpdate.html#af9fc2b6a382fb3c9c9f8e30056d1f7de">DeleteFile</a>(<span class="keyword">const</span> std::string&amp; path);</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> </div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> std::string ManifestPath();</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> std::string ManifestListPath();</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> <a class="code hl_class" href="classiceberg_1_1SnapshotSummaryBuilder.html">SnapshotSummaryBuilder</a>&amp; summary_builder() { <span class="keywordflow">return</span> summary_; }</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <a class="code hl_class" href="classiceberg_1_1SnapshotSummaryBuilder.html">SnapshotSummaryBuilder</a> BuildManifestCountSummary(</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> std::span&lt;const ManifestFile&gt; manifests, int32_t replaced_manifests_count);</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> </div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <a class="code hl_typedef" href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">Result&lt;std::unordered_map&lt;std::string, std::string&gt;</a>&gt; ComputeSummary(</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> <span class="keyword">const</span> <a class="code hl_struct" href="structiceberg_1_1TableMetadata.html">TableMetadata</a>&amp; previous);</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> </div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> Status CleanAll();</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> </div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> <span class="keywordtype">void</span> ReportCommit() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> </div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="keyword">protected</span>:</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <a class="code hl_class" href="classiceberg_1_1SnapshotSummaryBuilder.html">SnapshotSummaryBuilder</a> summary_;</div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> </div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> can_inherit_snapshot_id_{<span class="keyword">true</span>};</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="keyword">const</span> std::string commit_uuid_;</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> OptionalExecutor write_manifest_executor_;</div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> int32_t write_manifest_parallelism_{1};</div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> std::atomic&lt;int32_t&gt; manifest_count_{0};</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> std::atomic&lt;int32_t&gt; attempt_{0};</div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> std::vector&lt;std::string&gt; manifest_lists_;</div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> <span class="keyword">const</span> int64_t target_manifest_size_bytes_;</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> std::optional&lt;int64_t&gt; snapshot_id_;</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> OptionalExecutor plan_executor_;</div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> <span class="keywordtype">bool</span> stage_only_{<span class="keyword">false</span>};</div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> std::function&lt;Status(<span class="keyword">const</span> std::string&amp;)&gt; delete_func_;</div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> std::string target_branch_{SnapshotRef::kMainBranch};</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> std::shared_ptr&lt;Snapshot&gt; staged_snapshot_;</div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> std::unique_ptr&lt;CommitMetrics&gt; commit_metrics_;</div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> std::shared_ptr&lt;MetricsReporter&gt; reporter_;</div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span>};</div>
</div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> </div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span>} <span class="comment">// namespace iceberg</span></div>
<div class="ttc" id="aclassiceberg_1_1Executor_html"><div class="ttname"><a href="classiceberg_1_1Executor.html">iceberg::Executor</a></div><div class="ttdoc">Schedules iceberg-cpp internal planning tasks.</div><div class="ttdef"><b>Definition</b> executor.h:46</div></div>
<div class="ttc" id="aclassiceberg_1_1PendingUpdate_html"><div class="ttname"><a href="classiceberg_1_1PendingUpdate.html">iceberg::PendingUpdate</a></div><div class="ttdoc">Base class for all kinds of table metadata updates.</div><div class="ttdef"><b>Definition</b> pending_update.h:41</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotSummaryBuilder_html"><div class="ttname"><a href="classiceberg_1_1SnapshotSummaryBuilder.html">iceberg::SnapshotSummaryBuilder</a></div><div class="ttdoc">Helper class for building snapshot summaries.</div><div class="ttdef"><b>Definition</b> snapshot.h:265</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html">iceberg::SnapshotUpdate</a></div><div class="ttdoc">API for table changes that produce snapshots.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:49</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_a0d1e461184dd3aa553269ef736202ced"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#a0d1e461184dd3aa553269ef736202ced">iceberg::SnapshotUpdate::Apply</a></div><div class="ttdeci">virtual Result&lt; std::vector&lt; ManifestFile &gt; &gt; Apply(const TableMetadata &amp;metadata_to_update, const std::shared_ptr&lt; Snapshot &gt; &amp;snapshot)=0</div><div class="ttdoc">Apply the update's changes to the given metadata and snapshot.</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_a193bc595ce86911870731a8eebf5950e"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#a193bc595ce86911870731a8eebf5950e">iceberg::SnapshotUpdate::Summary</a></div><div class="ttdeci">virtual std::unordered_map&lt; std::string, std::string &gt; Summary()=0</div><div class="ttdoc">Get the summary map for this operation.</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_a43f427fe952631fffdd3c19e0c5ef434"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#a43f427fe952631fffdd3c19e0c5ef434">iceberg::SnapshotUpdate::StageOnly</a></div><div class="ttdeci">auto &amp; StageOnly(this auto &amp;self)</div><div class="ttdoc">Stage a snapshot in table metadata, but do not make it current.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:94</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_a7e5cb52a426032eebf3b602b5674c5e0"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#a7e5cb52a426032eebf3b602b5674c5e0">iceberg::SnapshotUpdate::operation</a></div><div class="ttdeci">virtual std::string operation()=0</div><div class="ttdoc">A string that describes the action that produced the new snapshot.</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_a8bf7d3ae4432a24f0d9a0887b5d2ed0b"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#a8bf7d3ae4432a24f0d9a0887b5d2ed0b">iceberg::SnapshotUpdate::CleanUncommitted</a></div><div class="ttdeci">virtual Status CleanUncommitted(const std::unordered_set&lt; std::string &gt; &amp;committed)=0</div><div class="ttdoc">Clean up any uncommitted manifests that were created.</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_a8d8205f070ab0c9cd86422a4b579a066"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#a8d8205f070ab0c9cd86422a4b579a066">iceberg::SnapshotUpdate::Apply</a></div><div class="ttdeci">Result&lt; ApplyResult &gt; Apply()</div><div class="ttdoc">Apply the update's changes to create a new snapshot.</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_a97b2753654e1304914509f29dcf0a7ff"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#a97b2753654e1304914509f29dcf0a7ff">iceberg::SnapshotUpdate::IsRetryable</a></div><div class="ttdeci">bool IsRetryable() const override</div><div class="ttdoc">Whether this update can be retried after a commit conflict.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:61</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_a9a05380cb12c07b3b868df790ef0f829"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#a9a05380cb12c07b3b868df790ef0f829">iceberg::SnapshotUpdate::ToBranch</a></div><div class="ttdeci">auto &amp; ToBranch(this auto &amp;self, const std::string &amp;branch)</div><div class="ttdoc">Perform operations on a particular branch.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:112</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_aa2d22d7708df6b17bfa53e40abb32f86"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#aa2d22d7708df6b17bfa53e40abb32f86">iceberg::SnapshotUpdate::Validate</a></div><div class="ttdeci">virtual Status Validate(const TableMetadata &amp;current_metadata, const std::shared_ptr&lt; Snapshot &gt; &amp;snapshot)</div><div class="ttdoc">Validate the current metadata.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:227</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_aae99085da77d04a9314e8c4773cfb731"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#aae99085da77d04a9314e8c4773cfb731">iceberg::SnapshotUpdate::SnapshotId</a></div><div class="ttdeci">int64_t SnapshotId()</div><div class="ttdoc">Get or generate the snapshot ID for the new snapshot.</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_ab6d8924f99e5ecc2d54a050b7e986ec7"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#ab6d8924f99e5ecc2d54a050b7e986ec7">iceberg::SnapshotUpdate::ScanManifestsWith</a></div><div class="ttdeci">auto &amp; ScanManifestsWith(this auto &amp;self, Executor &amp;executor)</div><div class="ttdoc">Configure an executor for manifest planning work.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:103</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_ad7521b2d10189e112d7c3197c0f6ae4e"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#ad7521b2d10189e112d7c3197c0f6ae4e">iceberg::SnapshotUpdate::WriteManifestsWith</a></div><div class="ttdeci">auto &amp; WriteManifestsWith(this auto &amp;self, Executor &amp;executor, int32_t parallelism)</div><div class="ttdoc">Configure an executor and max writer count for writing new manifests.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:147</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_ad839a5b6b8cd54ceb3d013ddadae9fc5"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#ad839a5b6b8cd54ceb3d013ddadae9fc5">iceberg::SnapshotUpdate::WriteDataManifests</a></div><div class="ttdeci">Result&lt; std::vector&lt; ManifestFile &gt; &gt; WriteDataManifests(std::span&lt; const std::shared_ptr&lt; DataFile &gt; &gt; files, const std::shared_ptr&lt; PartitionSpec &gt; &amp;spec, std::optional&lt; int64_t &gt; data_sequence_number=std::nullopt)</div><div class="ttdoc">Write data manifests for the given data files.</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_ad942dda206e9c6454493a63eb48df0e0"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#ad942dda206e9c6454493a63eb48df0e0">iceberg::SnapshotUpdate::Finalize</a></div><div class="ttdeci">Status Finalize(Result&lt; const TableMetadata * &gt; commit_result) override</div><div class="ttdoc">Finalize the snapshot update, cleaning up any uncommitted files.</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_ae194773e0ce37df3780121314322f440"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#ae194773e0ce37df3780121314322f440">iceberg::SnapshotUpdate::kind</a></div><div class="ttdeci">Kind kind() const override</div><div class="ttdoc">Return the kind of this pending update.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:60</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_ae19b638ceb6b7e57e4096ec943db223b"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#ae19b638ceb6b7e57e4096ec943db223b">iceberg::SnapshotUpdate::Set</a></div><div class="ttdeci">auto &amp; Set(this auto &amp;self, const std::string &amp;property, const std::string &amp;value)</div><div class="ttdoc">Set a summary property in the snapshot produced by this update.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:135</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_aeb89f2ceb3a0fb2abfba3faa6a32e5ac"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#aeb89f2ceb3a0fb2abfba3faa6a32e5ac">iceberg::SnapshotUpdate::CleanupAfterCommit</a></div><div class="ttdeci">virtual bool CleanupAfterCommit() const</div><div class="ttdoc">Check if cleanup should happen after commit.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:255</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_af5a84c539ec3c559260b3c6b868943c7"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#af5a84c539ec3c559260b3c6b868943c7">iceberg::SnapshotUpdate::DeleteWith</a></div><div class="ttdeci">auto &amp; DeleteWith(this auto &amp;self, std::function&lt; Status(const std::string &amp;)&gt; delete_func)</div><div class="ttdoc">Set a callback to delete files instead of the table's default.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:78</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_af9a810bc1da767ff0c9a613267e6f6f1"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#af9a810bc1da767ff0c9a613267e6f6f1">iceberg::SnapshotUpdate::Commit</a></div><div class="ttdeci">Status Commit() override</div><div class="ttdoc">Apply the pending changes and commit.</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_af9fc2b6a382fb3c9c9f8e30056d1f7de"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#af9fc2b6a382fb3c9c9f8e30056d1f7de">iceberg::SnapshotUpdate::DeleteFile</a></div><div class="ttdeci">Status DeleteFile(const std::string &amp;path)</div><div class="ttdoc">Delete a file at the given path.</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_afc2c4005cd4f087d2eb3108819de483d"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#afc2c4005cd4f087d2eb3108819de483d">iceberg::SnapshotUpdate::ReportWith</a></div><div class="ttdeci">auto &amp; ReportWith(this auto &amp;self, std::shared_ptr&lt; MetricsReporter &gt; reporter)</div><div class="ttdoc">Set the metrics reporter for this snapshot update.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:68</div></div>
<div class="ttc" id="aclassiceberg_1_1SnapshotUpdate_html_afef5bfd67c340f8dc2bc6096b7bb47ca"><div class="ttname"><a href="classiceberg_1_1SnapshotUpdate.html#afef5bfd67c340f8dc2bc6096b7bb47ca">iceberg::SnapshotUpdate::SetSummaryProperty</a></div><div class="ttdeci">virtual void SetSummaryProperty(const std::string &amp;property, const std::string &amp;value)</div><div class="ttdoc">Set a summary property.</div></div>
<div class="ttc" id="aexecutor_8h_html"><div class="ttname"><a href="executor_8h.html">executor.h</a></div><div class="ttdoc">Define task executor interfaces.</div></div>
<div class="ttc" id="aiceberg__export_8h_html"><div class="ttname"><a href="iceberg__export_8h.html">iceberg_export.h</a></div><div class="ttdoc">Define symbol visibility macros for core Iceberg APIs.</div></div>
<div class="ttc" id="anamespaceiceberg_html"><div class="ttname"><a href="namespaceiceberg.html">iceberg</a></div><div class="ttdoc">Core Apache Iceberg C++ APIs.</div><div class="ttdef"><b>Definition</b> arrow_io_util.h:33</div></div>
<div class="ttc" id="anamespaceiceberg_html_a9d5594e371beb516b0120e07e69d3af6"><div class="ttname"><a href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">iceberg::Result</a></div><div class="ttdeci">std::expected&lt; T, E &gt; Result</div><div class="ttdoc">Result alias.</div><div class="ttdef"><b>Definition</b> result.h:88</div></div>
<div class="ttc" id="apending__update_8h_html"><div class="ttname"><a href="pending__update_8h.html">pending_update.h</a></div></div>
<div class="ttc" id="aresult_8h_html"><div class="ttname"><a href="result_8h.html">result.h</a></div><div class="ttdoc">Define Result, Status, and error helpers.</div></div>
<div class="ttc" id="asnapshot_8h_html"><div class="ttname"><a href="snapshot_8h.html">snapshot.h</a></div><div class="ttdoc">Define snapshot metadata types.</div></div>
<div class="ttc" id="astructiceberg_1_1SnapshotUpdate_1_1ApplyResult_html"><div class="ttname"><a href="structiceberg_1_1SnapshotUpdate_1_1ApplyResult.html">iceberg::SnapshotUpdate::ApplyResult</a></div><div class="ttdoc">Result of applying a snapshot update.</div><div class="ttdef"><b>Definition</b> snapshot_update.h:52</div></div>
<div class="ttc" id="astructiceberg_1_1SnapshotUpdate_1_1ContentFileWithSequenceNumber_html"><div class="ttname"><a href="structiceberg_1_1SnapshotUpdate_1_1ContentFileWithSequenceNumber.html">iceberg::SnapshotUpdate::ContentFileWithSequenceNumber</a></div><div class="ttdef"><b>Definition</b> snapshot_update.h:173</div></div>
<div class="ttc" id="astructiceberg_1_1TableMetadata_html"><div class="ttname"><a href="structiceberg_1_1TableMetadata.html">iceberg::TableMetadata</a></div><div class="ttdoc">Represents the metadata for an Iceberg table.</div><div class="ttdef"><b>Definition</b> table_metadata.h:73</div></div>
<div class="ttc" id="atype__fwd_8h_html"><div class="ttname"><a href="type__fwd_8h.html">type_fwd.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>