OmniSciDB
c1a53651b2
|
#include <RelAlgDag.h>
Public Types | |
enum | BuildState { BuildState::kNotBuilt, BuildState::kBuiltNotOptimized, BuildState::kBuiltOptimized } |
Public Member Functions | |
RelAlgDag () | |
BuildState | getBuildState () const |
void | eachNode (std::function< void(RelAlgNode const *)> const &) const |
const RelAlgNode & | getRootNode () const |
std::shared_ptr< const RelAlgNode > | getRootNodeShPtr () const |
void | registerSubquery (std::shared_ptr< RexSubQuery > subquery) |
const std::vector < std::shared_ptr< RexSubQuery > > & | getSubqueries () const |
void | registerQueryHints (std::shared_ptr< RelAlgNode > node, Hints *hints_delivered, RegisteredQueryHint &global_query_hint) |
void | registerQueryHint (const RelAlgNode *node, const RegisteredQueryHint &query_hint) |
std::optional < RegisteredQueryHint > | getQueryHint (const RelAlgNode *node) const |
std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint > > & | getQueryHints () |
const RegisteredQueryHint & | getGlobalHints () const |
void | setGlobalQueryHints (const RegisteredQueryHint &global_hints) |
void | resetQueryExecutionState () |
Private Attributes | |
BuildState | build_state_ |
std::vector< std::shared_ptr < RelAlgNode > > | nodes_ |
std::vector< std::shared_ptr < RexSubQuery > > | subqueries_ |
std::unordered_map< size_t, std::unordered_map< unsigned, RegisteredQueryHint > > | query_hint_ |
RegisteredQueryHint | global_hints_ |
Friends | |
struct | RelAlgDagSerializer |
struct | RelAlgDagModifier |
Class defining an in-memory, easy-to-navigate internal representation of a relational algebra DAG interpreted from a JSON provided by Calcite. Must be built through the RelAlgDagBuilder interface.
Definition at line 2501 of file RelAlgDag.h.
|
strong |
Enumerator | |
---|---|
kNotBuilt | |
kBuiltNotOptimized | |
kBuiltOptimized |
Definition at line 2503 of file RelAlgDag.h.
|
inline |
void RelAlgDag::eachNode | ( | std::function< void(RelAlgNode const *)> const & | callback | ) | const |
|
inline |
Definition at line 2507 of file RelAlgDag.h.
References build_state_.
Referenced by RelAlgDagBuilder::optimizeDag().
|
inline |
Definition at line 2972 of file RelAlgDag.h.
References global_hints_.
Referenced by anonymous_namespace{RelAlgDag.cpp}::parse_subquery().
|
inline |
Definition at line 2944 of file RelAlgDag.h.
References RelAlgNode::getId(), global_hints_, RegisteredQueryHint::isAnyQueryHintDelivered(), query_hint_, and RelAlgNode::toHash().
|
inline |
Definition at line 2968 of file RelAlgDag.h.
References query_hint_.
|
inline |
|
inline |
Definition at line 2521 of file RelAlgDag.h.
|
inline |
Gets all registered subqueries. Only the root DAG can contain subqueries.
Definition at line 2537 of file RelAlgDag.h.
References subqueries_.
|
inline |
Definition at line 2932 of file RelAlgDag.h.
References RelAlgNode::getId(), query_hint_, and RelAlgNode::toHash().
Referenced by anonymous_namespace{RelAlgDag.cpp}::parse_subquery(), and registerQueryHints().
|
inline |
Definition at line 2542 of file RelAlgDag.h.
References RegisteredQueryHint::aggregate_tree_fanout, CHECK_EQ, RegisteredQueryHint::columnar_output, RegisteredQueryHint::cpu_mode, RegisteredQueryHint::cuda_block_size, RegisteredQueryHint::cuda_grid_size_multiplier, RegisteredQueryHint::dynamic_watchdog, g_enable_columnar_output, g_enable_data_recycler, g_enable_dynamic_watchdog, g_enable_watchdog, g_use_query_resultset_cache, kAggregateTreeFanout, kAllowLoopJoin, kColumnarOutput, kCpuMode, kCudaBlockSize, kCudaGridSize, kDisableLoopJoin, kDynamicWatchdog, kDynamicWatchdogOff, RegisteredQueryHint::keep_result, RegisteredQueryHint::keep_table_function_result, kKeepResult, kKeepTableFuncResult, kLoopJoinInnerTableMaxNumRows, kMaxJoinHashTableSize, kOptCudaBlockAndGridSizes, kOverlapsAllowGpuBuild, kOverlapsBucketThreshold, kOverlapsKeysPerBin, kOverlapsMaxSize, kOverlapsNoCache, kQueryTimeLimit, kRowwiseOutput, kWatchdog, kWatchdogOff, RegisteredQueryHint::loop_join_inner_table_max_num_rows, RegisteredQueryHint::max_join_hash_table_size, RegisteredQueryHint::opt_cuda_grid_and_block_size, RegisteredQueryHint::overlaps_allow_gpu_build, RegisteredQueryHint::overlaps_bucket_threshold, RegisteredQueryHint::overlaps_keys_per_bin, RegisteredQueryHint::overlaps_max_size, RegisteredQueryHint::overlaps_no_cache, RegisteredQueryHint::query_time_limit, RegisteredQueryHint::registerHint(), registerQueryHint(), RegisteredQueryHint::rowwise_output, RegisteredQueryHint::use_loop_join, VLOG, and RegisteredQueryHint::watchdog.
|
inline |
Registers a subquery with a root DAG builder. Should only be called during DAG building and registration should only occur on the root.
Definition at line 2530 of file RelAlgDag.h.
References subqueries_.
Referenced by anonymous_namespace{RelAlgDag.cpp}::parse_subquery().
void RelAlgDag::resetQueryExecutionState | ( | ) |
Gets all registered subqueries. Only the root DAG can contain subqueries.
Definition at line 3348 of file RelAlgDag.cpp.
References nodes_.
|
inline |
Definition at line 2974 of file RelAlgDag.h.
References global_hints_.
Referenced by RelAlgExecutor::executeRelAlgQueryNoRetry(), and anonymous_namespace{RelAlgDag.cpp}::parse_subquery().
|
friend |
Definition at line 2997 of file RelAlgDag.h.
|
friend |
Definition at line 2996 of file RelAlgDag.h.
|
private |
Definition at line 2984 of file RelAlgDag.h.
Referenced by getBuildState(), RelAlgDagSerializer::serialize(), and RelAlgDagModifier::setBuildState().
|
private |
Definition at line 2994 of file RelAlgDag.h.
Referenced by getGlobalHints(), getQueryHint(), RelAlgDagSerializer::serialize(), and setGlobalQueryHints().
|
private |
Definition at line 2986 of file RelAlgDag.h.
Referenced by eachNode(), RelAlgDagModifier::getNodes(), getRootNode(), getRootNodeShPtr(), resetQueryExecutionState(), and RelAlgDagSerializer::serialize().
|
private |
Definition at line 2993 of file RelAlgDag.h.
Referenced by getQueryHint(), getQueryHints(), RelAlgDagModifier::getQueryHints(), registerQueryHint(), and RelAlgDagSerializer::serialize().
|
private |
Definition at line 2987 of file RelAlgDag.h.
Referenced by getSubqueries(), RelAlgDagModifier::getSubqueries(), registerSubquery(), and RelAlgDagSerializer::serialize().