Public Member Functions | List of all members
cudf::ast::column_reference Class Reference

A expression referring to data from a column in a table. More...

#include <expressions.hpp>

Inheritance diagram for cudf::ast::column_reference:
cudf::ast::expression

Public Member Functions

 column_reference (cudf::size_type column_index, table_reference table_source=table_reference::LEFT)
 Construct a new column reference object. More...
 
cudf::size_type get_column_index () const
 Get the column index. More...
 
table_reference get_table_source () const
 Get the table source. More...
 
cudf::data_type get_data_type (table_view const &table) const
 Get the data type. More...
 
cudf::data_type get_data_type (table_view const &left_table, table_view const &right_table) const
 Get the data type. More...
 
cudf::size_type accept (detail::expression_parser &visitor) const override
 Accepts a visitor class. More...
 
std::reference_wrapper< expression const > accept (detail::expression_transformer &visitor) const override
 Accepts a visitor class. More...
 
bool may_evaluate_null (table_view const &left, table_view const &right, rmm::cuda_stream_view stream) const override
 Returns true if the expression may evaluate to null. More...
 
- Public Member Functions inherited from cudf::ast::expression
bool may_evaluate_null (table_view const &left, rmm::cuda_stream_view stream) const
 Returns true if the expression may evaluate to null. More...
 

Detailed Description

A expression referring to data from a column in a table.

Definition at line 355 of file expressions.hpp.

Constructor & Destructor Documentation

◆ column_reference()

cudf::ast::column_reference::column_reference ( cudf::size_type  column_index,
table_reference  table_source = table_reference::LEFT 
)
inline

Construct a new column reference object.

Parameters
column_indexIndex of this column in the table (provided when the expression is evaluated).
table_sourceWhich table to use in cases with two tables (e.g. joins)

Definition at line 364 of file expressions.hpp.

Member Function Documentation

◆ accept() [1/2]

cudf::size_type cudf::ast::column_reference::accept ( detail::expression_parser &  visitor) const
overridevirtual

Accepts a visitor class.

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

Implements cudf::ast::expression.

◆ accept() [2/2]

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

Accepts a visitor class.

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

Implements cudf::ast::expression.

◆ get_column_index()

cudf::size_type cudf::ast::column_reference::get_column_index ( ) const
inline

Get the column index.

Returns
The column index of the column reference

Definition at line 375 of file expressions.hpp.

◆ get_data_type() [1/2]

cudf::data_type cudf::ast::column_reference::get_data_type ( table_view const &  left_table,
table_view const &  right_table 
) const
inline

Get the data type.

Parameters
left_tableLeft table used to determine types
right_tableRight table used to determine types
Returns
The data type of the column

Definition at line 402 of file expressions.hpp.

◆ get_data_type() [2/2]

cudf::data_type cudf::ast::column_reference::get_data_type ( table_view const &  table) const
inline

Get the data type.

Parameters
tableTable used to determine types
Returns
The data type of the column

Definition at line 390 of file expressions.hpp.

◆ get_table_source()

table_reference cudf::ast::column_reference::get_table_source ( ) const
inline

Get the table source.

Returns
table_reference The reference to the table containing this column

Definition at line 382 of file expressions.hpp.

◆ may_evaluate_null()

bool cudf::ast::column_reference::may_evaluate_null ( table_view const &  left,
table_view const &  right,
rmm::cuda_stream_view  stream 
) const
inlineoverridevirtual

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

Implements cudf::ast::expression.

Definition at line 428 of file expressions.hpp.


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