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

A literal value used in an abstract syntax tree. More...

#include <expressions.hpp>

Inheritance diagram for cudf::ast::literal:
cudf::ast::expression

Public Member Functions

template<typename T >
 literal (cudf::numeric_scalar< T > &value)
 Construct a new literal object. More...
 
template<typename T >
 literal (cudf::timestamp_scalar< T > &value)
 Construct a new literal object. More...
 
template<typename T >
 literal (cudf::duration_scalar< T > &value)
 Construct a new literal object. More...
 
cudf::data_type get_data_type () const
 Get the data type. More...
 
cudf::detail::fixed_width_scalar_device_view_base get_value () const
 Get the value object. More...
 
cudf::size_type accept (detail::expression_parser &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...
 
bool is_valid (rmm::cuda_stream_view stream) const
 Check if the underlying scalar is valid. 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 literal value used in an abstract syntax tree.

Definition at line 156 of file expressions.hpp.

Constructor & Destructor Documentation

◆ literal() [1/3]

template<typename T >
cudf::ast::literal::literal ( cudf::numeric_scalar< T > &  value)
inline

Construct a new literal object.

Template Parameters
TNumeric scalar template type
Parameters
valueA numeric scalar value

Definition at line 165 of file expressions.hpp.

◆ literal() [2/3]

template<typename T >
cudf::ast::literal::literal ( cudf::timestamp_scalar< T > &  value)
inline

Construct a new literal object.

Template Parameters
TTimestamp scalar template type
Parameters
valueA timestamp scalar value

Definition at line 177 of file expressions.hpp.

◆ literal() [3/3]

template<typename T >
cudf::ast::literal::literal ( cudf::duration_scalar< T > &  value)
inline

Construct a new literal object.

Template Parameters
TDuration scalar template type
Parameters
valueA duration scalar value

Definition at line 189 of file expressions.hpp.

Member Function Documentation

◆ accept()

cudf::size_type cudf::ast::literal::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.

◆ get_data_type()

cudf::data_type cudf::ast::literal::get_data_type ( ) const
inline

Get the data type.

Returns
The data type of the literal

Definition at line 199 of file expressions.hpp.

◆ get_value()

cudf::detail::fixed_width_scalar_device_view_base cudf::ast::literal::get_value ( ) const
inline

Get the value object.

Returns
The device scalar object

Definition at line 206 of file expressions.hpp.

◆ is_valid()

bool cudf::ast::literal::is_valid ( rmm::cuda_stream_view  stream) const
inline

Check if the underlying scalar is valid.

Parameters
streamCUDA stream used for device memory operations and kernel launches
Returns
true if the underlying scalar is valid

Definition at line 232 of file expressions.hpp.

◆ may_evaluate_null()

bool cudf::ast::literal::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 219 of file expressions.hpp.


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