iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | List of all members
iceberg::ExpressionVisitor< R > Class Template Referenceabstract

Base visitor for traversing expression trees. More...

#include <expression_visitor.h>

Inheritance diagram for iceberg::ExpressionVisitor< R >:
iceberg::BoundVisitor< bool > iceberg::BoundVisitor< R > iceberg::EvalVisitor iceberg::InclusiveMetricsVisitor iceberg::ManifestEvalVisitor iceberg::StrictMetricsVisitor

Public Member Functions

virtual Result< R > AlwaysTrue ()=0
 Visit a True expression (always evaluates to true).
 
virtual Result< R > AlwaysFalse ()=0
 Visit a False expression (always evaluates to false).
 
virtual Result< R > Not (ParamType child_result)=0
 Visit a Not expression.
 
virtual Result< R > And (ParamType left_result, ParamType right_result)=0
 Visit an And expression.
 
virtual Result< R > Or (ParamType left_result, ParamType right_result)=0
 Visit an Or expression.
 
virtual Result< R > Predicate (const std::shared_ptr< BoundPredicate > &pred)=0
 Visit a bound predicate.
 
virtual Result< R > Predicate (const std::shared_ptr< UnboundPredicate > &pred)=0
 Visit an unbound predicate.
 
virtual Result< R > Aggregate (const std::shared_ptr< BoundAggregate > &aggregate)
 Visit a bound aggregate.
 
virtual Result< R > Aggregate (const std::shared_ptr< UnboundAggregate > &aggregate)
 Visit an unbound aggregate.
 

Detailed Description

template<typename R>
class iceberg::ExpressionVisitor< R >

Base visitor for traversing expression trees.

This visitor traverses expression trees in postorder traversal and calls appropriate visitor methods for each node. Subclasses can override specific methods to implement custom behavior.

Template Parameters
RThe return type produced by visitor methods

Member Function Documentation

◆ Aggregate() [1/2]

template<typename R >
virtual Result< R > iceberg::ExpressionVisitor< R >::Aggregate ( const std::shared_ptr< BoundAggregate > &  aggregate)
inlinevirtual

Visit a bound aggregate.

Parameters
aggregateThe bound aggregate to visit.

Reimplemented in iceberg::Binder, iceberg::IsBoundVisitor, and iceberg::ReferenceVisitor.

◆ Aggregate() [2/2]

template<typename R >
virtual Result< R > iceberg::ExpressionVisitor< R >::Aggregate ( const std::shared_ptr< UnboundAggregate > &  aggregate)
inlinevirtual

Visit an unbound aggregate.

Parameters
aggregateThe unbound aggregate to visit.

Reimplemented in iceberg::Binder, iceberg::IsBoundVisitor, and iceberg::ReferenceVisitor.

◆ AlwaysFalse()

template<typename R >
virtual Result< R > iceberg::ExpressionVisitor< R >::AlwaysFalse ( )
pure virtual

◆ AlwaysTrue()

template<typename R >
virtual Result< R > iceberg::ExpressionVisitor< R >::AlwaysTrue ( )
pure virtual

◆ And()

template<typename R >
virtual Result< R > iceberg::ExpressionVisitor< R >::And ( ParamType  left_result,
ParamType  right_result 
)
pure virtual

Visit an And expression.

Parameters
left_resultThe result from visiting the left child
right_resultThe result from visiting the right child

◆ Not()

template<typename R >
virtual Result< R > iceberg::ExpressionVisitor< R >::Not ( ParamType  child_result)
pure virtual

Visit a Not expression.

Parameters
child_resultThe result from visiting the child expression

◆ Or()

template<typename R >
virtual Result< R > iceberg::ExpressionVisitor< R >::Or ( ParamType  left_result,
ParamType  right_result 
)
pure virtual

Visit an Or expression.

Parameters
left_resultThe result from visiting the left child
right_resultThe result from visiting the right child

◆ Predicate() [1/2]

template<typename R >
virtual Result< R > iceberg::ExpressionVisitor< R >::Predicate ( const std::shared_ptr< BoundPredicate > &  pred)
pure virtual

◆ Predicate() [2/2]

template<typename R >
virtual Result< R > iceberg::ExpressionVisitor< R >::Predicate ( const std::shared_ptr< UnboundPredicate > &  pred)
pure virtual

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