Function interops::add_expression_to_interpreter_plan

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 encode

  • expr_idx_to_col_idx_map: A map from input table column indices to expression left/right input indices

  • start_processing_position: The start position from where to store temp results in the encoded plan

  • final_output_position: The ouput position in the encoded plan for this expression

  • left_inputs: The encoded left inputs indices from all the processed expressions

  • right_inputs: The encoded right inputs indices from all the processed expressions

  • outputs: The encoded output indices from all the processed expressions

  • operators: The encoded operations from all the processed expressions

  • left_scalars: The scalars used as left inputs in the operations

  • right_scalars: The scalars used as right inputs in the operations