iceberg-cpp
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Attributes | List of all members
iceberg::StructLikeSet< kValidate > Class Template Reference

A set of StructLike rows with type-aware hashing and equality. More...

#include <struct_like_set.h>

Public Member Functions

 StructLikeSet (const StructType &type, size_t arena_initial_size=kDefaultArenaInitialSize)
 Create a StructLikeSet for the given struct type.
 
Status Insert (const StructLike &row)
 Insert a row into the set.
 
Result< bool > Contains (const StructLike &row) const
 Check if the set contains a row.
 
bool IsEmpty () const
 Check if the set is empty.
 
size_t Size () const
 Get the number of elements in the set.
 

Static Public Attributes

static constexpr size_t kDefaultArenaInitialSize = 64 * 1024
 

Detailed Description

template<bool kValidate = true>
class iceberg::StructLikeSet< kValidate >

A set of StructLike rows with type-aware hashing and equality.

As StructLike uses view semantics, this set makes deep copies of inserted rows into an internal arena to ensure ownership and lifetime safety. Lookups are transparent and do not require temporary allocation.

Template Parameters
kValidateWhen true (default), Insert and Contains validate that each row's scalar types match the schema passed to the constructor. Set to false only when the caller guarantees schema conformance and the validation overhead must be avoided.

The documentation for this class was generated from the following files: