Function interops::add_expression_to_interpreter_plan¶
Defined in File interpreter_cpp.h
Function Documentation¶
-
void
interops
::
add_expression_to_interpreter_plan
(const ral::parser::parse_tree &expr_tree, const std::map<column_index_type, column_index_type> &expr_idx_to_col_idx_map, cudf::size_type start_processing_position, cudf::size_type final_output_position, std::vector<column_index_type> &left_inputs, std::vector<column_index_type> &right_inputs, std::vector<column_index_type> &outputs, std::vector<operator_type> &operators, std::vector<std::unique_ptr<cudf::scalar>> &left_scalars, std::vector<std::unique_ptr<cudf::scalar>> &right_scalars)¶ Encodes an expression tree consisting of simple operations in a GPU friendly format that we can later evaluate in a single GPU kernel call.
The interpreter can only evaluate simple operations like arithmetic operations, cast, etc on primitives types. Any complex operation inside the expression tree must be removed (or evaluated and replaced by its result) in a preprocess step
- Parameters
expr_tree
: The expression tree to encodeexpr_idx_to_col_idx_map
: A map from input table column indices to expression left/right input indicesstart_processing_position
: The start position from where to store temp results in the encoded planfinal_output_position
: The ouput position in the encoded plan for this expressionleft_inputs
: The encoded left inputs indices from all the processed expressionsright_inputs
: The encoded right inputs indices from all the processed expressionsoutputs
: The encoded output indices from all the processed expressionsoperators
: The encoded operations from all the processed expressionsleft_scalars
: The scalars used as left inputs in the operationsright_scalars
: The scalars used as right inputs in the operations