libcudf  24.02.00
Public Member Functions | List of all members
cudf::ast::expression Struct Referenceabstract

A generic expression that can be evaluated to return a value. More...

#include <expressions.hpp>

Inheritance diagram for cudf::ast::expression:
cudf::ast::column_name_reference cudf::ast::column_reference cudf::ast::literal cudf::ast::operation

Public Member Functions

virtual cudf::size_type accept (detail::expression_parser &visitor) const =0
 Accepts a visitor class. More...
 
virtual std::reference_wrapper< expression const > accept (detail::expression_transformer &visitor) const =0
 Accepts a visitor class. More...
 
bool may_evaluate_null (table_view const &left, rmm::cuda_stream_view stream) const
 Returns true if the expression may evaluate to null. More...
 
virtual bool may_evaluate_null (table_view const &left, table_view const &right, rmm::cuda_stream_view stream) const =0
 Returns true if the expression may evaluate to null. More...
 

Detailed Description

A generic expression that can be evaluated to return a value.

This class is a part of a "visitor" pattern with the expression_parser class. Expressions inheriting from this class can accept parsers as visitors.

Definition at line 46 of file expressions.hpp.

Member Function Documentation

◆ accept() [1/2]

virtual cudf::size_type cudf::ast::expression::accept ( detail::expression_parser &  visitor) const
pure virtual

Accepts a visitor class.

Parameters
visitorThe expression_parser parsing this expression tree
Returns
Index of device data reference for this instance

Implemented in cudf::ast::column_name_reference, cudf::ast::operation, cudf::ast::column_reference, and cudf::ast::literal.

◆ accept() [2/2]

virtual std::reference_wrapper<expression const> cudf::ast::expression::accept ( detail::expression_transformer &  visitor) const
pure virtual

Accepts a visitor class.

Parameters
visitorThe expression_transformer transforming this expression tree
Returns
Reference wrapper of transformed expression

Implemented in cudf::ast::column_name_reference, cudf::ast::operation, cudf::ast::column_reference, and cudf::ast::literal.

◆ may_evaluate_null() [1/2]

bool cudf::ast::expression::may_evaluate_null ( table_view const &  left,
rmm::cuda_stream_view  stream 
) const
inline

Returns true if the expression may evaluate to null.

Parameters
leftThe left operand of the expression (The same is used as right operand)
streamCUDA stream used for device memory operations and kernel launches
Returns
true if the expression may evaluate to null, otherwise false

Definition at line 71 of file expressions.hpp.

◆ may_evaluate_null() [2/2]

virtual bool cudf::ast::expression::may_evaluate_null ( table_view const &  left,
table_view const &  right,
rmm::cuda_stream_view  stream 
) const
pure virtual

Returns true if the expression may evaluate to null.

Parameters
leftThe left operand of the expression
rightThe right operand of the expression
streamCUDA stream used for device memory operations and kernel launches
Returns
true if the expression may evaluate to null, otherwise false

Implemented in cudf::ast::column_name_reference, cudf::ast::operation, cudf::ast::column_reference, and cudf::ast::literal.


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