iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
iceberg::UnboundPredicateImpl< B > Class Template Reference

Unbound predicates contain unbound terms and must be bound to a concrete schema before they can be evaluated. More...

#include <predicate.h>

Inheritance diagram for iceberg::UnboundPredicateImpl< B >:
iceberg::UnboundPredicate iceberg::Predicate< UnboundTerm< B > > iceberg::Expression iceberg::Unbound< Expression > iceberg::Expression iceberg::util::Formattable iceberg::util::Formattable

Public Member Functions

std::shared_ptr< NamedReferencereference () override
 Returns the reference of this UnboundPredicate.
 
std::string ToString () const override
 Get a user-readable string representation.
 
Result< std::shared_ptr< Expression > > Bind (const Schema &schema, bool case_sensitive) const override
 Bind this UnboundPredicate.
 
Result< std::shared_ptr< Expression > > Negate () const override
 Negate this UnboundPredicate.
 
const Termunbound_term () const override
 Returns the term of this predicate as a base Term reference.
 
std::span< const Literalliterals () const override
 Returns the literals of this predicate.
 
- Public Member Functions inherited from iceberg::UnboundPredicate
bool is_unbound_predicate () const override
 
- Public Member Functions inherited from iceberg::Expression
virtual bool Equals (const Expression &other) const
 Returns whether this expression will accept the same values as another.
 
virtual bool is_bound_predicate () const
 
virtual bool is_unbound_aggregate () const
 
virtual bool is_bound_aggregate () const
 
- Public Member Functions inherited from iceberg::Unbound< Expression >
Result< std::shared_ptr< Expression > > Bind (const Schema &schema) const
 Overloaded Bind method that uses case-sensitive matching by default.
 
- Public Member Functions inherited from iceberg::Predicate< UnboundTerm< B > >
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.
 

Static Public Member Functions

static Result< std::unique_ptr< UnboundPredicateImpl< B > > > Make (Expression::Operation op, std::shared_ptr< UnboundTerm< B > > term)
 Create an unbound predicate (unary operation).
 
static Result< std::unique_ptr< UnboundPredicateImpl< B > > > Make (Expression::Operation op, std::shared_ptr< UnboundTerm< B > > term, Literal value)
 Create an unbound predicate with a single value.
 
static Result< std::unique_ptr< UnboundPredicateImpl< B > > > Make (Expression::Operation op, std::shared_ptr< UnboundTerm< B > > term, std::vector< Literal > values)
 Create an unbound predicate with multiple values.
 

Additional Inherited Members

- 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.
 
- Protected Member Functions inherited from iceberg::Predicate< UnboundTerm< B > >
 Predicate (Expression::Operation op, std::shared_ptr< T > term)
 Create a predicate with an operation and term.
 
- Protected Attributes inherited from iceberg::Predicate< UnboundTerm< B > >
Expression::Operation operation_
 
std::shared_ptr< T > term_
 

Detailed Description

template<typename B>
class iceberg::UnboundPredicateImpl< B >

Unbound predicates contain unbound terms and must be bound to a concrete schema before they can be evaluated.

Template Parameters
BThe bound type this predicate produces when binding is successful

Member Function Documentation

◆ Bind()

template<typename B >
Result< std::shared_ptr< Expression > > iceberg::UnboundPredicateImpl< B >::Bind ( const Schema schema,
bool  case_sensitive 
) const
overridevirtual

◆ literals()

template<typename B >
std::span< const Literal > iceberg::UnboundPredicateImpl< B >::literals ( ) const
inlineoverridevirtual

Returns the literals of this predicate.

Implements iceberg::UnboundPredicate.

◆ Make() [1/3]

template<typename B >
Result< std::unique_ptr< UnboundPredicateImpl< B > > > iceberg::UnboundPredicateImpl< B >::Make ( Expression::Operation  op,
std::shared_ptr< UnboundTerm< B > >  term 
)
static

Create an unbound predicate (unary operation).

Parameters
opThe operation (kIsNull, kNotNull, kIsNan, kNotNan)
termThe unbound term
Returns
Result containing the unbound predicate or an error

◆ Make() [2/3]

template<typename B >
Result< std::unique_ptr< UnboundPredicateImpl< B > > > iceberg::UnboundPredicateImpl< B >::Make ( Expression::Operation  op,
std::shared_ptr< UnboundTerm< B > >  term,
Literal  value 
)
static

Create an unbound predicate with a single value.

Parameters
opThe operation
termThe unbound term
valueThe literal value
Returns
Result containing the unbound predicate or an error

◆ Make() [3/3]

template<typename B >
Result< std::unique_ptr< UnboundPredicateImpl< B > > > iceberg::UnboundPredicateImpl< B >::Make ( Expression::Operation  op,
std::shared_ptr< UnboundTerm< B > >  term,
std::vector< Literal values 
)
static

Create an unbound predicate with multiple values.

Parameters
opThe operation (typically kIn or kNotIn)
termThe unbound term
valuesVector of literal values
Returns
Result containing the unbound predicate or an error

◆ Negate()

template<typename B >
Result< std::shared_ptr< Expression > > iceberg::UnboundPredicateImpl< B >::Negate ( ) const
overridevirtual

Negate this UnboundPredicate.

Implements iceberg::UnboundPredicate.

◆ reference()

template<typename B >
std::shared_ptr< NamedReference > iceberg::UnboundPredicateImpl< B >::reference ( )
inlineoverridevirtual

Returns the reference of this UnboundPredicate.

Implements iceberg::UnboundPredicate.

◆ ToString()

template<typename B >
std::string iceberg::UnboundPredicateImpl< B >::ToString ( ) const
overridevirtual

Get a user-readable string representation.

Reimplemented from iceberg::Expression.

◆ unbound_term()

template<typename B >
const Term & iceberg::UnboundPredicateImpl< B >::unbound_term ( ) const
inlineoverridevirtual

Returns the term of this predicate as a base Term reference.

Implements iceberg::UnboundPredicate.


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