blob: 2b8140a2fd200d90fe55d35e9d873095d908efae [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::PartitionSpec Class 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="classiceberg_1_1PartitionSpec.html">PartitionSpec</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classiceberg_1_1PartitionSpec-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">iceberg::PartitionSpec Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>A partition spec for a <a class="el" href="classiceberg_1_1Table.html" title="Represents an Iceberg table.">Table</a>.
<a href="classiceberg_1_1PartitionSpec.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="partition__spec_8h_source.html">partition_spec.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for iceberg::PartitionSpec:</div>
<div class="dyncontent">
<div class="center">
<img src="classiceberg_1_1PartitionSpec.png" usemap="#iceberg::PartitionSpec_map" alt=""/>
<map id="iceberg::PartitionSpec_map" name="iceberg::PartitionSpec_map">
<area href="classiceberg_1_1util_1_1Formattable.html" title="Interface for objects that can be formatted via std::format." alt="iceberg::util::Formattable" shape="rect" coords="0,0,149,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a0337c81bdfc75ae19d371024f09e3af7" id="r_a0337c81bdfc75ae19d371024f09e3af7"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classiceberg_1_1PartitionSpec.html#a0337c81bdfc75ae19d371024f09e3af7">PartitionFieldRef</a> = std::reference_wrapper&lt; const <a class="el" href="classiceberg_1_1PartitionField.html">PartitionField</a> &gt;</td></tr>
<tr class="memdesc:a0337c81bdfc75ae19d371024f09e3af7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the partition fields by source ID. <br /></td></tr>
<tr class="separator:a0337c81bdfc75ae19d371024f09e3af7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:a828c820b520e1423b56a107dc1ef7e65" id="r_a828c820b520e1423b56a107dc1ef7e65"><td class="memItemLeft" align="right" valign="top"><a id="a828c820b520e1423b56a107dc1ef7e65" name="a828c820b520e1423b56a107dc1ef7e65"></a>
int32_t&#160;</td><td class="memItemRight" valign="bottom"><b>spec_id</b> () const</td></tr>
<tr class="memdesc:a828c820b520e1423b56a107dc1ef7e65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the spec ID. <br /></td></tr>
<tr class="separator:a828c820b520e1423b56a107dc1ef7e65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5020c6846fb8573a67f6199b47e9c6a9" id="r_a5020c6846fb8573a67f6199b47e9c6a9"><td class="memItemLeft" align="right" valign="top"><a id="a5020c6846fb8573a67f6199b47e9c6a9" name="a5020c6846fb8573a67f6199b47e9c6a9"></a>
std::span&lt; const <a class="el" href="classiceberg_1_1PartitionField.html">PartitionField</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>fields</b> () const</td></tr>
<tr class="memdesc:a5020c6846fb8573a67f6199b47e9c6a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list view of the partition fields. <br /></td></tr>
<tr class="separator:a5020c6846fb8573a67f6199b47e9c6a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15fd01069c31093e328a17bbb5f98425" id="r_a15fd01069c31093e328a17bbb5f98425"><td class="memItemLeft" align="right" valign="top"><a id="a15fd01069c31093e328a17bbb5f98425" name="a15fd01069c31093e328a17bbb5f98425"></a>
Result&lt; std::unique_ptr&lt; <a class="el" href="classiceberg_1_1StructType.html">StructType</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PartitionType</b> (const <a class="el" href="classiceberg_1_1Schema.html">Schema</a> &amp;schema) const</td></tr>
<tr class="memdesc:a15fd01069c31093e328a17bbb5f98425"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the partition type binding to the input schema. <br /></td></tr>
<tr class="separator:a15fd01069c31093e328a17bbb5f98425"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a302e1fa14521189f8a29c2c9f45876c0" id="r_a302e1fa14521189f8a29c2c9f45876c0"><td class="memItemLeft" align="right" valign="top"><a id="a302e1fa14521189f8a29c2c9f45876c0" name="a302e1fa14521189f8a29c2c9f45876c0"></a>
Result&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PartitionPath</b> (const <a class="el" href="classiceberg_1_1PartitionValues.html">PartitionValues</a> &amp;data) const</td></tr>
<tr class="memdesc:a302e1fa14521189f8a29c2c9f45876c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the partition path for the given partition data. <br /></td></tr>
<tr class="separator:a302e1fa14521189f8a29c2c9f45876c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ac354782629a4220603ab146c20c809" id="r_a0ac354782629a4220603ab146c20c809"><td class="memItemLeft" align="right" valign="top"><a id="a0ac354782629a4220603ab146c20c809" name="a0ac354782629a4220603ab146c20c809"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>CompatibleWith</b> (const <a class="el" href="classiceberg_1_1PartitionSpec.html">PartitionSpec</a> &amp;other) const</td></tr>
<tr class="memdesc:a0ac354782629a4220603ab146c20c809"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if this spec is equivalent to the other, with partition field ids ignored. That is, if both specs have the same number of fields, field order, field name, source columns, and transforms. <br /></td></tr>
<tr class="separator:a0ac354782629a4220603ab146c20c809"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a84c89e637abefe4fd13047a072a9a2" id="r_a7a84c89e637abefe4fd13047a072a9a2"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classiceberg_1_1PartitionSpec.html#a7a84c89e637abefe4fd13047a072a9a2">ToString</a> () const override</td></tr>
<tr class="memdesc:a7a84c89e637abefe4fd13047a072a9a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a user-readable string representation. <br /></td></tr>
<tr class="separator:a7a84c89e637abefe4fd13047a072a9a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f862443d1e4040799bbd2277ddaf353" id="r_a2f862443d1e4040799bbd2277ddaf353"><td class="memItemLeft" align="right" valign="top"><a id="a2f862443d1e4040799bbd2277ddaf353" name="a2f862443d1e4040799bbd2277ddaf353"></a>
int32_t&#160;</td><td class="memItemRight" valign="bottom"><b>last_assigned_field_id</b> () const</td></tr>
<tr class="separator:a2f862443d1e4040799bbd2277ddaf353"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0e5ec36fd8a8fd8a6d0f7ccf6121140" id="r_ac0e5ec36fd8a8fd8a6d0f7ccf6121140"><td class="memItemLeft" align="right" valign="top">Status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classiceberg_1_1PartitionSpec.html#ac0e5ec36fd8a8fd8a6d0f7ccf6121140">Validate</a> (const <a class="el" href="classiceberg_1_1Schema.html">Schema</a> &amp;schema, bool allow_missing_fields) const</td></tr>
<tr class="memdesc:ac0e5ec36fd8a8fd8a6d0f7ccf6121140"><td class="mdescLeft">&#160;</td><td class="mdescRight">Validates the partition spec against a schema. <br /></td></tr>
<tr class="separator:ac0e5ec36fd8a8fd8a6d0f7ccf6121140"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b2782facc9340eb7c59676bfa172e73" id="r_a1b2782facc9340eb7c59676bfa172e73"><td class="memItemLeft" align="right" valign="top"><a id="a1b2782facc9340eb7c59676bfa172e73" name="a1b2782facc9340eb7c59676bfa172e73"></a>
Result&lt; std::vector&lt; <a class="el" href="classiceberg_1_1PartitionSpec.html#a0337c81bdfc75ae19d371024f09e3af7">PartitionFieldRef</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>GetFieldsBySourceId</b> (int32_t source_id) const</td></tr>
<tr class="separator:a1b2782facc9340eb7c59676bfa172e73"><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:a2955a97e29cf0637fa5275b031b198dc" id="r_a2955a97e29cf0637fa5275b031b198dc"><td class="memItemLeft" align="right" valign="top"><a id="a2955a97e29cf0637fa5275b031b198dc" name="a2955a97e29cf0637fa5275b031b198dc"></a>
static const std::shared_ptr&lt; <a class="el" href="classiceberg_1_1PartitionSpec.html">PartitionSpec</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>Unpartitioned</b> ()</td></tr>
<tr class="memdesc:a2955a97e29cf0637fa5275b031b198dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an unsorted partition spec singleton. <br /></td></tr>
<tr class="separator:a2955a97e29cf0637fa5275b031b198dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ea770a1a00dd056699e9f484a15b234" id="r_a1ea770a1a00dd056699e9f484a15b234"><td class="memItemLeft" align="right" valign="top"><a id="a1ea770a1a00dd056699e9f484a15b234" name="a1ea770a1a00dd056699e9f484a15b234"></a>
static Status&#160;</td><td class="memItemRight" valign="bottom"><b>ValidatePartitionName</b> (const <a class="el" href="classiceberg_1_1Schema.html">Schema</a> &amp;schema, const <a class="el" href="classiceberg_1_1PartitionSpec.html">PartitionSpec</a> &amp;spec)</td></tr>
<tr class="separator:a1ea770a1a00dd056699e9f484a15b234"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6495d261713a232e318a5b092d00efee" id="r_a6495d261713a232e318a5b092d00efee"><td class="memItemLeft" align="right" valign="top">static Result&lt; std::unique_ptr&lt; <a class="el" href="classiceberg_1_1PartitionSpec.html">PartitionSpec</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classiceberg_1_1PartitionSpec.html#a6495d261713a232e318a5b092d00efee">Make</a> (const <a class="el" href="classiceberg_1_1Schema.html">Schema</a> &amp;schema, int32_t <a class="el" href="classiceberg_1_1PartitionSpec.html#a828c820b520e1423b56a107dc1ef7e65">spec_id</a>, std::vector&lt; <a class="el" href="classiceberg_1_1PartitionField.html">PartitionField</a> &gt; <a class="el" href="classiceberg_1_1PartitionSpec.html#a5020c6846fb8573a67f6199b47e9c6a9">fields</a>, bool allow_missing_fields, std::optional&lt; int32_t &gt; last_assigned_field_id=std::nullopt)</td></tr>
<tr class="memdesc:a6495d261713a232e318a5b092d00efee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <a class="el" href="classiceberg_1_1PartitionSpec.html" title="A partition spec for a Table.">PartitionSpec</a> binding to a schema. <br /></td></tr>
<tr class="separator:a6495d261713a232e318a5b092d00efee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbc94ea989cf6e76f01a494ed302f15c" id="r_adbc94ea989cf6e76f01a494ed302f15c"><td class="memItemLeft" align="right" valign="top">static Result&lt; std::unique_ptr&lt; <a class="el" href="classiceberg_1_1PartitionSpec.html">PartitionSpec</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classiceberg_1_1PartitionSpec.html#adbc94ea989cf6e76f01a494ed302f15c">Make</a> (int32_t <a class="el" href="classiceberg_1_1PartitionSpec.html#a828c820b520e1423b56a107dc1ef7e65">spec_id</a>, std::vector&lt; <a class="el" href="classiceberg_1_1PartitionField.html">PartitionField</a> &gt; <a class="el" href="classiceberg_1_1PartitionSpec.html#a5020c6846fb8573a67f6199b47e9c6a9">fields</a>, std::optional&lt; int32_t &gt; last_assigned_field_id=std::nullopt)</td></tr>
<tr class="memdesc:adbc94ea989cf6e76f01a494ed302f15c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <a class="el" href="classiceberg_1_1PartitionSpec.html" title="A partition spec for a Table.">PartitionSpec</a> without binding to a schema. <br /></td></tr>
<tr class="separator:adbc94ea989cf6e76f01a494ed302f15c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af87717e5fcb5ff10a88dd1e70d108741" id="r_af87717e5fcb5ff10a88dd1e70d108741"><td class="memItemLeft" align="right" valign="top"><a id="af87717e5fcb5ff10a88dd1e70d108741" name="af87717e5fcb5ff10a88dd1e70d108741"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><b>HasSequentialFieldIds</b> (const <a class="el" href="classiceberg_1_1PartitionSpec.html">PartitionSpec</a> &amp;spec)</td></tr>
<tr class="separator:af87717e5fcb5ff10a88dd1e70d108741"><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-attribs" name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a4a2453eb9906ec450da3c3a0048f91c9" id="r_a4a2453eb9906ec450da3c3a0048f91c9"><td class="memItemLeft" align="right" valign="top"><a id="a4a2453eb9906ec450da3c3a0048f91c9" name="a4a2453eb9906ec450da3c3a0048f91c9"></a>
static constexpr int32_t&#160;</td><td class="memItemRight" valign="bottom"><b>kInitialSpecId</b> = 0</td></tr>
<tr class="separator:a4a2453eb9906ec450da3c3a0048f91c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad97896f90ee14db953bd7af46d389b06" id="r_ad97896f90ee14db953bd7af46d389b06"><td class="memItemLeft" align="right" valign="top"><a id="ad97896f90ee14db953bd7af46d389b06" name="ad97896f90ee14db953bd7af46d389b06"></a>
static constexpr int32_t&#160;</td><td class="memItemRight" valign="bottom"><b>kLegacyPartitionDataIdStart</b> = 1000</td></tr>
<tr class="memdesc:ad97896f90ee14db953bd7af46d389b06"><td class="mdescLeft">&#160;</td><td class="mdescRight">The start ID for partition field. It is only used to generate partition field id for v1 metadata where it is tracked. <br /></td></tr>
<tr class="separator:ad97896f90ee14db953bd7af46d389b06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c0d53301d9f3d8506578f03ee9222c0" id="r_a2c0d53301d9f3d8506578f03ee9222c0"><td class="memItemLeft" align="right" valign="top"><a id="a2c0d53301d9f3d8506578f03ee9222c0" name="a2c0d53301d9f3d8506578f03ee9222c0"></a>
static constexpr int32_t&#160;</td><td class="memItemRight" valign="bottom"><b>kInvalidPartitionFieldId</b> = -1</td></tr>
<tr class="separator:a2c0d53301d9f3d8506578f03ee9222c0"><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:ac2783e03d504842704b59e358518d1c7" id="r_ac2783e03d504842704b59e358518d1c7"><td class="memItemLeft" align="right" valign="top"><a id="ac2783e03d504842704b59e358518d1c7" name="ac2783e03d504842704b59e358518d1c7"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="classiceberg_1_1PartitionSpec.html">PartitionSpec</a> &amp;lhs, const <a class="el" href="classiceberg_1_1PartitionSpec.html">PartitionSpec</a> &amp;rhs)</td></tr>
<tr class="separator:ac2783e03d504842704b59e358518d1c7"><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 partition spec for a <a class="el" href="classiceberg_1_1Table.html" title="Represents an Iceberg table.">Table</a>. </p>
<p>A partition spec is a list of partition fields, along with a unique integer ID. A <a class="el" href="classiceberg_1_1Table.html" title="Represents an Iceberg table.">Table</a> may have different partition specs over its lifetime due to partition spec evolution. </p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a0337c81bdfc75ae19d371024f09e3af7" name="a0337c81bdfc75ae19d371024f09e3af7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0337c81bdfc75ae19d371024f09e3af7">&#9670;&#160;</a></span>PartitionFieldRef</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classiceberg_1_1PartitionSpec.html#a0337c81bdfc75ae19d371024f09e3af7">iceberg::PartitionSpec::PartitionFieldRef</a> = std::reference_wrapper&lt;const <a class="el" href="classiceberg_1_1PartitionField.html">PartitionField</a>&gt;</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the partition fields by source ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">source_id</td><td>The id of the source field. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The partition fields by source ID, or NotFound if the source field is not found. </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6495d261713a232e318a5b092d00efee" name="a6495d261713a232e318a5b092d00efee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6495d261713a232e318a5b092d00efee">&#9670;&#160;</a></span>Make() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">Result&lt; std::unique_ptr&lt; <a class="el" href="classiceberg_1_1PartitionSpec.html">PartitionSpec</a> &gt; &gt; iceberg::PartitionSpec::Make </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classiceberg_1_1Schema.html">Schema</a> &amp;&#160;</td>
<td class="paramname"><em>schema</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>spec_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; <a class="el" href="classiceberg_1_1PartitionField.html">PartitionField</a> &gt;&#160;</td>
<td class="paramname"><em>fields</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>allow_missing_fields</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::optional&lt; int32_t &gt;&#160;</td>
<td class="paramname"><em>last_assigned_field_id</em> = <code>std::nullopt</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a <a class="el" href="classiceberg_1_1PartitionSpec.html" title="A partition spec for a Table.">PartitionSpec</a> binding to a schema. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">schema</td><td>The schema to bind the partition spec to. </td></tr>
<tr><td class="paramname">spec_id</td><td>The spec ID. </td></tr>
<tr><td class="paramname">fields</td><td>The partition fields. </td></tr>
<tr><td class="paramname">allowMissingFields</td><td>Whether to skip validation for partition fields whose source columns have been dropped from the schema. </td></tr>
<tr><td class="paramname">last_assigned_field_id</td><td>The last assigned field ID assigned to ensure new fields get unique IDs. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A Result containing the partition spec or an error. </dd></dl>
</div>
</div>
<a id="adbc94ea989cf6e76f01a494ed302f15c" name="adbc94ea989cf6e76f01a494ed302f15c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbc94ea989cf6e76f01a494ed302f15c">&#9670;&#160;</a></span>Make() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">Result&lt; std::unique_ptr&lt; <a class="el" href="classiceberg_1_1PartitionSpec.html">PartitionSpec</a> &gt; &gt; iceberg::PartitionSpec::Make </td>
<td>(</td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>spec_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; <a class="el" href="classiceberg_1_1PartitionField.html">PartitionField</a> &gt;&#160;</td>
<td class="paramname"><em>fields</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::optional&lt; int32_t &gt;&#160;</td>
<td class="paramname"><em>last_assigned_field_id</em> = <code>std::nullopt</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a <a class="el" href="classiceberg_1_1PartitionSpec.html" title="A partition spec for a Table.">PartitionSpec</a> without binding to a schema. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">spec_id</td><td>The spec ID. </td></tr>
<tr><td class="paramname">fields</td><td>The partition fields. </td></tr>
<tr><td class="paramname">last_assigned_field_id</td><td>The last assigned field ID assigned to ensure new fields get unique IDs. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A Result containing the partition spec or an error. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>This method does not check whether the sort fields are valid for any schema. </dd></dl>
</div>
</div>
<a id="a7a84c89e637abefe4fd13047a072a9a2" name="a7a84c89e637abefe4fd13047a072a9a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a84c89e637abefe4fd13047a072a9a2">&#9670;&#160;</a></span>ToString()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::string iceberg::PartitionSpec::ToString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a user-readable string representation. </p>
<p>Implements <a class="el" href="classiceberg_1_1util_1_1Formattable.html#a79618aca5b3bf63610d9c87ac5ae0386">iceberg::util::Formattable</a>.</p>
</div>
</div>
<a id="ac0e5ec36fd8a8fd8a6d0f7ccf6121140" name="ac0e5ec36fd8a8fd8a6d0f7ccf6121140"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac0e5ec36fd8a8fd8a6d0f7ccf6121140">&#9670;&#160;</a></span>Validate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Status iceberg::PartitionSpec::Validate </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classiceberg_1_1Schema.html">Schema</a> &amp;&#160;</td>
<td class="paramname"><em>schema</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>allow_missing_fields</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Validates the partition spec against a schema. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">schema</td><td>The schema to validate against. </td></tr>
<tr><td class="paramname">allow_missing_fields</td><td>Whether to skip validation for partition fields whose source columns have been dropped from the schema. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="structiceberg_1_1Error.html" title="Error with a kind and a message.">Error</a> status if the partition spec is invalid. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>iceberg/<a class="el" href="partition__spec_8h_source.html">partition_spec.h</a></li>
<li>iceberg/<b>partition_spec.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>