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

Configure a scan over captured metadata; the metadata table must outlive it. More...

#include <metadata_scan.h>

Inheritance diagram for iceberg::MetadataScanBuilder:
iceberg::ErrorCollector

Public Member Functions

MetadataScanBuilder & Select (const std::vector< std::string > &columns)
 Select names using the current CaseSensitive() setting.
 
MetadataScanBuilder & Project (std::shared_ptr< Schema > schema)
 Project whole columns by field ID, optionally reordering them.
 
MetadataScanBuilder & CaseSensitive (bool value)
 Match column names case-sensitively; enabled by default.
 
MetadataScanBuilder & UseSnapshot (int64_t snapshot_id)
 Select a snapshot ID; Build rejects tables without time travel.
 
MetadataScanBuilder & UseRef (const std::string &ref)
 Select a branch or tag; Build rejects tables without time travel.
 
MetadataScanBuilder & AsOfTime (int64_t as_of_time_in_millis)
 Select the latest snapshot at or before this timestamp on the selected ref.
 
Result< std::unique_ptr< MetadataScan > > Build ()
 Validate the settings and build a scan with its own copy of them.
 
- Public Member Functions inherited from iceberg::ErrorCollector
 ErrorCollector (ErrorCollector &&)=default
 
ErrorCollector & operator= (ErrorCollector &&)=default
 
 ErrorCollector (const ErrorCollector &)=default
 
ErrorCollector & operator= (const ErrorCollector &)=default
 
template<typename... Args>
auto & AddError (this auto &self, ErrorKind kind, const std::format_string< Args... > fmt, Args &&... args)
 Add a specific error.
 
auto & AddError (this auto &self, Error err)
 Add an existing error object.
 
auto & AddError (this auto &self, ::iceberg::unexpected< Error > err)
 Add an unexpected result's error.
 
auto & AddError (this auto &self, std::unexpected< Error > err)
 
bool has_errors () const
 Check if any errors have been collected.
 
size_t error_count () const
 Get the number of errors collected.
 
Status CheckErrors () const
 Check for accumulated errors and return them if any exist.
 
void ClearErrors ()
 Clear all accumulated errors.
 
const std::vector< Error > & errors () const
 Get read-only access to all collected errors.
 

Static Public Member Functions

static Result< std::unique_ptr< MetadataScanBuilder > > Make (const MetadataTable &table)
 Capture the source metadata and schema of a metadata table.
 

Additional Inherited Members

- Protected Attributes inherited from iceberg::ErrorCollector
std::vector< Error > errors_
 

Detailed Description

Configure a scan over captured metadata; the metadata table must outlive it.

Member Function Documentation

◆ AsOfTime()

MetadataScanBuilder & iceberg::MetadataScanBuilder::AsOfTime ( int64_t  as_of_time_in_millis)

Select the latest snapshot at or before this timestamp on the selected ref.

The timestamp is milliseconds since the Unix epoch. Build rejects tables without time travel.

◆ Build()

Result< std::unique_ptr< MetadataScan > > iceberg::MetadataScanBuilder::Build ( )

Validate the settings and build a scan with its own copy of them.

Later builder changes and normal source table refreshes do not affect it.

◆ Project()

MetadataScanBuilder & iceberg::MetadataScanBuilder::Project ( std::shared_ptr< Schema >  schema)

Project whole columns by field ID, optionally reordering them.

Types must match and nullable columns cannot become required.

◆ Select()

MetadataScanBuilder & iceberg::MetadataScanBuilder::Select ( const std::vector< std::string > &  columns)

Select names using the current CaseSensitive() setting.

Columns are returned in schema order; unknown names are ignored. An empty list selects no columns and * selects all columns. Nested names use dots; selecting a map value selects the whole map, while selecting only its key fails.


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