A map that uses a pair of spec ID and partition tuple as keys.
More...
#include <partition_value_util.h>
|
|
using | map_type = std::unordered_map< PartitionKey, V, PartitionKeyHash, PartitionKeyEqual > |
| |
|
using | iterator = typename map_type::iterator |
| |
|
using | const_iterator = typename map_type::const_iterator |
| |
|
|
size_t | size () const |
| | Get the number of entries in the map.
|
| |
|
bool | empty () const |
| | Check if the map is empty.
|
| |
|
void | clear () |
| | Clear all entries from the map.
|
| |
| bool | contains (int32_t spec_id, const PartitionValues &values) const |
| | Check if the map contains a key.
|
| |
| std::optional< std::reference_wrapper< V > > | get (int32_t spec_id, const PartitionValues &values) |
| | Get the value associated with a key.
|
| |
| std::optional< std::reference_wrapper< const V > > | get (int32_t spec_id, const PartitionValues &values) const |
| | Get the value associated with a key (const version).
|
| |
| bool | put (int32_t spec_id, PartitionValues values, V value) |
| | Insert or update a value in the map.
|
| |
| bool | remove (int32_t spec_id, const PartitionValues &values) |
| | Remove an entry from the map.
|
| |
|
iterator | begin () |
| | Get iterator to the beginning.
|
| |
|
const_iterator | begin () const |
| |
|
const_iterator | cbegin () const |
| |
|
iterator | end () |
| | Get iterator to the end.
|
| |
|
const_iterator | end () const |
| |
|
const_iterator | cend () const |
| |
template<typename V>
class iceberg::PartitionMap< V >
A map that uses a pair of spec ID and partition tuple as keys.
- Template Parameters
-
◆ contains()
Check if the map contains a key.
- Parameters
-
| spec_id | The partition spec ID. |
| values | The partition values. |
- Returns
- true if the key exists, false otherwise.
◆ get() [1/2]
Get the value associated with a key.
- Parameters
-
| spec_id | The partition spec ID. |
| values | The partition values. |
- Returns
- Reference to the value if found, std::nullopt otherwise.
◆ get() [2/2]
Get the value associated with a key (const version).
- Parameters
-
| spec_id | The partition spec ID. |
| values | The partition values. |
- Returns
- Reference to the value if found, std::nullopt otherwise.
◆ put()
Insert or update a value in the map.
- Parameters
-
| spec_id | The partition spec ID. |
| values | The partition values. |
| value | The value to insert. |
- Returns
- true if the entry was updated, false if it was inserted.
◆ remove()
Remove an entry from the map.
- Parameters
-
| spec_id | The partition spec ID. |
| values | The partition values. |
- Returns
- true if the entry was removed, false if it didn't exist.
The documentation for this class was generated from the following file: