6 #ifndef TURI_SFRAME_QUERY_OPTIMIZATION_ENGINE_H_ 7 #define TURI_SFRAME_QUERY_OPTIMIZATION_ENGINE_H_ 9 #include <core/storage/query_engine/planning/planner_node.hpp> 10 #include <core/storage/query_engine/planning/materialize_options.hpp> 11 #include <core/storage/query_engine/planning/optimization_node_info.hpp> 13 namespace turi {
namespace query_eval {
29 void register_optimization(
const std::vector<size_t>& valid_stages, std::shared_ptr<opt_transform> opt);
38 inline const std::vector<std::shared_ptr<opt_transform> >&
get_transforms(
44 std::vector<std::vector<std::vector<std::shared_ptr<opt_transform> > > > possible_transforms;
80 inline void mark_node_as_active(cnode_info_ptr n);
84 void replace_node(cnode_info_ptr old_node,
pnode_ptr new_pnode);
88 static constexpr
size_t num_types() {
return int(planner_node_type::INVALID); }
90 std::shared_ptr<const optimization_transform_registry> transform_registry;
104 void populate_active_nodes(cnode_info_ptr tip);
110 std::vector<int> stage_type_active_mask;
113 void _build_active_node_queue(
const cnode_info_ptr& tip);
114 std::vector<cnode_info_ptr> active_nodes;
116 void eliminate_node_and_prune(node_info_ptr n);
118 node_info_ptr build_node_info(
pnode_ptr);
120 std::map<pnode_ptr, node_info_ptr> node_lookups;
121 std::vector<node_info_ptr> all_nodes;
123 void release_node(
const node_info_ptr& ptr);
std::shared_ptr< planner_node > pnode_ptr
A handy typedef.