Turi Create
4.0
|
#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_operator > | clone () const =0 |
virtual void | execute (query_context &context) |
Static Public Member Functions | |
static std::shared_ptr< query_operator > | from_planner_node (std::shared_ptr< planner_node >) |
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.
|
inline |
Basic execution attributes about the query.
Definition at line 104 of file operator.hpp.
|
pure virtual |
Makes a copy of the object.
Implemented in turi::query_eval::operator_impl< planner_node_type::BINARY_TRANSFORM_NODE >, turi::query_eval::operator_impl< planner_node_type::SFRAME_SOURCE_NODE >, turi::query_eval::operator_impl< planner_node_type::CONSTANT_NODE >, turi::query_eval::operator_impl< planner_node_type::APPEND_NODE >, turi::query_eval::operator_impl< planner_node_type::GENERALIZED_TRANSFORM_NODE >, turi::query_eval::operator_impl< planner_node_type::PROJECT_NODE >, turi::query_eval::operator_impl< planner_node_type::GENERALIZED_UNION_PROJECT_NODE >, turi::query_eval::operator_impl< planner_node_type::LOGICAL_FILTER_NODE >, turi::query_eval::operator_impl< planner_node_type::TRANSFORM_NODE >, turi::query_eval::operator_impl< planner_node_type::LAMBDA_TRANSFORM_NODE >, turi::query_eval::operator_impl< planner_node_type::REDUCE_NODE >, turi::query_eval::operator_impl< planner_node_type::TERNARY_OPERATOR >, turi::query_eval::operator_impl< planner_node_type::RANGE_NODE >, turi::query_eval::operator_impl< planner_node_type::UNION_NODE >, and turi::query_eval::operator_impl< planner_node_type::IDENTITY_NODE >.
|
inlinevirtual |
Executes a query.
Reimplemented in turi::query_eval::operator_impl< planner_node_type::LOGICAL_FILTER_NODE >, turi::query_eval::operator_impl< planner_node_type::SFRAME_SOURCE_NODE >, turi::query_eval::operator_impl< planner_node_type::BINARY_TRANSFORM_NODE >, turi::query_eval::operator_impl< planner_node_type::APPEND_NODE >, turi::query_eval::operator_impl< planner_node_type::CONSTANT_NODE >, turi::query_eval::operator_impl< planner_node_type::GENERALIZED_TRANSFORM_NODE >, turi::query_eval::operator_impl< planner_node_type::PROJECT_NODE >, turi::query_eval::operator_impl< planner_node_type::GENERALIZED_UNION_PROJECT_NODE >, turi::query_eval::operator_impl< planner_node_type::TRANSFORM_NODE >, turi::query_eval::operator_impl< planner_node_type::REDUCE_NODE >, turi::query_eval::operator_impl< planner_node_type::LAMBDA_TRANSFORM_NODE >, turi::query_eval::operator_impl< planner_node_type::TERNARY_OPERATOR >, turi::query_eval::operator_impl< planner_node_type::RANGE_NODE >, and turi::query_eval::operator_impl< planner_node_type::UNION_NODE >.
Definition at line 130 of file operator.hpp.
|
inlinestatic |
The base case – the logical-only nodes don't use this.
Definition at line 135 of file operator.hpp.
|
inline |
Pretty prints the operator including all additional parameters.
Definition at line 111 of file operator.hpp.
|
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.