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

Bound unary predicate (null, not-null, etc.). More...

#include <predicate.h>

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

Public Member Functions

Result< bool > Test (const Literal &value) const override
 Test a value against this predicate.
 
Kind kind () const override
 Returns the kind of this bound predicate.
 
std::string ToString () const override
 Get a user-readable string representation.
 
Result< std::shared_ptr< Expression > > Negate () const override
 Returns the negation of this expression, equivalent to not(this).
 
bool Equals (const Expression &other) const override
 Returns whether this expression will accept the same values as another.
 
- Public Member Functions inherited from iceberg::BoundPredicate
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
 
- 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
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
 

Static Public Member Functions

static Result< std::unique_ptr< BoundUnaryPredicate > > Make (Expression::Operation op, std::shared_ptr< BoundTerm > term)
 Create a bound unary predicate.
 

Additional Inherited Members

- Public Types inherited from iceberg::BoundPredicate
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.
 
- Protected Member Functions inherited from iceberg::BoundPredicate
 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.
 
- Protected Attributes inherited from iceberg::Predicate< BoundTerm >
Expression::Operation operation_
 
std::shared_ptr< T > term_
 

Detailed Description

Bound unary predicate (null, not-null, etc.).

Member Function Documentation

◆ Equals()

bool iceberg::BoundUnaryPredicate::Equals ( const Expression other) const
overridevirtual

Returns whether this expression will accept the same values as another.

Parameters
otheranother expression
Returns
true if the expressions are equivalent

Reimplemented from iceberg::Expression.

◆ kind()

Kind iceberg::BoundUnaryPredicate::kind ( ) const
inlineoverridevirtual

Returns the kind of this bound predicate.

Implements iceberg::BoundPredicate.

◆ Make()

Result< std::unique_ptr< BoundUnaryPredicate > > iceberg::BoundUnaryPredicate::Make ( Expression::Operation  op,
std::shared_ptr< BoundTerm term 
)
static

Create a bound unary predicate.

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

◆ Negate()

Result< std::shared_ptr< Expression > > iceberg::BoundUnaryPredicate::Negate ( ) const
overridevirtual

Returns the negation of this expression, equivalent to not(this).

Reimplemented from iceberg::Expression.

◆ Test()

Result< bool > iceberg::BoundUnaryPredicate::Test ( const Literal value) const
overridevirtual

Test a value against this predicate.

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

Implements iceberg::BoundPredicate.

◆ ToString()

std::string iceberg::BoundUnaryPredicate::ToString ( ) const
overridevirtual

Get a user-readable string representation.

Implements iceberg::util::Formattable.


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