OmniSciDB
a5dc49c757
|
#include <QueryPlanDagExtractor.h>
Public Member Functions | |
QueryPlanDagExtractor (QueryPlanDagCache &global_dag, std::unordered_map< unsigned, JoinQualsPerNestingLevel > left_deep_tree_infos, Executor *executor, bool analyze_join_ops) | |
HashTableBuildDagMap | getHashTableBuildDag () |
const JoinQualsPerNestingLevel * | getPerNestingJoinQualInfo (std::optional< unsigned > left_deep_join_tree_id) |
bool | isDagExtractionAvailable () |
std::string | getExtractedQueryPlanDagStr (size_t start_pos=0) |
std::vector< InnerOuterOrLoopQual > | normalizeColumnsPair (const Analyzer::BinOper *condition) |
bool | isEmptyQueryPlanDag (const std::string &dag) |
TableIdToNodeMap | getTableIdToNodeMap () |
void | addTableIdToNodeLink (const shared::TableKey &table_id, const RelAlgNode *node) |
void | clearInternalStatus () |
Static Public Member Functions | |
static ExtractedJoinInfo | extractJoinInfo (const RelAlgNode *top_node, std::optional< unsigned > left_deep_tree_id, std::unordered_map< unsigned, JoinQualsPerNestingLevel > left_deep_tree_infos, Executor *executor) |
static ExtractedQueryPlanDag | extractQueryPlanDag (const RelAlgNode *top_node, Executor *executor) |
static size_t | applyLimitClauseToCacheKey (size_t cache_key, SortInfo const &sort_info) |
Private Member Functions | |
void | visit (const RelAlgNode *, const RelAlgNode *) |
std::vector < Analyzer::ColumnVar const * > | getColVar (const Analyzer::Expr *col_info) |
void | register_and_visit (const RelAlgNode *parent_node, const RelAlgNode *child_node) |
void | handleLeftDeepJoinTree (const RelAlgNode *, const RelLeftDeepInnerJoin *) |
void | handleTranslatedJoin (const RelAlgNode *, const RelTranslatedJoin *) |
bool | validateNodeId (const RelAlgNode *node, std::optional< RelNodeId > retrieved_node_id) |
bool | registerNodeToDagCache (const RelAlgNode *parent_node, const RelAlgNode *child_node, std::optional< RelNodeId > retrieved_node_id) |
Static Private Member Functions | |
static void | extractQueryPlanDagImpl (const RelAlgNode *top_npde, QueryPlanDagExtractor &dag_extractor) |
Private Attributes | |
QueryPlanDagCache & | global_dag_ |
bool | contain_not_supported_rel_node_ |
std::unordered_map< unsigned, JoinQualsPerNestingLevel > | left_deep_tree_infos_ |
Executor * | executor_ |
bool | analyze_join_ops_ |
std::shared_ptr < TranslatedJoinInfo > | translated_join_info_ |
HashTableBuildDagMap | hash_table_query_plan_dag_ |
TableIdToNodeMap | table_id_to_node_map_ |
std::vector< std::string > | extracted_dag_ |
Definition at line 52 of file QueryPlanDagExtractor.h.
|
inline |
Definition at line 54 of file QueryPlanDagExtractor.h.
References analyze_join_ops_, and translated_join_info_.
|
inline |
Definition at line 104 of file QueryPlanDagExtractor.h.
References table_id_to_node_map_.
Referenced by handleTranslatedJoin().
|
static |
Definition at line 606 of file QueryPlanDagExtractor.cpp.
References SortInfo::hashLimit().
Referenced by RelAlgExecutor::createAggregateWorkUnit(), RelAlgExecutor::createCompoundWorkUnit(), RelAlgExecutor::createFilterWorkUnit(), RelAlgExecutor::createProjectWorkUnit(), RelAlgExecutor::createWindowFunctionContext(), RelAlgExecutor::executeRelAlgStep(), RelAlgExecutor::executeSort(), and RaExecutionSequence::next().
|
inline |
Definition at line 111 of file QueryPlanDagExtractor.h.
References contain_not_supported_rel_node_, extracted_dag_, and table_id_to_node_map_.
Referenced by handleLeftDeepJoinTree(), handleTranslatedJoin(), validateNodeId(), and visit().
|
static |
Definition at line 109 of file QueryPlanDagExtractor.cpp.
References EMPTY_HASHED_PLAN_DAG_KEY, extractQueryPlanDagImpl(), getHashTableBuildDag(), RelAlgNode::getQueryPlanDagHash(), and getTableIdToNodeMap().
Referenced by RelAlgExecutor::createAggregateWorkUnit(), RelAlgExecutor::createCompoundWorkUnit(), RelAlgExecutor::createFilterWorkUnit(), and RelAlgExecutor::createProjectWorkUnit().
|
static |
Definition at line 85 of file QueryPlanDagExtractor.cpp.
References EMPTY_QUERY_PLAN, extractQueryPlanDagImpl(), QueryPlanDagChecker::hasNonSupportedNodeInDag(), RelAlgNode::setQueryPlanDag(), and VLOG.
Referenced by QueryRunner::QueryRunner::extractQueryPlanDag(), and RaExecutionSequence::next().
|
staticprivate |
Definition at line 125 of file QueryPlanDagExtractor.cpp.
References QueryPlanDagCache::addNodeIfAbsent(), CHECK, contain_not_supported_rel_node_, executor_, extracted_dag_, g_is_test_env, getExtractedQueryPlanDagStr(), RelAlgNode::getInput(), global_dag_, RelAlgNode::inputCount(), isDagExtractionAvailable(), run_benchmark_import::res, RelAlgNode::setRelNodeDagId(), toString(), UNREACHABLE, visit(), and VLOG.
Referenced by extractJoinInfo(), and extractQueryPlanDag().
|
private |
Definition at line 416 of file QueryPlanDagExtractor.cpp.
References QueryPlanDagCache::collectColVars(), and global_dag_.
Referenced by handleLeftDeepJoinTree().
std::string QueryPlanDagExtractor::getExtractedQueryPlanDagStr | ( | size_t | start_pos = 0 | ) |
Definition at line 181 of file QueryPlanDagExtractor.cpp.
References EMPTY_QUERY_PLAN, and extracted_dag_.
Referenced by extractQueryPlanDagImpl(), and handleTranslatedJoin().
|
inline |
Definition at line 78 of file QueryPlanDagExtractor.h.
References hash_table_query_plan_dag_.
Referenced by extractJoinInfo().
|
inline |
Definition at line 80 of file QueryPlanDagExtractor.h.
References CHECK, and left_deep_tree_infos_.
Referenced by handleLeftDeepJoinTree().
|
inline |
Definition at line 102 of file QueryPlanDagExtractor.h.
References table_id_to_node_map_.
Referenced by extractJoinInfo().
|
private |
Definition at line 429 of file QueryPlanDagExtractor.cpp.
References anonymous_namespace{QueryMemoryDescriptor.cpp}::any_of(), CHECK, clearInternalStatus(), gpu_enabled::copy(), anonymous_namespace{QueryMemoryInitializer.cpp}::get_input_idx(), getColVar(), RelAlgNode::getId(), RelAlgNode::getInput(), RelLeftDeepInnerJoin::getOuterCondition(), getPerNestingJoinQualInfo(), handleTranslatedJoin(), INVALID, LEFT, normalizeColumnsPair(), toString(), translated_join_info_, and VLOG.
Referenced by visit().
|
private |
Definition at line 281 of file QueryPlanDagExtractor.cpp.
References QueryPlanDagCache::addNodeIfAbsent(), addTableIdToNodeLink(), CHECK, clearInternalStatus(), EMPTY_HASHED_PLAN_DAG_KEY, extracted_dag_, getExtractedQueryPlanDagStr(), RelTranslatedJoin::getJoinCols(), RelTranslatedJoin::getLHS(), RelTranslatedJoin::getRHS(), ScanNodeTableKeyCollector::getScanNodeTableKey(), global_dag_, hash_table_query_plan_dag_, hash_value(), isEmptyQueryPlanDag(), RelTranslatedJoin::isNestedLoopQual(), anonymous_namespace{RelAlgDag.cpp}::node_id(), registerNodeToDagCache(), run_benchmark_import::res, split(), QueryPlanDagCache::translateColVarsToInfoHash(), validateNodeId(), visit(), and VLOG.
Referenced by handleLeftDeepJoinTree(), and visit().
|
inline |
Definition at line 93 of file QueryPlanDagExtractor.h.
References contain_not_supported_rel_node_.
Referenced by extractQueryPlanDagImpl().
|
inline |
Definition at line 100 of file QueryPlanDagExtractor.h.
Referenced by handleTranslatedJoin().
std::vector< InnerOuterOrLoopQual > QueryPlanDagExtractor::normalizeColumnsPair | ( | const Analyzer::BinOper * | condition | ) |
Definition at line 38 of file QueryPlanDagExtractor.cpp.
References CHECK_EQ, executor_, Analyzer::BinOper::get_left_operand(), Analyzer::BinOper::get_right_operand(), Analyzer::BinOper::is_bbox_intersect_oper(), HashJoin::normalizeColumnPair(), and run_benchmark_import::result.
Referenced by handleLeftDeepJoinTree().
|
private |
Definition at line 221 of file QueryPlanDagExtractor.cpp.
References QueryPlanDagCache::addNodeIfAbsent(), RelAlgNode::getInput(), global_dag_, RelAlgNode::inputCount(), registerNodeToDagCache(), run_benchmark_import::res, validateNodeId(), and visit().
Referenced by visit().
|
private |
Definition at line 208 of file QueryPlanDagExtractor.cpp.
References CHECK, QueryPlanDagCache::connectNodes(), extracted_dag_, RelAlgNode::getRelNodeDagId(), global_dag_, and toString().
Referenced by handleTranslatedJoin(), and register_and_visit().
|
private |
Definition at line 196 of file QueryPlanDagExtractor.cpp.
References CHECK, clearInternalStatus(), RelAlgNode::setRelNodeDagId(), and VLOG.
Referenced by handleTranslatedJoin(), and register_and_visit().
|
private |
Definition at line 238 of file QueryPlanDagExtractor.cpp.
References analyze_join_ops_, clearInternalStatus(), contain_not_supported_rel_node_, handleLeftDeepJoinTree(), handleTranslatedJoin(), left_deep_tree_infos_, register_and_visit(), RexVisitorBase< T >::visit(), and VLOG.
Referenced by extractQueryPlanDagImpl(), handleTranslatedJoin(), and register_and_visit().
|
private |
Definition at line 136 of file QueryPlanDagExtractor.h.
Referenced by QueryPlanDagExtractor(), and visit().
|
private |
Definition at line 133 of file QueryPlanDagExtractor.h.
Referenced by clearInternalStatus(), extractQueryPlanDagImpl(), isDagExtractionAvailable(), and visit().
|
private |
Definition at line 135 of file QueryPlanDagExtractor.h.
Referenced by extractQueryPlanDagImpl(), and normalizeColumnsPair().
|
private |
Definition at line 140 of file QueryPlanDagExtractor.h.
Referenced by clearInternalStatus(), extractQueryPlanDagImpl(), getExtractedQueryPlanDagStr(), handleTranslatedJoin(), and registerNodeToDagCache().
|
private |
Definition at line 132 of file QueryPlanDagExtractor.h.
Referenced by extractQueryPlanDagImpl(), getColVar(), handleTranslatedJoin(), register_and_visit(), and registerNodeToDagCache().
|
private |
Definition at line 138 of file QueryPlanDagExtractor.h.
Referenced by getHashTableBuildDag(), and handleTranslatedJoin().
|
private |
Definition at line 134 of file QueryPlanDagExtractor.h.
Referenced by getPerNestingJoinQualInfo(), and visit().
|
private |
Definition at line 139 of file QueryPlanDagExtractor.h.
Referenced by addTableIdToNodeLink(), clearInternalStatus(), and getTableIdToNodeMap().
|
private |
Definition at line 137 of file QueryPlanDagExtractor.h.
Referenced by handleLeftDeepJoinTree(), and QueryPlanDagExtractor().