blob: 67cf6bd25e763340d12e01286c2f0d8155c089b2 [file] [log] [blame]
<!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::Snapshot Struct Reference</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>
<!-- 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"><b>iceberg</b></li><li class="navelem"><a class="el" href="structiceberg_1_1Snapshot.html">Snapshot</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="structiceberg_1_1Snapshot-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">iceberg::Snapshot Struct Reference</div></div>
</div><!--header-->
<div class="contents">
<p>A snapshot of the data in a table at a point in time.
<a href="structiceberg_1_1Snapshot.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="snapshot_8h_source.html">snapshot.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aee0614438928f4f25b802846c3719cc8" id="r_aee0614438928f4f25b802846c3719cc8"><td class="memItemLeft" align="right" valign="top">std::optional&lt; std::string_view &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiceberg_1_1Snapshot.html#aee0614438928f4f25b802846c3719cc8">Operation</a> () const</td></tr>
<tr class="memdesc:aee0614438928f4f25b802846c3719cc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the name of the DataOperations data operation that produced this snapshot. <br /></td></tr>
<tr class="separator:aee0614438928f4f25b802846c3719cc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2eba27095e7a55b95affdab9d8f11a1" id="r_af2eba27095e7a55b95affdab9d8f11a1"><td class="memItemLeft" align="right" valign="top">Result&lt; std::optional&lt; int64_t &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiceberg_1_1Snapshot.html#af2eba27095e7a55b95affdab9d8f11a1">FirstRowId</a> () const</td></tr>
<tr class="memdesc:af2eba27095e7a55b95affdab9d8f11a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The row-id of the first newly added row in this snapshot. <br /></td></tr>
<tr class="separator:af2eba27095e7a55b95affdab9d8f11a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe3b761b04f61610bda41e16f4d0cead" id="r_abe3b761b04f61610bda41e16f4d0cead"><td class="memItemLeft" align="right" valign="top">Result&lt; std::optional&lt; int64_t &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiceberg_1_1Snapshot.html#abe3b761b04f61610bda41e16f4d0cead">AddedRows</a> () const</td></tr>
<tr class="memdesc:abe3b761b04f61610bda41e16f4d0cead"><td class="mdescLeft">&#160;</td><td class="mdescRight">The upper bound of number of rows with assigned row IDs in this snapshot. <br /></td></tr>
<tr class="separator:abe3b761b04f61610bda41e16f4d0cead"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a38ea2c2441df2688f97b4ff1eca256d5" id="r_a38ea2c2441df2688f97b4ff1eca256d5"><td class="memItemLeft" align="right" valign="top"><a id="a38ea2c2441df2688f97b4ff1eca256d5" name="a38ea2c2441df2688f97b4ff1eca256d5"></a>
static Result&lt; std::unique_ptr&lt; <a class="el" href="structiceberg_1_1Snapshot.html">Snapshot</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Make</b> (int64_t <a class="el" href="structiceberg_1_1Snapshot.html#a6f9b97d42b48be0d05dd4befd2602256">sequence_number</a>, int64_t <a class="el" href="structiceberg_1_1Snapshot.html#a128c409cc977968fbb9d9e893ba7d0c6">snapshot_id</a>, std::optional&lt; int64_t &gt; <a class="el" href="structiceberg_1_1Snapshot.html#aef3a444c939ab4f76e0b9a28f96c6b7a">parent_snapshot_id</a>, TimePointMs <a class="el" href="structiceberg_1_1Snapshot.html#ac401c19cb4161ce5a39ab9ba16e458ac">timestamp_ms</a>, std::string operation, std::unordered_map&lt; std::string, std::string &gt; <a class="el" href="structiceberg_1_1Snapshot.html#afb3b362767783fd344a459451796b2e8">summary</a>, std::optional&lt; int32_t &gt; <a class="el" href="structiceberg_1_1Snapshot.html#a70e026926993c72c71ae9bc75298d5e1">schema_id</a>, std::string <a class="el" href="structiceberg_1_1Snapshot.html#afb198e3e0b1f335fade82e462a600e95">manifest_list</a>, std::optional&lt; int64_t &gt; first_row_id=std::nullopt, std::optional&lt; int64_t &gt; added_rows=std::nullopt)</td></tr>
<tr class="memdesc:a38ea2c2441df2688f97b4ff1eca256d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new <a class="el" href="structiceberg_1_1Snapshot.html" title="A snapshot of the data in a table at a point in time.">Snapshot</a> instance with validation on the inputs. <br /></td></tr>
<tr class="separator:a38ea2c2441df2688f97b4ff1eca256d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a128c409cc977968fbb9d9e893ba7d0c6" id="r_a128c409cc977968fbb9d9e893ba7d0c6"><td class="memItemLeft" align="right" valign="top"><a id="a128c409cc977968fbb9d9e893ba7d0c6" name="a128c409cc977968fbb9d9e893ba7d0c6"></a>
int64_t&#160;</td><td class="memItemRight" valign="bottom"><b>snapshot_id</b></td></tr>
<tr class="memdesc:a128c409cc977968fbb9d9e893ba7d0c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">A unique long ID. <br /></td></tr>
<tr class="separator:a128c409cc977968fbb9d9e893ba7d0c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef3a444c939ab4f76e0b9a28f96c6b7a" id="r_aef3a444c939ab4f76e0b9a28f96c6b7a"><td class="memItemLeft" align="right" valign="top"><a id="aef3a444c939ab4f76e0b9a28f96c6b7a" name="aef3a444c939ab4f76e0b9a28f96c6b7a"></a>
std::optional&lt; int64_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>parent_snapshot_id</b></td></tr>
<tr class="memdesc:aef3a444c939ab4f76e0b9a28f96c6b7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The snapshot ID of the snapshot's parent. Omitted for any snapshot with no parent. <br /></td></tr>
<tr class="separator:aef3a444c939ab4f76e0b9a28f96c6b7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f9b97d42b48be0d05dd4befd2602256" id="r_a6f9b97d42b48be0d05dd4befd2602256"><td class="memItemLeft" align="right" valign="top"><a id="a6f9b97d42b48be0d05dd4befd2602256" name="a6f9b97d42b48be0d05dd4befd2602256"></a>
int64_t&#160;</td><td class="memItemRight" valign="bottom"><b>sequence_number</b></td></tr>
<tr class="memdesc:a6f9b97d42b48be0d05dd4befd2602256"><td class="mdescLeft">&#160;</td><td class="mdescRight">A monotonically increasing long that tracks the order of changes to a table. <br /></td></tr>
<tr class="separator:a6f9b97d42b48be0d05dd4befd2602256"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac401c19cb4161ce5a39ab9ba16e458ac" id="r_ac401c19cb4161ce5a39ab9ba16e458ac"><td class="memItemLeft" align="right" valign="top">TimePointMs&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiceberg_1_1Snapshot.html#ac401c19cb4161ce5a39ab9ba16e458ac">timestamp_ms</a></td></tr>
<tr class="separator:ac401c19cb4161ce5a39ab9ba16e458ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb198e3e0b1f335fade82e462a600e95" id="r_afb198e3e0b1f335fade82e462a600e95"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiceberg_1_1Snapshot.html#afb198e3e0b1f335fade82e462a600e95">manifest_list</a></td></tr>
<tr class="separator:afb198e3e0b1f335fade82e462a600e95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb3b362767783fd344a459451796b2e8" id="r_afb3b362767783fd344a459451796b2e8"><td class="memItemLeft" align="right" valign="top"><a id="afb3b362767783fd344a459451796b2e8" name="afb3b362767783fd344a459451796b2e8"></a>
std::unordered_map&lt; std::string, std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>summary</b></td></tr>
<tr class="memdesc:afb3b362767783fd344a459451796b2e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">A string map that summaries the snapshot changes, including operation. <br /></td></tr>
<tr class="separator:afb3b362767783fd344a459451796b2e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70e026926993c72c71ae9bc75298d5e1" id="r_a70e026926993c72c71ae9bc75298d5e1"><td class="memItemLeft" align="right" valign="top"><a id="a70e026926993c72c71ae9bc75298d5e1" name="a70e026926993c72c71ae9bc75298d5e1"></a>
std::optional&lt; int32_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>schema_id</b></td></tr>
<tr class="memdesc:a70e026926993c72c71ae9bc75298d5e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">ID of the table's current schema when the snapshot was created. <br /></td></tr>
<tr class="separator:a70e026926993c72c71ae9bc75298d5e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a110ad1a8614e25b2b749bfb411b7b0f9" id="r_a110ad1a8614e25b2b749bfb411b7b0f9"><td class="memItemLeft" align="right" valign="top"><a id="a110ad1a8614e25b2b749bfb411b7b0f9" name="a110ad1a8614e25b2b749bfb411b7b0f9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="structiceberg_1_1Snapshot.html">Snapshot</a> &amp;lhs, const <a class="el" href="structiceberg_1_1Snapshot.html">Snapshot</a> &amp;rhs)</td></tr>
<tr class="memdesc:a110ad1a8614e25b2b749bfb411b7b0f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare two snapshots for equality. <br /></td></tr>
<tr class="separator:a110ad1a8614e25b2b749bfb411b7b0f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A snapshot of the data in a table at a point in time. </p>
<p>A snapshot consist of one or more file manifests, and the complete table contents is the union of all the data files in those manifests.</p>
<p>Snapshots are created by table operations. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="abe3b761b04f61610bda41e16f4d0cead" name="abe3b761b04f61610bda41e16f4d0cead"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe3b761b04f61610bda41e16f4d0cead">&#9670;&#160;</a></span>AddedRows()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Result&lt; std::optional&lt; int64_t &gt; &gt; iceberg::Snapshot::AddedRows </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>The upper bound of number of rows with assigned row IDs in this snapshot. </p>
<p>It can be used safely to increment the table's <code>next-row-id</code> during a commit. It can be more than the number of rows added in this snapshot and include some existing rows.</p>
<p>This field is optional but is required when the table version supports row lineage.</p>
<dl class="section return"><dt>Returns</dt><dd>the upper bound of number of rows with assigned row IDs in this snapshot or nullopt if the value was not stored. </dd></dl>
</div>
</div>
<a id="af2eba27095e7a55b95affdab9d8f11a1" name="af2eba27095e7a55b95affdab9d8f11a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2eba27095e7a55b95affdab9d8f11a1">&#9670;&#160;</a></span>FirstRowId()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Result&lt; std::optional&lt; int64_t &gt; &gt; iceberg::Snapshot::FirstRowId </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>The row-id of the first newly added row in this snapshot. </p>
<p>All rows added in this snapshot will have a row-id assigned to them greater than this value. All rows with a row-id less than this value were created in a snapshot that was added to the table (but not necessarily committed to this branch) in the past.</p>
<dl class="section return"><dt>Returns</dt><dd>the first row-id to be used in this snapshot or nullopt when row lineage is not supported </dd></dl>
</div>
</div>
<a id="aee0614438928f4f25b802846c3719cc8" name="aee0614438928f4f25b802846c3719cc8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee0614438928f4f25b802846c3719cc8">&#9670;&#160;</a></span>Operation()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::optional&lt; std::string_view &gt; iceberg::Snapshot::Operation </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the name of the DataOperations data operation that produced this snapshot. </p>
<dl class="section return"><dt>Returns</dt><dd>the operation that produced this snapshot, or nullopt if the operation is unknown. </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="afb198e3e0b1f335fade82e462a600e95" name="afb198e3e0b1f335fade82e462a600e95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb198e3e0b1f335fade82e462a600e95">&#9670;&#160;</a></span>manifest_list</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string iceberg::Snapshot::manifest_list</td>
</tr>
</table>
</div><div class="memdoc">
<p>The location of a manifest list for this snapshot that tracks manifest files with additional metadata. </p>
</div>
</div>
<a id="ac401c19cb4161ce5a39ab9ba16e458ac" name="ac401c19cb4161ce5a39ab9ba16e458ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac401c19cb4161ce5a39ab9ba16e458ac">&#9670;&#160;</a></span>timestamp_ms</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">TimePointMs iceberg::Snapshot::timestamp_ms</td>
</tr>
</table>
</div><div class="memdoc">
<p>A timestamp when the snapshot was created, used for garbage collection and table inspection. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>iceberg/<a class="el" href="snapshot_8h_source.html">snapshot.h</a></li>
<li>iceberg/<b>snapshot.cc</b></li>
</ul>
</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>