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

#include <core/storage/query_engine/planning/optimizations/optimization_transforms.hpp>

Public Member Functions

virtual std::string description ()=0
 
virtual bool transform_applies (planner_node_type t)=0
 
virtual bool apply_transform (optimization_engine *opt_manager, cnode_info_ptr n)=0
 

Detailed Description

Optimization transforms are successively applied until no more optimizations are possible. A queue of active nodes is maintained, starting with all nodes in the planner graph.

The transforms are indexed by type; for each node in the planner graph, all transformations that apply to that planner node type are attempted in order of declaration. If no transformations apply to a node, then it is discarded from the active queue.

If apply_transform returns true, then the optimization for that node is stopped. If apply_transform returns false, then it is assumed that the transformation did not apply, and the next transformation is attempted.

Changes to the graph coming as a result of transformations should call the appropriate method in the optimization_engine. All intrinsic graph operations required to maintain the graph consistently are done internally by these nodes, including requeueing all affected nodes on the active queue.

All new transformations need to be registered in populate_transforms() inside optimization_transforms.cpp.

Definition at line 42 of file optimization_transforms.hpp.

Member Function Documentation

◆ apply_transform()

virtual bool turi::query_eval::opt_transform::apply_transform ( optimization_engine opt_manager,
cnode_info_ptr  n 
)
pure virtual

Return true if the transform was applied.

◆ description()

virtual std::string turi::query_eval::opt_transform::description ( )
pure virtual

A description string that gets logged when the transformation is applied.

◆ transform_applies()

virtual bool turi::query_eval::opt_transform::transform_applies ( planner_node_type  t)
pure virtual

Does the transform apply to a particular node type?


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