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

An Expression that represents logical NOT operation. More...

#include <expression.h>

Inheritance diagram for iceberg::Not:
iceberg::Expression iceberg::util::Formattable

Public Member Functions

const std::shared_ptr< Expression > & child () const
 Returns the child expression.
 
Operation op () const override
 Returns the operation for an expression node.
 
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::Expression
virtual bool is_unbound_predicate () const
 
virtual bool is_bound_predicate () const
 
virtual bool is_unbound_aggregate () const
 
virtual bool is_bound_aggregate () const
 

Static Public Member Functions

static Result< std::unique_ptr< Not > > Make (std::shared_ptr< Expression > child)
 Creates a Not expression from a child expression.
 
static Result< std::shared_ptr< Expression > > MakeFolded (std::shared_ptr< Expression > child)
 Creates a folded Not expression from a child expression.
 

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.
 

Detailed Description

An Expression that represents logical NOT operation.

This expression negates its child expression.

Member Function Documentation

◆ child()

const std::shared_ptr< Expression > & iceberg::Not::child ( ) const
inline

Returns the child expression.

Returns
The child expression being negated

◆ Equals()

bool iceberg::Not::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.

◆ Make()

Result< std::unique_ptr< Not > > iceberg::Not::Make ( std::shared_ptr< Expression child)
static

Creates a Not expression from a child expression.

Parameters
childThe expression to negate
Returns
A Result containing a unique pointer to Not, or an error if child is nullptr

◆ MakeFolded()

Result< std::shared_ptr< Expression > > iceberg::Not::MakeFolded ( std::shared_ptr< Expression child)
static

Creates a folded Not expression from a child expression.

Parameters
childThe expression to negate
Returns
A Result containing a shared pointer to the folded Not expression, or an error if child is nullptr
Note
A folded Not expression is an expression that is equivalent to the original expression, but with the Not operation removed. For example, not(not(x)) = x.

◆ Negate()

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

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

Reimplemented from iceberg::Expression.

◆ op()

Operation iceberg::Not::op ( ) const
inlineoverridevirtual

Returns the operation for an expression node.

Implements iceberg::Expression.

◆ ToString()

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

Get a user-readable string representation.

Reimplemented from iceberg::Expression.


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