Turi Create  4.0
turi::query_eval::query_operator Class Referenceabstract

#include <core/storage/query_engine/operators/operator.hpp>

Public Member Functions

query_operator_attributes attributes ()
 
std::string name () const
 
virtual std::string print () const
 
virtual std::shared_ptr< query_operatorclone () const =0
 
virtual void execute (query_context &context)
 

Static Public Member Functions

static std::shared_ptr< query_operatorfrom_planner_node (std::shared_ptr< planner_node >)
 

Detailed Description

The query operator base class.

All operators must inherit from this class, implementing the virtual functions described below. The member functions describe how the class behaves, which in turn describe the capabilities of the operator and how execution is performed.

In addition, all of the operators must implement a set of static functions that describe how they behave. These are:

name() returns the name of the operator. Used for logging. static std::string name()

make_planner_node() A factory function for creating a planner node. Takes any user defined arguments related to the operator.

static std::shared_ptr<planner_node> make_planner_node(...).

from_planner_node() converts the planner node to its operator form.

static std::shared_ptr<query_operator> from_planner_node(std::shared_ptr<planner_node> pnode)

infer_type() returns a vector of the output types for each column.

static std::vector<flex_type_enum> infer_type(std::shared_ptr<planner_node> pnode)

infer_length() Returns the length if known, and -1 otherwise.

static int64_t infer_length(std::shared_ptr<planner_node> pnode)

Definition at line 92 of file operator.hpp.

Member Function Documentation

◆ attributes()

query_operator_attributes turi::query_eval::query_operator::attributes ( )
inline

Basic execution attributes about the query.

Definition at line 104 of file operator.hpp.

◆ clone()

◆ execute()

◆ from_planner_node()

static std::shared_ptr<query_operator> turi::query_eval::query_operator::from_planner_node ( std::shared_ptr< planner_node )
inlinestatic

The base case – the logical-only nodes don't use this.

Definition at line 135 of file operator.hpp.

◆ name()

std::string turi::query_eval::query_operator::name ( ) const
inline

Pretty prints the operator including all additional parameters.

Definition at line 111 of file operator.hpp.

◆ print()

virtual std::string turi::query_eval::query_operator::print ( ) const
inlinevirtual

Pretty prints the operator including all additional parameters.

Reimplemented in turi::query_eval::operator_impl< planner_node_type::CONSTANT_NODE >, and turi::query_eval::operator_impl< planner_node_type::PROJECT_NODE >.

Definition at line 118 of file operator.hpp.


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