OmniSciDB
a5dc49c757
|
#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 |
std::vector< std::shared_ptr < RelAlgNode > > & | getNodes () |
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 2799 of file RelAlgDag.h.
|
strong |
Enumerator | |
---|---|
kNotBuilt | |
kBuiltNotOptimized | |
kBuiltOptimized |
Definition at line 2801 of file RelAlgDag.h.
|
inline |
void RelAlgDag::eachNode | ( | std::function< void(RelAlgNode const *)> const & | callback | ) | const |
|
inline |
Definition at line 2805 of file RelAlgDag.h.
References build_state_.
Referenced by RelAlgDagBuilder::optimizeDag().
|
inline |
Definition at line 3367 of file RelAlgDag.h.
References global_hints_.
Referenced by anonymous_namespace{RelAlgDag.cpp}::parse_subquery().
|
inline |
Definition at line 2824 of file RelAlgDag.h.
References nodes_.
Referenced by RelAlgExecutor::executeRelAlgQueryNoRetry().
|
inline |
Definition at line 3339 of file RelAlgDag.h.
References RelAlgNode::getId(), global_hints_, RegisteredQueryHint::isAnyQueryHintDelivered(), query_hint_, and RelAlgNode::toHash().
|
inline |
Definition at line 3363 of file RelAlgDag.h.
References query_hint_.
|
inline |
|
inline |
Definition at line 2819 of file RelAlgDag.h.
|
inline |
Gets all registered subqueries. Only the root DAG can contain subqueries.
Definition at line 2837 of file RelAlgDag.h.
References subqueries_.
|
inline |
Definition at line 3327 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 2842 of file RelAlgDag.h.
References RegisteredQueryHint::aggregate_tree_fanout, RegisteredQueryHint::bbox_intersect_allow_gpu_build, RegisteredQueryHint::bbox_intersect_bucket_threshold, RegisteredQueryHint::bbox_intersect_keys_per_bin, RegisteredQueryHint::bbox_intersect_max_size, RegisteredQueryHint::bbox_intersect_no_cache, CHECK_EQ, RegisteredQueryHint::columnar_output, RegisteredQueryHint::cpu_mode, RegisteredQueryHint::cuda_block_size, RegisteredQueryHint::cuda_grid_size_multiplier, RegisteredQueryHint::dynamic_watchdog, RegisteredQueryHint::force_baseline_hash_join, RegisteredQueryHint::force_one_to_many_hash_join, g_enable_columnar_output, g_enable_data_recycler, g_enable_dynamic_watchdog, g_enable_watchdog, g_use_query_resultset_cache, kAggregateTreeFanout, kAllowLoopJoin, kBBoxIntersectAllowGpuBuild, kBBoxIntersectBucketThreshold, kBBoxIntersectKeysPerBin, kBBoxIntersectMaxSize, kBBoxIntersectNoCache, kColumnarOutput, kCpuMode, kCudaBlockSize, kCudaGridSize, kDisableLoopJoin, kDynamicWatchdog, kDynamicWatchdogOff, RegisteredQueryHint::keep_result, RegisteredQueryHint::keep_table_function_result, kforceBaselineHashJoin, kforceOneToManyHashJoin, kKeepResult, kKeepTableFuncResult, kLoopJoinInnerTableMaxNumRows, kMaxJoinHashTableSize, kNDVGroupsEstimatorMultiplier, kOptCudaBlockAndGridSizes, kPreflightCountQueryThreshold, kQueryTimeLimit, kRowwiseOutput, kTableReorderingOff, kWatchdog, kWatchdogMaxProjectedRowsPerDevice, kWatchdogOff, RegisteredQueryHint::loop_join_inner_table_max_num_rows, RegisteredQueryHint::max_join_hash_table_size, RegisteredQueryHint::ndv_groups_estimator_multiplier, RegisteredQueryHint::opt_cuda_grid_and_block_size, RegisteredQueryHint::preflight_count_query_threshold, RegisteredQueryHint::query_time_limit, RegisteredQueryHint::registerHint(), registerQueryHint(), RegisteredQueryHint::rowwise_output, RegisteredQueryHint::table_reordering_off, RegisteredQueryHint::use_loop_join, VLOG, RegisteredQueryHint::watchdog, and RegisteredQueryHint::watchdog_max_projected_rows_per_device.
|
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 2830 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 3471 of file RelAlgDag.cpp.
References nodes_.
|
inline |
Definition at line 3369 of file RelAlgDag.h.
References global_hints_.
Referenced by RelAlgExecutor::executeRelAlgQueryNoRetry(), and anonymous_namespace{RelAlgDag.cpp}::parse_subquery().
|
friend |
Definition at line 3392 of file RelAlgDag.h.
|
friend |
Definition at line 3391 of file RelAlgDag.h.
|
private |
Definition at line 3379 of file RelAlgDag.h.
Referenced by getBuildState(), RelAlgDagSerializer::serialize(), and RelAlgDagModifier::setBuildState().
|
private |
Definition at line 3389 of file RelAlgDag.h.
Referenced by getGlobalHints(), getQueryHint(), RelAlgDagSerializer::serialize(), and setGlobalQueryHints().
|
private |
Definition at line 3381 of file RelAlgDag.h.
Referenced by eachNode(), getNodes(), RelAlgDagModifier::getNodes(), getRootNode(), getRootNodeShPtr(), resetQueryExecutionState(), and RelAlgDagSerializer::serialize().
|
private |
Definition at line 3388 of file RelAlgDag.h.
Referenced by getQueryHint(), getQueryHints(), RelAlgDagModifier::getQueryHints(), registerQueryHint(), and RelAlgDagSerializer::serialize().
|
private |
Definition at line 3382 of file RelAlgDag.h.
Referenced by getSubqueries(), RelAlgDagModifier::getSubqueries(), registerSubquery(), and RelAlgDagSerializer::serialize().