| <?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__value__util_8h" kind="file" language="C++"> |
| <compoundname>partition_value_util.h</compoundname> |
| <includes local="no">functional</includes> |
| <includes local="no">unordered_map</includes> |
| <includes local="no">unordered_set</includes> |
| <includes refid="partition__values_8h" local="yes">iceberg/row/partition_values.h</includes> |
| <includedby refid="delete__file__index_8h" local="yes">iceberg/delete_file_index.h</includedby> |
| <includedby refid="manifest__reader__internal_8h" local="yes">iceberg/manifest/manifest_reader_internal.h</includedby> |
| <includedby refid="partition__value__test_8cc" local="yes">iceberg/test/partition_value_test.cc</includedby> |
| <incdepgraph> |
| <node id="31"> |
| <label>iceberg/exception.h</label> |
| <link refid="exception_8h"/> |
| <childnode refid="32" relation="include"> |
| </childnode> |
| <childnode refid="14" relation="include"> |
| </childnode> |
| </node> |
| <node id="8"> |
| <label>iceberg/expression/literal.h</label> |
| <link refid="literal_8h_source"/> |
| <childnode refid="9" relation="include"> |
| </childnode> |
| <childnode refid="10" relation="include"> |
| </childnode> |
| <childnode refid="11" relation="include"> |
| </childnode> |
| <childnode refid="12" relation="include"> |
| </childnode> |
| <childnode refid="13" relation="include"> |
| </childnode> |
| <childnode refid="14" relation="include"> |
| </childnode> |
| <childnode refid="15" relation="include"> |
| </childnode> |
| <childnode refid="18" relation="include"> |
| </childnode> |
| <childnode refid="33" relation="include"> |
| </childnode> |
| <childnode refid="25" relation="include"> |
| </childnode> |
| <childnode refid="36" relation="include"> |
| </childnode> |
| <childnode refid="37" relation="include"> |
| </childnode> |
| </node> |
| <node id="14"> |
| <label>iceberg/iceberg_export.h</label> |
| <link refid="iceberg__export_8h_source"/> |
| </node> |
| <node id="15"> |
| <label>iceberg/result.h</label> |
| <link refid="result_8h_source"/> |
| <childnode refid="16" relation="include"> |
| </childnode> |
| <childnode refid="17" relation="include"> |
| </childnode> |
| <childnode refid="11" relation="include"> |
| </childnode> |
| <childnode refid="14" relation="include"> |
| </childnode> |
| </node> |
| <node id="5"> |
| <label>iceberg/row/partition_values.h</label> |
| <link refid="partition__values_8h"/> |
| <childnode refid="2" relation="include"> |
| </childnode> |
| <childnode refid="6" relation="include"> |
| </childnode> |
| <childnode refid="7" relation="include"> |
| </childnode> |
| <childnode refid="8" relation="include"> |
| </childnode> |
| <childnode refid="14" relation="include"> |
| </childnode> |
| <childnode refid="38" relation="include"> |
| </childnode> |
| </node> |
| <node id="38"> |
| <label>iceberg/row/struct_like.h</label> |
| <link refid="struct__like_8h"/> |
| <childnode refid="2" relation="include"> |
| </childnode> |
| <childnode refid="10" relation="include"> |
| </childnode> |
| <childnode refid="6" relation="include"> |
| </childnode> |
| <childnode refid="23" relation="include"> |
| </childnode> |
| <childnode refid="12" relation="include"> |
| </childnode> |
| <childnode refid="8" relation="include"> |
| </childnode> |
| <childnode refid="15" relation="include"> |
| </childnode> |
| <childnode refid="24" relation="include"> |
| </childnode> |
| <childnode refid="33" relation="include"> |
| </childnode> |
| </node> |
| <node id="22"> |
| <label>iceberg/schema_field.h</label> |
| <link refid="schema__field_8h"/> |
| <childnode refid="20" relation="include"> |
| </childnode> |
| <childnode refid="10" relation="include"> |
| </childnode> |
| <childnode refid="11" relation="include"> |
| </childnode> |
| <childnode refid="23" relation="include"> |
| </childnode> |
| <childnode refid="14" relation="include"> |
| </childnode> |
| <childnode refid="15" relation="include"> |
| </childnode> |
| <childnode refid="24" relation="include"> |
| </childnode> |
| <childnode refid="25" relation="include"> |
| </childnode> |
| </node> |
| <node id="18"> |
| <label>iceberg/type.h</label> |
| <link refid="type_8h"/> |
| <childnode refid="19" relation="include"> |
| </childnode> |
| <childnode refid="20" relation="include"> |
| </childnode> |
| <childnode refid="10" relation="include"> |
| </childnode> |
| <childnode refid="21" relation="include"> |
| </childnode> |
| <childnode refid="6" relation="include"> |
| </childnode> |
| <childnode refid="11" relation="include"> |
| </childnode> |
| <childnode refid="3" relation="include"> |
| </childnode> |
| <childnode refid="13" relation="include"> |
| </childnode> |
| <childnode refid="14" relation="include"> |
| </childnode> |
| <childnode refid="15" relation="include"> |
| </childnode> |
| <childnode refid="22" relation="include"> |
| </childnode> |
| <childnode refid="25" relation="include"> |
| </childnode> |
| <childnode refid="26" relation="include"> |
| </childnode> |
| </node> |
| <node id="24"> |
| <label>iceberg/type_fwd.h</label> |
| <link refid="type__fwd_8h"/> |
| </node> |
| <node id="33"> |
| <label>iceberg/util/decimal.h</label> |
| <link refid="decimal_8h"/> |
| <childnode refid="19" relation="include"> |
| </childnode> |
| <childnode refid="9" relation="include"> |
| </childnode> |
| <childnode refid="20" relation="include"> |
| </childnode> |
| <childnode refid="34" relation="include"> |
| </childnode> |
| <childnode refid="11" relation="include"> |
| </childnode> |
| <childnode refid="23" relation="include"> |
| </childnode> |
| <childnode refid="35" relation="include"> |
| </childnode> |
| <childnode refid="13" relation="include"> |
| </childnode> |
| <childnode refid="14" relation="include"> |
| </childnode> |
| <childnode refid="15" relation="include"> |
| </childnode> |
| <childnode refid="25" relation="include"> |
| </childnode> |
| <childnode refid="36" relation="include"> |
| </childnode> |
| </node> |
| <node id="25"> |
| <label>iceberg/util/formattable.h</label> |
| <link refid="formattable_8h"/> |
| <childnode refid="11" relation="include"> |
| </childnode> |
| <childnode refid="14" relation="include"> |
| </childnode> |
| </node> |
| <node id="36"> |
| <label>iceberg/util/int128.h</label> |
| <link refid="int128_8h"/> |
| </node> |
| <node id="26"> |
| <label>iceberg/util/lazy.h</label> |
| <link refid="lazy_8h"/> |
| <childnode refid="27" relation="include"> |
| </childnode> |
| <childnode refid="2" relation="include"> |
| </childnode> |
| <childnode refid="28" relation="include"> |
| </childnode> |
| <childnode refid="15" relation="include"> |
| </childnode> |
| <childnode refid="29" relation="include"> |
| </childnode> |
| </node> |
| <node id="29"> |
| <label>iceberg/util/macros.h</label> |
| <link refid="macros_8h_source"/> |
| <childnode refid="30" relation="include"> |
| </childnode> |
| <childnode refid="31" relation="include"> |
| </childnode> |
| <childnode refid="15" relation="include"> |
| </childnode> |
| </node> |
| <node id="1"> |
| <label>iceberg/util/partition_value_util.h</label> |
| <link refid="partition__value__util_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> |
| </node> |
| <node id="37"> |
| <label>iceberg/util/uuid.h</label> |
| <link refid="uuid_8h"/> |
| <childnode refid="19" relation="include"> |
| </childnode> |
| <childnode refid="20" relation="include"> |
| </childnode> |
| <childnode refid="6" relation="include"> |
| </childnode> |
| <childnode refid="23" relation="include"> |
| </childnode> |
| <childnode refid="14" relation="include"> |
| </childnode> |
| <childnode refid="15" relation="include"> |
| </childnode> |
| <childnode refid="25" relation="include"> |
| </childnode> |
| </node> |
| <node id="19"> |
| <label>array</label> |
| </node> |
| <node id="30"> |
| <label>cassert</label> |
| </node> |
| <node id="9"> |
| <label>compare</label> |
| </node> |
| <node id="27"> |
| <label>concepts</label> |
| </node> |
| <node id="20"> |
| <label>cstdint</label> |
| </node> |
| <node id="16"> |
| <label>expected</label> |
| </node> |
| <node id="17"> |
| <label>format</label> |
| </node> |
| <node id="2"> |
| <label>functional</label> |
| </node> |
| <node id="34"> |
| <label>iosfwd</label> |
| </node> |
| <node id="10"> |
| <label>memory</label> |
| </node> |
| <node id="28"> |
| <label>mutex</label> |
| </node> |
| <node id="21"> |
| <label>optional</label> |
| </node> |
| <node id="6"> |
| <label>span</label> |
| </node> |
| <node id="32"> |
| <label>stdexcept</label> |
| </node> |
| <node id="11"> |
| <label>string</label> |
| </node> |
| <node id="23"> |
| <label>string_view</label> |
| </node> |
| <node id="35"> |
| <label>type_traits</label> |
| </node> |
| <node id="3"> |
| <label>unordered_map</label> |
| </node> |
| <node id="4"> |
| <label>unordered_set</label> |
| </node> |
| <node id="7"> |
| <label>utility</label> |
| </node> |
| <node id="12"> |
| <label>variant</label> |
| </node> |
| <node id="13"> |
| <label>vector</label> |
| </node> |
| </incdepgraph> |
| <invincdepgraph> |
| <node id="2"> |
| <label>iceberg/delete_file_index.h</label> |
| <link refid="delete__file__index_8h"/> |
| <childnode refid="3" relation="include"> |
| </childnode> |
| </node> |
| <node id="3"> |
| <label>iceberg/manifest/manifest_group.h</label> |
| <link refid="manifest__group_8h"/> |
| </node> |
| <node id="4"> |
| <label>iceberg/manifest/manifest_reader_internal.h</label> |
| <link refid="manifest__reader__internal_8h"/> |
| </node> |
| <node id="1"> |
| <label>iceberg/util/partition_value_util.h</label> |
| <link refid="partition__value__util_8h"/> |
| <childnode refid="2" relation="include"> |
| </childnode> |
| <childnode refid="4" relation="include"> |
| </childnode> |
| </node> |
| </invincdepgraph> |
| <innerclass refid="structiceberg_1_1PartitionKeyRef" prot="public">iceberg::PartitionKeyRef</innerclass> |
| <innerclass refid="structiceberg_1_1PartitionValuesHash" prot="public">iceberg::PartitionValuesHash</innerclass> |
| <innerclass refid="structiceberg_1_1PartitionValuesEqual" prot="public">iceberg::PartitionValuesEqual</innerclass> |
| <innerclass refid="structiceberg_1_1PartitionKeyHash" prot="public">iceberg::PartitionKeyHash</innerclass> |
| <innerclass refid="structiceberg_1_1PartitionKeyEqual" prot="public">iceberg::PartitionKeyEqual</innerclass> |
| <innerclass refid="classiceberg_1_1PartitionMap" prot="public">iceberg::PartitionMap</innerclass> |
| <innerclass refid="classiceberg_1_1PartitionSet" prot="public">iceberg::PartitionSet</innerclass> |
| <innernamespace refid="namespaceiceberg">iceberg</innernamespace> |
| <briefdescription> |
| </briefdescription> |
| <detaileddescription> |
| </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/>"License");<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/>"AS<sp/>IS"<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/><functional></highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="26"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><unordered_map></highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="27"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><unordered_set></highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="28"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="partition__values_8h" kindref="compound">iceberg/row/partition_values.h</ref>"</highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="30"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="31"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">iceberg<sp/>{</highlight></codeline> |
| <codeline lineno="32"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="33"><highlight class="normal"></highlight><highlight class="keyword">constexpr</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>kHashPrime<sp/>=<sp/>0x9e3779b9;</highlight></codeline> |
| <codeline lineno="34"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="35"><highlight class="normal"></highlight><highlight class="keyword">using<sp/></highlight><highlight class="normal">PartitionKey<sp/>=<sp/>std::pair<int32_t,<sp/>PartitionValues>;</highlight></codeline> |
| <codeline lineno="36"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="39" refid="structiceberg_1_1PartitionKeyRef" refkind="compound"><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref><sp/>{</highlight></codeline> |
| <codeline lineno="40"><highlight class="normal"><sp/><sp/>int32_t<sp/>spec_id;</highlight></codeline> |
| <codeline lineno="41"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref>&<sp/>values;</highlight></codeline> |
| <codeline lineno="42"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="43"><highlight class="normal"><sp/><sp/><ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>(int32_t<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref>&<sp/>vals)<sp/>:<sp/>spec_id(</highlight><highlight class="keywordtype">id</highlight><highlight class="normal">),<sp/>values(vals)<sp/>{}</highlight></codeline> |
| <codeline lineno="44"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="45"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">explicit</highlight><highlight class="normal"><sp/><ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PartitionKey&<sp/>key)</highlight></codeline> |
| <codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>:<sp/>spec_id(key.first),<sp/>values(key.second)<sp/>{}</highlight></codeline> |
| <codeline lineno="47"><highlight class="normal">};</highlight></codeline> |
| <codeline lineno="48"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="50" refid="structiceberg_1_1PartitionValuesHash" refkind="compound"><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structiceberg_1_1PartitionValuesHash" kindref="compound">PartitionValuesHash</ref><sp/>{</highlight></codeline> |
| <codeline lineno="51"><highlight class="normal"><sp/><sp/>std::size_t<sp/>operator()(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref>&<sp/>partition)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">noexcept</highlight><highlight class="normal"><sp/>{</highlight></codeline> |
| <codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/>std::size_t<sp/>hash<sp/>=<sp/>0;</highlight></codeline> |
| <codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structiceberg_1_1LiteralHash" kindref="compound">LiteralHash</ref><sp/>literal_hash;</highlight></codeline> |
| <codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">auto</highlight><highlight class="normal">&<sp/>literal<sp/>:<sp/>partition.values())<sp/>{</highlight></codeline> |
| <codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hash<sp/>^=<sp/>literal_hash(literal)<sp/>+<sp/>kHashPrime<sp/>+<sp/>(hash<sp/><<<sp/>6)<sp/>+<sp/>(hash<sp/>>><sp/>2);</highlight></codeline> |
| <codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>hash;</highlight></codeline> |
| <codeline lineno="58"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="59"><highlight class="normal">};</highlight></codeline> |
| <codeline lineno="60"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="62" refid="structiceberg_1_1PartitionValuesEqual" refkind="compound"><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structiceberg_1_1PartitionValuesEqual" kindref="compound">PartitionValuesEqual</ref><sp/>{</highlight></codeline> |
| <codeline lineno="63"><highlight class="normal"><sp/><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_1PartitionValues" kindref="compound">PartitionValues</ref>&<sp/>lhs,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref>&<sp/>rhs)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>lhs<sp/>==<sp/>rhs;</highlight></codeline> |
| <codeline lineno="65"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="66"><highlight class="normal">};</highlight></codeline> |
| <codeline lineno="67"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="69" refid="structiceberg_1_1PartitionKeyHash" refkind="compound"><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structiceberg_1_1PartitionKeyHash" kindref="compound">PartitionKeyHash</ref><sp/>{</highlight></codeline> |
| <codeline lineno="70"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">using<sp/></highlight><highlight class="normal">is_transparent<sp/>=<sp/>void;</highlight></codeline> |
| <codeline lineno="71"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="72"><highlight class="normal"><sp/><sp/>std::size_t<sp/>operator()(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PartitionKey&<sp/>key)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">noexcept</highlight><highlight class="normal"><sp/>{</highlight></codeline> |
| <codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/>std::size_t<sp/>hash<sp/>=<sp/>std::hash<int32_t>{}(key.first);</highlight></codeline> |
| <codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/>hash<sp/>^=<sp/><ref refid="structiceberg_1_1PartitionValuesHash" kindref="compound">PartitionValuesHash</ref>{}(key.second)<sp/>+<sp/>kHashPrime<sp/>+<sp/>(hash<sp/><<<sp/>6)<sp/>+<sp/>(hash<sp/>>><sp/>2);</highlight></codeline> |
| <codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>hash;</highlight></codeline> |
| <codeline lineno="76"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="77"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="78"><highlight class="normal"><sp/><sp/>std::size_t<sp/>operator()(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>&<sp/>key)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">noexcept</highlight><highlight class="normal"><sp/>{</highlight></codeline> |
| <codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/>std::size_t<sp/>hash<sp/>=<sp/>std::hash<int32_t>{}(key.spec_id);</highlight></codeline> |
| <codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/>hash<sp/>^=<sp/><ref refid="structiceberg_1_1PartitionValuesHash" kindref="compound">PartitionValuesHash</ref>{}(key.values)<sp/>+<sp/>kHashPrime<sp/>+<sp/>(hash<sp/><<<sp/>6)<sp/>+<sp/>(hash<sp/>>><sp/>2);</highlight></codeline> |
| <codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>hash;</highlight></codeline> |
| <codeline lineno="82"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="83"><highlight class="normal">};</highlight></codeline> |
| <codeline lineno="84"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="87" refid="structiceberg_1_1PartitionKeyEqual" refkind="compound"><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structiceberg_1_1PartitionKeyEqual" kindref="compound">PartitionKeyEqual</ref><sp/>{</highlight></codeline> |
| <codeline lineno="88"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">using<sp/></highlight><highlight class="normal">is_transparent<sp/>=<sp/>void;</highlight></codeline> |
| <codeline lineno="89"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="90"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Equality<sp/>for<sp/>PartitionKey<sp/>vs<sp/>PartitionKey</highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="91"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>operator()(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PartitionKey&<sp/>lhs,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PartitionKey&<sp/>rhs)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>lhs.first<sp/>==<sp/>rhs.first<sp/>&&<sp/>lhs.second<sp/>==<sp/>rhs.second;</highlight></codeline> |
| <codeline lineno="93"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="94"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="95"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Equality<sp/>for<sp/>PartitionKey<sp/>vs<sp/>PartitionKeyRef<sp/>(heterogeneous<sp/>lookup)</highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="96"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>operator()(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PartitionKey&<sp/>lhs,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>&<sp/>rhs)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>lhs.first<sp/>==<sp/>rhs.spec_id<sp/>&&<sp/>lhs.second<sp/>==<sp/>rhs.values;</highlight></codeline> |
| <codeline lineno="98"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="99"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="100"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Equality<sp/>for<sp/>PartitionKeyRef<sp/>vs<sp/>PartitionKey<sp/>(heterogeneous<sp/>lookup)</highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="101"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>operator()(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>&<sp/>lhs,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>PartitionKey&<sp/>rhs)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>lhs.spec_id<sp/>==<sp/>rhs.first<sp/>&&<sp/>lhs.values<sp/>==<sp/>rhs.second;</highlight></codeline> |
| <codeline lineno="103"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="104"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="105"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Equality<sp/>for<sp/>PartitionKeyRef<sp/>vs<sp/>PartitionKeyRef<sp/>(heterogeneous<sp/>lookup)</highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="106"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>operator()(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>&<sp/>lhs,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>&<sp/>rhs)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>lhs.spec_id<sp/>==<sp/>rhs.spec_id<sp/>&&<sp/>lhs.values<sp/>==<sp/>rhs.values;</highlight></codeline> |
| <codeline lineno="108"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="109"><highlight class="normal">};</highlight></codeline> |
| <codeline lineno="110"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="114"><highlight class="keyword">template</highlight><highlight class="normal"><sp/><</highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>V></highlight></codeline> |
| <codeline lineno="115" refid="classiceberg_1_1PartitionMap" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classiceberg_1_1PartitionMap" kindref="compound">PartitionMap</ref><sp/>{</highlight></codeline> |
| <codeline lineno="116"><highlight class="normal"><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline> |
| <codeline lineno="117"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">using<sp/></highlight><highlight class="normal">map_type<sp/>=</highlight></codeline> |
| <codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::unordered_map<PartitionKey,<sp/>V,<sp/>PartitionKeyHash,<sp/>PartitionKeyEqual>;</highlight></codeline> |
| <codeline lineno="119"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">using<sp/></highlight><highlight class="normal">iterator<sp/>=<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>map_type::iterator;</highlight></codeline> |
| <codeline lineno="120"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">using<sp/></highlight><highlight class="normal">const_iterator<sp/>=<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>map_type::const_iterator;</highlight></codeline> |
| <codeline lineno="121"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="122"><highlight class="normal"><sp/><sp/><ref refid="classiceberg_1_1PartitionMap" kindref="compound">PartitionMap</ref>()<sp/>=<sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="123"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="125" refid="classiceberg_1_1PartitionMap_1a5738bb4dd60ac18df3558f45449fad7d" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionMap_1a5738bb4dd60ac18df3558f45449fad7d" kindref="member">size</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>map_.size();<sp/>}</highlight></codeline> |
| <codeline lineno="126"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="128" refid="classiceberg_1_1PartitionMap_1af7217d05bde0386b324836e21dd2da27" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionMap_1af7217d05bde0386b324836e21dd2da27" kindref="member">empty</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>map_.empty();<sp/>}</highlight></codeline> |
| <codeline lineno="129"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="131" refid="classiceberg_1_1PartitionMap_1abf20fd624b6b472c917356a77d8c9e31" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionMap_1abf20fd624b6b472c917356a77d8c9e31" kindref="member">clear</ref>()<sp/>{<sp/>map_.clear();<sp/>}</highlight></codeline> |
| <codeline lineno="132"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="137" refid="classiceberg_1_1PartitionMap_1a246b0860456fe5b18b5bdbc0f29d7fac" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionMap_1a246b0860456fe5b18b5bdbc0f29d7fac" kindref="member">contains</ref>(int32_t<sp/>spec_id,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref>&<sp/>values)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>map_.contains(<ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>{spec_id,<sp/>values});</highlight></codeline> |
| <codeline lineno="139"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="140"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="145" refid="classiceberg_1_1PartitionMap_1aad3aef080bffcf431dd842c64ec3c2fa" refkind="member"><highlight class="normal"><sp/><sp/>std::optional<std::reference_wrapper<V>><sp/><ref refid="classiceberg_1_1PartitionMap_1aad3aef080bffcf431dd842c64ec3c2fa" kindref="member">get</ref>(int32_t<sp/>spec_id,</highlight></codeline> |
| <codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref>&<sp/>values)<sp/>{</highlight></codeline> |
| <codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/>it<sp/>=<sp/>map_.find(<ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>{spec_id,<sp/>values});</highlight></codeline> |
| <codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>it<sp/>!=<sp/>map_.end()<sp/>?<sp/>std::make_optional(std::ref(it->second))<sp/>:<sp/>std::nullopt;</highlight></codeline> |
| <codeline lineno="149"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="150"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="155" refid="classiceberg_1_1PartitionMap_1a80591b187615041524268d840cf3e4a8" refkind="member"><highlight class="normal"><sp/><sp/>std::optional<std::reference_wrapper<const<sp/>V>><sp/><ref refid="classiceberg_1_1PartitionMap_1a80591b187615041524268d840cf3e4a8" kindref="member">get</ref>(</highlight></codeline> |
| <codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>int32_t<sp/>spec_id,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref>&<sp/>values)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/>it<sp/>=<sp/>map_.find(<ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>{spec_id,<sp/>values});</highlight></codeline> |
| <codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>it<sp/>!=<sp/>map_.end()<sp/>?<sp/>std::make_optional(std::cref(it->second))<sp/>:<sp/>std::nullopt;</highlight></codeline> |
| <codeline lineno="159"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="160"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="166" refid="classiceberg_1_1PartitionMap_1a3a636bef5195a38c0e79fd4e0c7c941c" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionMap_1a3a636bef5195a38c0e79fd4e0c7c941c" kindref="member">put</ref>(int32_t<sp/>spec_id,<sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref><sp/>values,<sp/>V<sp/>value)<sp/>{</highlight></codeline> |
| <codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/>it<sp/>=<sp/>map_.find(<ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>{spec_id,<sp/>values});</highlight></codeline> |
| <codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(it<sp/>!=<sp/>map_.end())<sp/>{</highlight></codeline> |
| <codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>it->second<sp/>=<sp/>std::move(value);</highlight></codeline> |
| <codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/>map_.emplace(PartitionKey{spec_id,<sp/>std::move(values)},<sp/>std::move(value));</highlight></codeline> |
| <codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="174"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="175"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="180" refid="classiceberg_1_1PartitionMap_1a929b3585cf3c393f74cd52557d58e021" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionMap_1a929b3585cf3c393f74cd52557d58e021" kindref="member">remove</ref>(int32_t<sp/>spec_id,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref>&<sp/>values)<sp/>{</highlight></codeline> |
| <codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/>it<sp/>=<sp/>map_.find(<ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>{spec_id,<sp/>values});</highlight></codeline> |
| <codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(it<sp/>!=<sp/>map_.end())<sp/>{</highlight></codeline> |
| <codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>map_.erase(it);</highlight></codeline> |
| <codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="187"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="188"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="190" refid="classiceberg_1_1PartitionMap_1a21159aeb3ae334c05f619b554f0fd329" refkind="member"><highlight class="normal"><sp/><sp/>iterator<sp/><ref refid="classiceberg_1_1PartitionMap_1a21159aeb3ae334c05f619b554f0fd329" kindref="member">begin</ref>()<sp/>{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>map_.begin();<sp/>}</highlight></codeline> |
| <codeline lineno="191"><highlight class="normal"><sp/><sp/>const_iterator<sp/><ref refid="classiceberg_1_1PartitionMap_1a21159aeb3ae334c05f619b554f0fd329" kindref="member">begin</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>map_.begin();<sp/>}</highlight></codeline> |
| <codeline lineno="192"><highlight class="normal"><sp/><sp/>const_iterator<sp/>cbegin()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>map_.cbegin();<sp/>}</highlight></codeline> |
| <codeline lineno="193"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="195" refid="classiceberg_1_1PartitionMap_1a6b188d9adb334b132f8f201e4d2eae65" refkind="member"><highlight class="normal"><sp/><sp/>iterator<sp/><ref refid="classiceberg_1_1PartitionMap_1a6b188d9adb334b132f8f201e4d2eae65" kindref="member">end</ref>()<sp/>{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>map_.end();<sp/>}</highlight></codeline> |
| <codeline lineno="196"><highlight class="normal"><sp/><sp/>const_iterator<sp/><ref refid="classiceberg_1_1PartitionMap_1a6b188d9adb334b132f8f201e4d2eae65" kindref="member">end</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>map_.end();<sp/>}</highlight></codeline> |
| <codeline lineno="197"><highlight class="normal"><sp/><sp/>const_iterator<sp/>cend()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>map_.cend();<sp/>}</highlight></codeline> |
| <codeline lineno="198"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="199"><highlight class="normal"><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline> |
| <codeline lineno="200"><highlight class="normal"><sp/><sp/>map_type<sp/>map_;</highlight></codeline> |
| <codeline lineno="201"><highlight class="normal">};</highlight></codeline> |
| <codeline lineno="202"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="204" refid="classiceberg_1_1PartitionSet" refkind="compound"><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classiceberg_1_1PartitionSet" kindref="compound">PartitionSet</ref><sp/>{</highlight></codeline> |
| <codeline lineno="205"><highlight class="normal"><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline> |
| <codeline lineno="206"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">using<sp/></highlight><highlight class="normal">set_type<sp/>=<sp/>std::unordered_set<PartitionKey,<sp/>PartitionKeyHash,<sp/>PartitionKeyEqual>;</highlight></codeline> |
| <codeline lineno="207"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">using<sp/></highlight><highlight class="normal">iterator<sp/>=<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>set_type::iterator;</highlight></codeline> |
| <codeline lineno="208"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">using<sp/></highlight><highlight class="normal">const_iterator<sp/>=<sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>set_type::const_iterator;</highlight></codeline> |
| <codeline lineno="209"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="210"><highlight class="normal"><sp/><sp/><ref refid="classiceberg_1_1PartitionSet" kindref="compound">PartitionSet</ref>()<sp/>=<sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="211"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="213" refid="classiceberg_1_1PartitionSet_1a684a0ae11210a1020acf0021d6cc1391" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSet_1a684a0ae11210a1020acf0021d6cc1391" kindref="member">size</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>set_.size();<sp/>}</highlight></codeline> |
| <codeline lineno="214"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="216" refid="classiceberg_1_1PartitionSet_1ae5fd71adff5f78784d31e958a5a61756" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSet_1ae5fd71adff5f78784d31e958a5a61756" kindref="member">empty</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>set_.empty();<sp/>}</highlight></codeline> |
| <codeline lineno="217"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="219" refid="classiceberg_1_1PartitionSet_1aa62a783fd9c1bd65c288712c9357452f" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSet_1aa62a783fd9c1bd65c288712c9357452f" kindref="member">clear</ref>()<sp/>{<sp/>set_.clear();<sp/>}</highlight></codeline> |
| <codeline lineno="220"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="225" refid="classiceberg_1_1PartitionSet_1aca01f4e8721f51250d3da320425db652" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSet_1aca01f4e8721f51250d3da320425db652" kindref="member">contains</ref>(int32_t<sp/>spec_id,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref>&<sp/>values)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>set_.contains(<ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>{spec_id,<sp/>values});</highlight></codeline> |
| <codeline lineno="227"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="228"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="233" refid="classiceberg_1_1PartitionSet_1a2c4223067249ddd6253798d4d509eb3a" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSet_1a2c4223067249ddd6253798d4d509eb3a" kindref="member">add</ref>(int32_t<sp/>spec_id,<sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref><sp/>values)<sp/>{</highlight></codeline> |
| <codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/>[_,<sp/>inserted]<sp/>=<sp/>set_.emplace(spec_id,<sp/>std::move(values));</highlight></codeline> |
| <codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>inserted;</highlight></codeline> |
| <codeline lineno="236"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="237"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="242" refid="classiceberg_1_1PartitionSet_1ae0cd35b23f1b23a4eeb6f1ab0c435baa" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionSet_1ae0cd35b23f1b23a4eeb6f1ab0c435baa" kindref="member">remove</ref>(int32_t<sp/>spec_id,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classiceberg_1_1PartitionValues" kindref="compound">PartitionValues</ref>&<sp/>values)<sp/>{</highlight></codeline> |
| <codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/>it<sp/>=<sp/>set_.find(<ref refid="structiceberg_1_1PartitionKeyRef" kindref="compound">PartitionKeyRef</ref>{spec_id,<sp/>values});</highlight></codeline> |
| <codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(it<sp/>!=<sp/>set_.end())<sp/>{</highlight></codeline> |
| <codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>set_.erase(it);</highlight></codeline> |
| <codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="249"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="250"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="252" refid="classiceberg_1_1PartitionSet_1a4296024c9e53850144848055a6c01125" refkind="member"><highlight class="normal"><sp/><sp/>iterator<sp/><ref refid="classiceberg_1_1PartitionSet_1a4296024c9e53850144848055a6c01125" kindref="member">begin</ref>()<sp/>{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>set_.begin();<sp/>}</highlight></codeline> |
| <codeline lineno="253"><highlight class="normal"><sp/><sp/>const_iterator<sp/><ref refid="classiceberg_1_1PartitionSet_1a4296024c9e53850144848055a6c01125" kindref="member">begin</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>set_.begin();<sp/>}</highlight></codeline> |
| <codeline lineno="254"><highlight class="normal"><sp/><sp/>const_iterator<sp/>cbegin()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>set_.cbegin();<sp/>}</highlight></codeline> |
| <codeline lineno="255"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="257" refid="classiceberg_1_1PartitionSet_1a984b44a4f4165b083f969795abf1427a" refkind="member"><highlight class="normal"><sp/><sp/>iterator<sp/><ref refid="classiceberg_1_1PartitionSet_1a984b44a4f4165b083f969795abf1427a" kindref="member">end</ref>()<sp/>{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>set_.end();<sp/>}</highlight></codeline> |
| <codeline lineno="258"><highlight class="normal"><sp/><sp/>const_iterator<sp/><ref refid="classiceberg_1_1PartitionSet_1a984b44a4f4165b083f969795abf1427a" kindref="member">end</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>set_.end();<sp/>}</highlight></codeline> |
| <codeline lineno="259"><highlight class="normal"><sp/><sp/>const_iterator<sp/>cend()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>set_.cend();<sp/>}</highlight></codeline> |
| <codeline lineno="260"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="261"><highlight class="normal"><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline> |
| <codeline lineno="262"><highlight class="normal"><sp/><sp/>set_type<sp/>set_;</highlight></codeline> |
| <codeline lineno="263"><highlight class="normal">};</highlight></codeline> |
| <codeline lineno="264"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="265"><highlight class="normal">}<sp/><sp/></highlight><highlight class="comment">//<sp/>namespace<sp/>iceberg</highlight><highlight class="normal"></highlight></codeline> |
| </programlisting> |
| <location file="iceberg/util/partition_value_util.h"/> |
| </compounddef> |
| </doxygen> |