blob: f0ba64e72bb6fcc3324caa78d9a80beb71186420 [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.9.8" xml:lang="en-US">
<compounddef id="partition__spec_8h" kind="file" language="C++">
<compoundname>partition_spec.h</compoundname>
<includes local="no">cstdint</includes>
<includes local="no">memory</includes>
<includes local="no">optional</includes>
<includes local="no">span</includes>
<includes local="no">string</includes>
<includes local="no">unordered_map</includes>
<includes local="no">vector</includes>
<includes refid="iceberg__export_8h" local="yes">iceberg/iceberg_export.h</includes>
<includes refid="partition__field_8h" local="yes">iceberg/partition_field.h</includes>
<includes refid="result_8h" local="yes">iceberg/result.h</includes>
<includes refid="type__fwd_8h" local="yes">iceberg/type_fwd.h</includes>
<includes refid="formattable_8h" local="yes">iceberg/util/formattable.h</includes>
<includes refid="lazy_8h" local="yes">iceberg/util/lazy.h</includes>
<includedby refid="catalog_2rest_2json__serde_8cc" local="yes">iceberg/catalog/rest/json_serde.cc</includedby>
<includedby refid="rest__catalog_8cc" local="yes">iceberg/catalog/rest/rest_catalog.cc</includedby>
<includedby refid="types_8cc" local="yes">iceberg/catalog/rest/types.cc</includedby>
<includedby refid="data__writer_8cc" local="yes">iceberg/data/data_writer.cc</includedby>
<includedby refid="equality__delete__writer_8cc" local="yes">iceberg/data/equality_delete_writer.cc</includedby>
<includedby refid="position__delete__writer_8cc" local="yes">iceberg/data/position_delete_writer.cc</includedby>
<includedby refid="delete__file__index_8cc" local="yes">iceberg/delete_file_index.cc</includedby>
<includedby refid="projections_8cc" local="yes">iceberg/expression/projections.cc</includedby>
<includedby refid="residual__evaluator_8cc" local="yes">iceberg/expression/residual_evaluator.cc</includedby>
<includedby refid="json__serde_8cc" local="yes">iceberg/json_serde.cc</includedby>
<includedby refid="location__provider_8cc" local="yes">iceberg/location_provider.cc</includedby>
<includedby refid="manifest__group_8cc" local="yes">iceberg/manifest/manifest_group.cc</includedby>
<includedby refid="manifest__list_8h" local="yes">iceberg/manifest/manifest_list.h</includedby>
<includedby refid="manifest__reader_8cc" local="yes">iceberg/manifest/manifest_reader.cc</includedby>
<includedby refid="partition__spec_8cc" local="yes">iceberg/partition_spec.cc</includedby>
<includedby refid="table_8cc" local="yes">iceberg/table.cc</includedby>
<includedby refid="table__metadata_8cc" local="yes">iceberg/table_metadata.cc</includedby>
<includedby refid="data__writer__test_8cc" local="yes">iceberg/test/data_writer_test.cc</includedby>
<includedby refid="delete__file__index__test_8cc" local="yes">iceberg/test/delete_file_index_test.cc</includedby>
<includedby refid="fast__append__test_8cc" local="yes">iceberg/test/fast_append_test.cc</includedby>
<includedby refid="in__memory__catalog__test_8cc" local="yes">iceberg/test/in_memory_catalog_test.cc</includedby>
<includedby refid="json__serde__test_8cc" local="yes">iceberg/test/json_serde_test.cc</includedby>
<includedby refid="location__provider__test_8cc" local="yes">iceberg/test/location_provider_test.cc</includedby>
<includedby refid="manifest__evaluator__test_8cc" local="yes">iceberg/test/manifest_evaluator_test.cc</includedby>
<includedby refid="manifest__group__test_8cc" local="yes">iceberg/test/manifest_group_test.cc</includedby>
<includedby refid="manifest__reader__stats__test_8cc" local="yes">iceberg/test/manifest_reader_stats_test.cc</includedby>
<includedby refid="manifest__reader__test_8cc" local="yes">iceberg/test/manifest_reader_test.cc</includedby>
<includedby refid="manifest__writer__versions__test_8cc" local="yes">iceberg/test/manifest_writer_versions_test.cc</includedby>
<includedby refid="metadata__io__test_8cc" local="yes">iceberg/test/metadata_io_test.cc</includedby>
<includedby refid="metadata__serde__test_8cc" local="yes">iceberg/test/metadata_serde_test.cc</includedby>
<includedby refid="partition__spec__test_8cc" local="yes">iceberg/test/partition_spec_test.cc</includedby>
<includedby refid="projections__test_8cc" local="yes">iceberg/test/projections_test.cc</includedby>
<includedby refid="residual__evaluator__test_8cc" local="yes">iceberg/test/residual_evaluator_test.cc</includedby>
<includedby refid="rest__catalog__test_8cc" local="yes">iceberg/test/rest_catalog_test.cc</includedby>
<includedby refid="rest__json__serde__test_8cc" local="yes">iceberg/test/rest_json_serde_test.cc</includedby>
<includedby refid="rolling__manifest__writer__test_8cc" local="yes">iceberg/test/rolling_manifest_writer_test.cc</includedby>
<includedby refid="snapshot__summary__builder__test_8cc" local="yes">iceberg/test/snapshot_summary_builder_test.cc</includedby>
<includedby refid="snapshot__util__test_8cc" local="yes">iceberg/test/snapshot_util_test.cc</includedby>
<includedby refid="table__metadata__builder__test_8cc" local="yes">iceberg/test/table_metadata_builder_test.cc</includedby>
<includedby refid="table__requirements__test_8cc" local="yes">iceberg/test/table_requirements_test.cc</includedby>
<includedby refid="table__scan__test_8cc" local="yes">iceberg/test/table_scan_test.cc</includedby>
<includedby refid="table__update__test_8cc" local="yes">iceberg/test/table_update_test.cc</includedby>
<includedby refid="update__partition__spec__test_8cc" local="yes">iceberg/test/update_partition_spec_test.cc</includedby>
<includedby refid="update__partition__spec_8cc" local="yes">iceberg/update/update_partition_spec.cc</includedby>
<incdepgraph>
<node id="23">
<label>iceberg/exception.h</label>
<link refid="exception_8h"/>
<childnode refid="24" relation="include">
</childnode>
<childnode refid="9" relation="include">
</childnode>
</node>
<node id="9">
<label>iceberg/iceberg_export.h</label>
<link refid="iceberg__export_8h_source"/>
</node>
<node id="10">
<label>iceberg/partition_field.h</label>
<link refid="partition__field_8h"/>
<childnode refid="2" relation="include">
</childnode>
<childnode refid="3" relation="include">
</childnode>
<childnode refid="6" relation="include">
</childnode>
<childnode refid="11" relation="include">
</childnode>
<childnode refid="9" relation="include">
</childnode>
<childnode refid="12" relation="include">
</childnode>
<childnode refid="13" relation="include">
</childnode>
</node>
<node id="1">
<label>iceberg/partition_spec.h</label>
<link refid="partition__spec_8h"/>
<childnode refid="2" relation="include">
</childnode>
<childnode refid="3" relation="include">
</childnode>
<childnode refid="4" relation="include">
</childnode>
<childnode refid="5" relation="include">
</childnode>
<childnode refid="6" relation="include">
</childnode>
<childnode refid="7" relation="include">
</childnode>
<childnode refid="8" relation="include">
</childnode>
<childnode refid="9" relation="include">
</childnode>
<childnode refid="10" relation="include">
</childnode>
<childnode refid="14" relation="include">
</childnode>
<childnode refid="12" relation="include">
</childnode>
<childnode refid="13" relation="include">
</childnode>
<childnode refid="17" relation="include">
</childnode>
</node>
<node id="14">
<label>iceberg/result.h</label>
<link refid="result_8h_source"/>
<childnode refid="15" relation="include">
</childnode>
<childnode refid="16" relation="include">
</childnode>
<childnode refid="6" relation="include">
</childnode>
<childnode refid="9" relation="include">
</childnode>
</node>
<node id="12">
<label>iceberg/type_fwd.h</label>
<link refid="type__fwd_8h"/>
</node>
<node id="13">
<label>iceberg/util/formattable.h</label>
<link refid="formattable_8h"/>
<childnode refid="6" relation="include">
</childnode>
<childnode refid="9" relation="include">
</childnode>
</node>
<node id="17">
<label>iceberg/util/lazy.h</label>
<link refid="lazy_8h"/>
<childnode refid="18" relation="include">
</childnode>
<childnode refid="19" relation="include">
</childnode>
<childnode refid="20" relation="include">
</childnode>
<childnode refid="14" relation="include">
</childnode>
<childnode refid="21" relation="include">
</childnode>
</node>
<node id="21">
<label>iceberg/util/macros.h</label>
<link refid="macros_8h_source"/>
<childnode refid="22" relation="include">
</childnode>
<childnode refid="23" relation="include">
</childnode>
<childnode refid="14" relation="include">
</childnode>
</node>
<node id="22">
<label>cassert</label>
</node>
<node id="18">
<label>concepts</label>
</node>
<node id="2">
<label>cstdint</label>
</node>
<node id="15">
<label>expected</label>
</node>
<node id="16">
<label>format</label>
</node>
<node id="19">
<label>functional</label>
</node>
<node id="3">
<label>memory</label>
</node>
<node id="20">
<label>mutex</label>
</node>
<node id="4">
<label>optional</label>
</node>
<node id="5">
<label>span</label>
</node>
<node id="24">
<label>stdexcept</label>
</node>
<node id="6">
<label>string</label>
</node>
<node id="11">
<label>string_view</label>
</node>
<node id="7">
<label>unordered_map</label>
</node>
<node id="8">
<label>vector</label>
</node>
</incdepgraph>
<invincdepgraph>
<node id="3">
<label>iceberg/manifest/manifest_group.h</label>
<link refid="manifest__group_8h"/>
</node>
<node id="2">
<label>iceberg/manifest/manifest_list.h</label>
<link refid="manifest__list_8h"/>
<childnode refid="3" relation="include">
</childnode>
<childnode refid="4" relation="include">
</childnode>
<childnode refid="5" relation="include">
</childnode>
<childnode refid="6" relation="include">
</childnode>
<childnode refid="7" relation="include">
</childnode>
</node>
<node id="4">
<label>iceberg/manifest/manifest_writer.h</label>
<link refid="manifest__writer_8h"/>
<childnode refid="5" relation="include">
</childnode>
</node>
<node id="5">
<label>iceberg/manifest/rolling_manifest_writer.h</label>
<link refid="rolling__manifest__writer_8h"/>
</node>
<node id="1">
<label>iceberg/partition_spec.h</label>
<link refid="partition__spec_8h"/>
<childnode refid="2" relation="include">
</childnode>
</node>
<node id="6">
<label>iceberg/row/manifest_wrapper.h</label>
<link refid="manifest__wrapper_8h_source"/>
</node>
<node id="7">
<label>iceberg/snapshot.h</label>
<link refid="snapshot_8h_source"/>
<childnode refid="8" relation="include">
</childnode>
<childnode refid="10" relation="include">
</childnode>
<childnode refid="9" relation="include">
</childnode>
<childnode refid="11" relation="include">
</childnode>
</node>
<node id="8">
<label>iceberg/table.h</label>
<link refid="table_8h_source"/>
<childnode refid="9" relation="include">
</childnode>
</node>
<node id="10">
<label>iceberg/table_update.h</label>
<link refid="table__update_8h"/>
</node>
<node id="9">
<label>iceberg/test/update_test_base.h</label>
<link refid="update__test__base_8h_source"/>
</node>
<node id="12">
<label>iceberg/update/fast_append.h</label>
<link refid="fast__append_8h"/>
</node>
<node id="11">
<label>iceberg/update/snapshot_update.h</label>
<link refid="snapshot__update_8h_source"/>
<childnode refid="12" relation="include">
</childnode>
</node>
</invincdepgraph>
<innerclass refid="classiceberg_1_1PartitionSpec" prot="public">iceberg::PartitionSpec</innerclass>
<innernamespace refid="namespaceiceberg">iceberg</innernamespace>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>Partition specs for Iceberg tables. </para>
</detaileddescription>
<programlisting>
<codeline lineno="1"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Licensed<sp/>to<sp/>the<sp/>Apache<sp/>Software<sp/>Foundation<sp/>(ASF)<sp/>under<sp/>one</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/>or<sp/>more<sp/>contributor<sp/>license<sp/>agreements.<sp/><sp/>See<sp/>the<sp/>NOTICE<sp/>file</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*<sp/>distributed<sp/>with<sp/>this<sp/>work<sp/>for<sp/>additional<sp/>information</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>*<sp/>regarding<sp/>copyright<sp/>ownership.<sp/><sp/>The<sp/>ASF<sp/>licenses<sp/>this<sp/>file</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>*<sp/>to<sp/>you<sp/>under<sp/>the<sp/>Apache<sp/>License,<sp/>Version<sp/>2.0<sp/>(the</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/>&quot;License&quot;);<sp/>you<sp/>may<sp/>not<sp/>use<sp/>this<sp/>file<sp/>except<sp/>in<sp/>compliance</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/>with<sp/>the<sp/>License.<sp/><sp/>You<sp/>may<sp/>obtain<sp/>a<sp/>copy<sp/>of<sp/>the<sp/>License<sp/>at</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/><sp/><sp/>http://www.apache.org/licenses/LICENSE-2.0</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/>Unless<sp/>required<sp/>by<sp/>applicable<sp/>law<sp/>or<sp/>agreed<sp/>to<sp/>in<sp/>writing,</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/>software<sp/>distributed<sp/>under<sp/>the<sp/>License<sp/>is<sp/>distributed<sp/>on<sp/>an</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/>&quot;AS<sp/>IS&quot;<sp/>BASIS,<sp/>WITHOUT<sp/>WARRANTIES<sp/>OR<sp/>CONDITIONS<sp/>OF<sp/>ANY</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/>KIND,<sp/>either<sp/>express<sp/>or<sp/>implied.<sp/><sp/>See<sp/>the<sp/>License<sp/>for<sp/>the</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/>specific<sp/>language<sp/>governing<sp/>permissions<sp/>and<sp/>limitations</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/>under<sp/>the<sp/>License.</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"></highlight><highlight class="preprocessor">#pragma<sp/>once</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;cstdint&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;memory&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;optional&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;span&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;string&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;unordered_map&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;vector&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;iceberg/iceberg_export.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="partition__field_8h" kindref="compound">iceberg/partition_field.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;iceberg/result.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="type__fwd_8h" kindref="compound">iceberg/type_fwd.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="formattable_8h" kindref="compound">iceberg/util/formattable.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="lazy_8h" kindref="compound">iceberg/util/lazy.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">iceberg<sp/>{</highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="47" refid="classiceberg_1_1PartitionSpec" refkind="compound"><highlight class="keyword">class<sp/></highlight><highlight class="normal">ICEBERG_EXPORT<sp/><ref refid="classiceberg_1_1PartitionSpec" kindref="compound">PartitionSpec</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1util_1_1Formattable" kindref="compound">util::Formattable</ref><sp/>{</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">constexpr</highlight><highlight class="normal"><sp/>int32_t<sp/>kInitialSpecId<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="52" refid="classiceberg_1_1PartitionSpec_1ad97896f90ee14db953bd7af46d389b06" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">constexpr</highlight><highlight class="normal"><sp/>int32_t<sp/>kLegacyPartitionDataIdStart<sp/>=<sp/>1000;</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">constexpr</highlight><highlight class="normal"><sp/>int32_t<sp/>kInvalidPartitionFieldId<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::shared_ptr&lt;PartitionSpec&gt;&amp;<sp/>Unpartitioned();</highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/>int32_t<sp/>spec_id()<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/>std::span&lt;const<sp/>PartitionField&gt;<sp/>fields()<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/>Result&lt;std::unique_ptr&lt;StructType&gt;&gt;<sp/>PartitionType(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1Schema" kindref="compound">Schema</ref>&amp;<sp/>schema)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/>Result&lt;std::string&gt;<sp/>PartitionPath(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref>&amp;<sp/>data)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>CompatibleWith(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSpec" kindref="compound">PartitionSpec</ref>&amp;<sp/>other)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="74"><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/>std::string<sp/>ToString()<sp/></highlight><highlight class="keyword">const<sp/>override</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/>int32_t<sp/>last_assigned_field_id()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>last_assigned_field_id_;<sp/>}</highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">friend</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>operator==(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSpec" kindref="compound">PartitionSpec</ref>&amp;<sp/>lhs,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSpec" kindref="compound">PartitionSpec</ref>&amp;<sp/>rhs)<sp/>{</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>lhs.Equals(rhs);</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/>Status<sp/>Validate(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Schema&amp;<sp/>schema,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>allow_missing_fields)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>\brief<sp/>Validates<sp/>the<sp/>partition<sp/>field<sp/>names<sp/>are<sp/>unique<sp/>within<sp/>the<sp/>partition<sp/>spec<sp/>and</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>schema.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>Status<sp/>ValidatePartitionName(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Schema&amp;<sp/>schema,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PartitionSpec&amp;<sp/>spec);</highlight></codeline>
<codeline lineno="93"><highlight class="normal"></highlight></codeline>
<codeline lineno="98" refid="classiceberg_1_1PartitionSpec_1a0337c81bdfc75ae19d371024f09e3af7" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">using<sp/></highlight><highlight class="normal"><ref refid="classiceberg_1_1PartitionSpec_1a0337c81bdfc75ae19d371024f09e3af7" kindref="member">PartitionFieldRef</ref><sp/>=<sp/>std::reference_wrapper&lt;const<sp/>PartitionField&gt;;</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/>Result&lt;std::vector&lt;PartitionFieldRef&gt;&gt;<sp/>GetFieldsBySourceId(int32_t<sp/>source_id)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="100"><highlight class="normal"></highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>Result&lt;std::unique_ptr&lt;PartitionSpec&gt;&gt;<sp/>Make(</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1Schema" kindref="compound">Schema</ref>&amp;<sp/>schema,<sp/>int32_t<sp/>spec_id,<sp/>std::vector&lt;PartitionField&gt;<sp/>fields,</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>allow_missing_fields,</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::optional&lt;int32_t&gt;<sp/>last_assigned_field_id<sp/>=<sp/>std::nullopt);</highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>Result&lt;std::unique_ptr&lt;PartitionSpec&gt;&gt;<sp/>Make(</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>int32_t<sp/>spec_id,<sp/>std::vector&lt;PartitionField&gt;<sp/>fields,</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::optional&lt;int32_t&gt;<sp/>last_assigned_field_id<sp/>=<sp/>std::nullopt);</highlight></codeline>
<codeline lineno="125"><highlight class="normal"></highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>HasSequentialFieldIds(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSpec" kindref="compound">PartitionSpec</ref>&amp;<sp/>spec);</highlight></codeline>
<codeline lineno="127"><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><ref refid="classiceberg_1_1PartitionSpec" kindref="compound">PartitionSpec</ref>(int32_t<sp/>spec_id,<sp/>std::vector&lt;PartitionField&gt;<sp/>fields,</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::optional&lt;int32_t&gt;<sp/>last_assigned_field_id<sp/>=<sp/>std::nullopt);</highlight></codeline>
<codeline lineno="137"><highlight class="normal"></highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>Equals(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSpec" kindref="compound">PartitionSpec</ref>&amp;<sp/>other)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="140"><highlight class="normal"></highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>Status<sp/>ValidateRedundantPartitions(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSpec" kindref="compound">PartitionSpec</ref>&amp;<sp/>spec);</highlight></codeline>
<codeline lineno="143"><highlight class="normal"></highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">using<sp/></highlight><highlight class="normal">SourceIdToFieldsMap<sp/>=<sp/>std::unordered_map&lt;int32_t,<sp/>std::vector&lt;PartitionFieldRef&gt;&gt;;</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>Result&lt;SourceIdToFieldsMap&gt;<sp/>InitSourceIdToFieldsMap(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSpec" kindref="compound">PartitionSpec</ref>&amp;);</highlight></codeline>
<codeline lineno="146"><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>int32_t<sp/>spec_id_;</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/>std::vector&lt;PartitionField&gt;<sp/>fields_;</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/>int32_t<sp/>last_assigned_field_id_;</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><ref refid="classiceberg_1_1Lazy" kindref="compound">Lazy&lt;InitSourceIdToFieldsMap&gt;</ref><sp/>source_id_to_fields_;</highlight></codeline>
<codeline lineno="151"><highlight class="normal">};</highlight></codeline>
<codeline lineno="152"><highlight class="normal"></highlight></codeline>
<codeline lineno="153"><highlight class="normal">}<sp/><sp/></highlight><highlight class="comment">//<sp/>namespace<sp/>iceberg</highlight><highlight class="normal"></highlight></codeline>
</programlisting>
<location file="iceberg/partition_spec.h"/>
</compounddef>
</doxygen>