Turi Create  4.0
turi::query_eval::planner Class Reference

#include <core/storage/query_engine/planning/planner.hpp>

Public Member Functions

sframe materialize (std::shared_ptr< planner_node > tip, materialize_options exec_params=materialize_options())
 
void materialize (std::shared_ptr< planner_node > tip, write_callback_type callback, size_t num_segments, materialize_options exec_params=materialize_options())
 
bool online_materialization_recommended (std::shared_ptr< planner_node > tip)
 
std::shared_ptr< planner_nodematerialize_as_planner_node (std::shared_ptr< planner_node > tip, materialize_options exec_params=materialize_options())
 
std::shared_ptr< planner_nodeslice (std::shared_ptr< planner_node > &tip, size_t begin, size_t end)
 
bool test_equal_length (std::shared_ptr< planner_node > a, std::shared_ptr< planner_node > b)
 

Detailed Description

The main query plan call.

Definition at line 31 of file planner.hpp.

Member Function Documentation

◆ materialize() [1/2]

sframe turi::query_eval::planner::materialize ( std::shared_ptr< planner_node tip,
materialize_options  exec_params = materialize_options() 
)

Materialize the output from a node on a graph as an SFrame.

Note that exec_params allows some control over the execution of the materialization.

This function is the tip of the materialization pipeline, everything materialization operation should come through here, and the objective here is to correctly handle all query plans.

Internally, the materialization hierarchy is:

  • planner::materialize Handles the most general materializations
  • planner::execute_node Replicates a plan for parallelization. A private function.
  • subplan_executor Executes a restricted plan.

◆ materialize() [2/2]

void turi::query_eval::planner::materialize ( std::shared_ptr< planner_node tip,
write_callback_type  callback,
size_t  num_segments,
materialize_options  exec_params = materialize_options() 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Convenience overload for a very common use case which is to just materialize to a callback function.

See the materialize_options for details on what the arguments achieve.

But most notably, if partial_materialize is false, the materialization may fail. See materialize_options for details.

◆ materialize_as_planner_node()

std::shared_ptr<planner_node> turi::query_eval::planner::materialize_as_planner_node ( std::shared_ptr< planner_node tip,
materialize_options  exec_params = materialize_options() 
)

Materialize the output, returning the result as a planner node.

◆ online_materialization_recommended()

bool turi::query_eval::planner::online_materialization_recommended ( std::shared_ptr< planner_node tip)

If this returns true, it is recommended to go ahead and materialize the sframe operations on the fly to prevent memory issues.

◆ slice()

std::shared_ptr<planner_node> turi::query_eval::planner::slice ( std::shared_ptr< planner_node > &  tip,
size_t  begin,
size_t  end 
)

Returns a new planner node which is a range slice of the input node.

The operation may modify (materialize) input node.

◆ test_equal_length()

bool turi::query_eval::planner::test_equal_length ( std::shared_ptr< planner_node a,
std::shared_ptr< planner_node b 
)

Try to test that both a and b have equal length and to materialize them if necessary to prove that this is the case.


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