31 class expression_parser;
79 enum class ast_operator : int32_t {
147 enum class table_reference {
164 template <
typename T>
176 template <
typename T>
188 template <
typename T>
255 table_reference table_source = table_reference::LEFT)
256 : column_index(column_index), table_source(table_source)
295 auto const table = [&] {
301 CUDF_FAIL(
"Column reference data type cannot be determined from unknown table.");
319 return (table_source == table_reference::LEFT ? left : right).column(column_index).has_nulls();
324 table_reference table_source;
368 std::vector<std::reference_wrapper<expression const>>
get_operands()
const {
return operands; }
382 return std::any_of(operands.cbegin(),
384 [&left, &right, &stream](std::reference_wrapper<expression const> subexpr) {
385 return subexpr.get().may_evaluate_null(left, right, stream);
390 ast_operator
const op;
391 std::vector<std::reference_wrapper<expression const>>
const operands;
cudf::size_type accept(detail::expression_parser &visitor) const override
Accepts a visitor class.
literal(cudf::duration_scalar< T > &value)
Construct a new literal object.
Class definitions for (mutable)_table_view
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.
An owning class to represent a timestamp value in device memory.
bool may_evaluate_null(table_view const &left, rmm::cuda_stream_view stream) const
Returns true if the expression may evaluate to null.
cudf::data_type get_data_type() const
Get the data type.
cudf::data_type get_data_type(table_view const &table) const
Get the data type.
Class definitions for cudf::scalar.
int32_t size_type
Row index type for columns and tables.
operation(ast_operator op, expression const &left, expression const &right)
Construct a new binary operation object.
ast_operator get_operator() const
Get the operator.
Type declarations for libcudf.
#define CUDF_FAIL(...)
Indicates that an erroneous code path has been taken.
cudf::size_type accept(detail::expression_parser &visitor) const override
Accepts a visitor class.
A set of cudf::column's of the same size.
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.
cudf::size_type get_column_index() const
Get the column index.
operation(ast_operator op, expression const &input)
Construct a new unary operation object.
table_reference get_table_source() const
Get the table source.
bool is_valid(rmm::cuda_stream_view stream=cudf::get_default_stream()) const
Indicates whether the scalar contains a valid value.
cudf::data_type get_data_type(table_view const &left_table, table_view const &right_table) const
Get the data type.
An owning class to represent a duration value in device memory.
A generic expression that can be evaluated to return a value.
cudf::detail::fixed_width_scalar_device_view_base get_value() const
Get the value object.
An owning class to represent a singular value.
auto get_scalar_device_view(numeric_scalar< T > &s)
Get the device view of a numeric_scalar.
An owning class to represent a numerical value in device memory.
A set of cudf::column_view's of the same size.
Indicator for the logical data type of an element in a column.
literal(cudf::numeric_scalar< T > &value)
Construct a new literal object.
An operation expression holds an operator and zero or more operands.
@ LESS
Indicates a is less than (ordered before) b
A type-erased scalar_device_view where the value is a fixed width type.
A literal value used in an abstract syntax tree.
column_reference(cudf::size_type column_index, table_reference table_source=table_reference::LEFT)
Construct a new column reference object.
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.
std::vector< std::reference_wrapper< expression const > > get_operands() const
Get the operands.
A expression referring to data from a column in a table.
virtual cudf::size_type accept(detail::expression_parser &visitor) const =0
Accepts a visitor class.
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.
Scalar device view class definitions.
cudf::size_type accept(detail::expression_parser &visitor) const override
Accepts a visitor class.
data_type type() const noexcept
Returns the value type.
bool is_valid(rmm::cuda_stream_view stream) const
Check if the underlying scalar is valid.
literal(cudf::timestamp_scalar< T > &value)
Construct a new literal object.