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

Visitor for pruning columns based on selected field IDs. More...

#include <type_util.h>

Public Member Functions

 PruneColumnVisitor (const std::unordered_set< int32_t > &selected_ids, bool select_full_types)
 
Result< std::shared_ptr< Type > > Visit (const std::shared_ptr< Type > &type) const
 
Result< std::shared_ptr< Type > > Visit (const SchemaField &field) const
 
Result< std::shared_ptr< Type > > Visit (const std::shared_ptr< StructType > &type) const
 
Result< std::shared_ptr< Type > > Visit (const std::shared_ptr< ListType > &type) const
 
Result< std::shared_ptr< Type > > Visit (const std::shared_ptr< MapType > &type) const
 

Static Public Member Functions

static SchemaField MakeField (const SchemaField &field, std::shared_ptr< Type > type)
 

Detailed Description

Visitor for pruning columns based on selected field IDs.

This visitor traverses a schema and creates a projected version containing only the specified fields. When select_full_types is true, a field with all its sub-fields are selected if its field-id has been selected; otherwise, only leaf fields of selected field-ids are selected.

Note
It returns an error when projection is not successful.

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