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

Bound literal predicate (comparison against a single value). More...

#include <predicate.h>

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

Public Member Functions

const Literalliteral () const
 Returns the literal being compared against.
 
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< BoundLiteralPredicate > > Make (Expression::Operation op, std::shared_ptr< BoundTerm > term, Literal literal)
 Create a bound literal 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 literal predicate (comparison against a single value).

Member Function Documentation

◆ Equals()

bool iceberg::BoundLiteralPredicate::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::BoundLiteralPredicate::kind ( ) const
inlineoverridevirtual

Returns the kind of this bound predicate.

Implements iceberg::BoundPredicate.

◆ Make()

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

Create a bound literal predicate.

Parameters
opThe comparison operation (kLt, kLtEq, kGt, kGtEq, kEq, kNotEq)
termThe bound term to compare
literalThe literal value to compare against
Returns
Result containing the bound literal predicate or an error

◆ Negate()

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

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

Reimplemented from iceberg::Expression.

◆ Test()

Result< bool > iceberg::BoundLiteralPredicate::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::BoundLiteralPredicate::ToString ( ) const
overridevirtual

Get a user-readable string representation.

Implements iceberg::util::Formattable.


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