iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | List of all members
iceberg::PartitionValues Class Reference

StructLike wrapper for a vector of literals that represent partition values. More...

#include <partition_values.h>

Inheritance diagram for iceberg::PartitionValues:
iceberg::StructLike

Public Member Functions

 PartitionValues (std::vector< Literal > values)
 
 PartitionValues (Literal value)
 
 PartitionValues (const PartitionValues &other)
 
PartitionValuesoperator= (const PartitionValues &other)
 
 PartitionValues (PartitionValues &&) noexcept=default
 
PartitionValuesoperator= (PartitionValues &&) noexcept=default
 
Result< ScalarGetField (size_t pos) const override
 Get the field value at the given position.
 
size_t num_fields () const override
 Get the number of fields in the struct.
 
Result< std::reference_wrapper< const Literal > > ValueAt (size_t pos) const
 Get the partition field value at the given position.
 
void AddValue (Literal value)
 Add a value to the partition values.
 
void Reset (std::vector< Literal > values)
 Reset the partition values.
 
std::span< const Literalvalues () const
 
bool operator== (const PartitionValues &other) const
 

Detailed Description

StructLike wrapper for a vector of literals that represent partition values.

Member Function Documentation

◆ AddValue()

void iceberg::PartitionValues::AddValue ( Literal  value)
inline

Add a value to the partition values.

Parameters
valueThe value to add.

◆ GetField()

Result< Scalar > iceberg::PartitionValues::GetField ( size_t  pos) const
overridevirtual

Get the field value at the given position.

Parameters
posThe position of the field in the struct.

Implements iceberg::StructLike.

◆ num_fields()

size_t iceberg::PartitionValues::num_fields ( ) const
inlineoverridevirtual

Get the number of fields in the struct.

Implements iceberg::StructLike.

◆ Reset()

void iceberg::PartitionValues::Reset ( std::vector< Literal values)
inline

Reset the partition values.

Parameters
valuesThe values to reset to.

◆ ValueAt()

Result< std::reference_wrapper< const Literal > > iceberg::PartitionValues::ValueAt ( size_t  pos) const

Get the partition field value at the given position.

Parameters
posThe position of the field in the struct.
Returns
A reference to the partition field value.

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