Turi Create
4.0
|
#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_node > | materialize_as_planner_node (std::shared_ptr< planner_node > tip, materialize_options exec_params=materialize_options()) |
std::shared_ptr< planner_node > | slice (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) |
The main query plan call.
Definition at line 31 of file planner.hpp.
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:
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.
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.
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.
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.
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.