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

Base class for bound aggregates. More...

#include <aggregate.h>

Inheritance diagram for iceberg::BoundAggregate:
iceberg::Aggregate< BoundTerm > iceberg::Bound iceberg::Expression iceberg::util::Formattable iceberg::CountAggregate iceberg::MaxAggregate iceberg::MinAggregate iceberg::CountNonNullAggregate iceberg::CountNullAggregate iceberg::CountStarAggregate

Classes

class  Aggregator
 Base class for aggregators. More...
 

Public Member Functions

std::shared_ptr< BoundReferencereference () override
 Returns the underlying bound reference for this term.
 
Result< LiteralEvaluate (const StructLike &data) const override=0
 Evaluate this expression against a row-based data.
 
virtual Result< LiteralEvaluate (const DataFile &file) const =0
 
virtual bool HasValue (const DataFile &file) const =0
 Whether metrics in the data file are sufficient to evaluate.
 
bool is_bound_aggregate () const override
 
virtual std::unique_ptr< AggregatorNewAggregator () const =0
 Create a new aggregator for this aggregate.
 
- Public Member Functions inherited from iceberg::Aggregate< BoundTerm >
Expression::Operation op () const override
 Returns the operation for an expression node.
 
const std::shared_ptr< T > & term () const
 
std::string ToString () const override
 Get a user-readable string representation.
 
- 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_bound_predicate () const
 
virtual bool is_unbound_aggregate () const
 

Protected Member Functions

 BoundAggregate (Expression::Operation op, std::shared_ptr< BoundTerm > term)
 
- Protected Member Functions inherited from iceberg::Aggregate< BoundTerm >
 Aggregate (Expression::Operation op, std::shared_ptr< T > term)
 

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.
 
- Static Protected Member Functions inherited from iceberg::Aggregate< BoundTerm >
static constexpr bool IsSupportedOp (Expression::Operation op)
 
- Protected Attributes inherited from iceberg::Aggregate< BoundTerm >
Expression::Operation operation_
 
std::shared_ptr< T > term_
 

Detailed Description

Base class for bound aggregates.

Member Function Documentation

◆ Evaluate()

Result< Literal > iceberg::BoundAggregate::Evaluate ( const StructLike data) const
overridepure virtual

Evaluate this expression against a row-based data.

Implements iceberg::Bound.

Implemented in iceberg::CountAggregate, iceberg::MaxAggregate, and iceberg::MinAggregate.

◆ HasValue()

virtual bool iceberg::BoundAggregate::HasValue ( const DataFile file) const
pure virtual

Whether metrics in the data file are sufficient to evaluate.

Implemented in iceberg::CountNonNullAggregate, iceberg::CountNullAggregate, iceberg::CountStarAggregate, iceberg::MaxAggregate, and iceberg::MinAggregate.

◆ is_bound_aggregate()

bool iceberg::BoundAggregate::is_bound_aggregate ( ) const
inlineoverridevirtual

Reimplemented from iceberg::Expression.

◆ NewAggregator()

virtual std::unique_ptr< Aggregator > iceberg::BoundAggregate::NewAggregator ( ) const
pure virtual

Create a new aggregator for this aggregate.

Note
The returned aggregator cannot outlive the BoundAggregate that creates it.

Implemented in iceberg::CountAggregate, iceberg::MaxAggregate, and iceberg::MinAggregate.

◆ reference()

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

Returns the underlying bound reference for this term.

Implements iceberg::Bound.


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