iceberg-cpp
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
iceberg::BoundPredicate Class Referenceabstract

Bound predicates contain bound terms and can be evaluated. More...

#include <predicate.h>

Inheritance diagram for iceberg::BoundPredicate:
iceberg::Predicate< BoundTerm > iceberg::Bound iceberg::Expression iceberg::util::Formattable iceberg::BoundLiteralPredicate iceberg::BoundSetPredicate iceberg::BoundUnaryPredicate

Public Types

enum class  Kind : int8_t { kUnary = 0 , kLiteral , kSet }
 
- Public Types inherited from iceberg::Expression
enum class  Operation {
  kTrue , kFalse , kIsNull , kNotNull ,
  kIsNan , kNotNan , kLt , kLtEq ,
  kGt , kGtEq , kEq , kNotEq ,
  kIn , kNotIn , kNot , kAnd ,
  kOr , kStartsWith , kNotStartsWith , kCount ,
  kCountNull , kCountStar , kMax , kMin
}
 Operation types for expressions.
 

Public Member Functions

std::shared_ptr< BoundReferencereference () override
 Returns the underlying bound reference for this term.
 
Result< LiteralEvaluate (const StructLike &data) const override
 Evaluate this expression against a row-based data.
 
bool is_bound_predicate () const override
 
virtual Result< bool > Test (const Literal &value) const =0
 Test a value against this predicate.
 
virtual Kind kind () const =0
 Returns the kind of this bound predicate.
 
- Public Member Functions inherited from iceberg::Predicate< BoundTerm >
Expression::Operation op () const override
 Returns the operation for an expression node.
 
const std::shared_ptr< T > & term () const
 Returns the term this predicate tests.
 
- Public Member Functions inherited from iceberg::Expression
virtual Result< std::shared_ptr< Expression > > Negate () const
 Returns the negation of this expression, equivalent to not(this).
 
virtual bool Equals (const Expression &other) const
 Returns whether this expression will accept the same values as another.
 
std::string ToString () const override
 Get a user-readable string representation.
 
virtual bool is_unbound_predicate () const
 
virtual bool is_unbound_aggregate () const
 
virtual bool is_bound_aggregate () const
 

Protected Member Functions

 BoundPredicate (Expression::Operation op, std::shared_ptr< BoundTerm > term)
 
- Protected Member Functions inherited from iceberg::Predicate< BoundTerm >
 Predicate (Expression::Operation op, std::shared_ptr< T > term)
 Create a predicate with an operation and term.
 

Additional Inherited Members

- Protected Attributes inherited from iceberg::Predicate< BoundTerm >
Expression::Operation operation_
 
std::shared_ptr< T > term_
 

Detailed Description

Bound predicates contain bound terms and can be evaluated.

Member Function Documentation

◆ Evaluate()

Result< Literal > iceberg::BoundPredicate::Evaluate ( const StructLike data) const
overridevirtual

Evaluate this expression against a row-based data.

Implements iceberg::Bound.

◆ is_bound_predicate()

bool iceberg::BoundPredicate::is_bound_predicate ( ) const
inlineoverridevirtual

Reimplemented from iceberg::Expression.

◆ kind()

virtual Kind iceberg::BoundPredicate::kind ( ) const
pure virtual

Returns the kind of this bound predicate.

Implemented in iceberg::BoundUnaryPredicate, iceberg::BoundLiteralPredicate, and iceberg::BoundSetPredicate.

◆ reference()

std::shared_ptr< BoundReference > iceberg::BoundPredicate::reference ( )
inlineoverridevirtual

Returns the underlying bound reference for this term.

Implements iceberg::Bound.

◆ Test()

virtual Result< bool > iceberg::BoundPredicate::Test ( const Literal value) const
pure virtual

Test a value against this predicate.

Parameters
valueThe literal value to test
Returns
true if the predicate passes, false otherwise

Implemented in iceberg::BoundUnaryPredicate, iceberg::BoundLiteralPredicate, and iceberg::BoundSetPredicate.


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