mirror of https://gitee.com/bigwinds/arangodb
Rename staticAnalysis -> planRegisters.
This commit is contained in:
parent
5b0b1f0af5
commit
be07d39457
|
@ -1489,7 +1489,7 @@ int EnumerateListBlock::initialize () {
|
|||
auto en = reinterpret_cast<EnumerateListNode const*>(_exeNode);
|
||||
|
||||
// get the inVariable register id . . .
|
||||
// staticAnalysis has been run, so getPlanNode()->_varOverview is set up
|
||||
// planRegisters() has been run, so getPlanNode()->_varOverview is set up
|
||||
auto it = getPlanNode()->getVarOverview()->varInfo.find(en->_inVariable->id);
|
||||
|
||||
if (it == getPlanNode()->getVarOverview()->varInfo.end()){
|
||||
|
@ -1765,7 +1765,8 @@ int CalculationBlock::initialize () {
|
|||
return res;
|
||||
}
|
||||
|
||||
// We know that staticAnalysis has been run, so getPlanNode()->_varOverview is set up
|
||||
// We know that planRegisters has been run, so
|
||||
// getPlanNode()->_varOverview is set up
|
||||
auto en = static_cast<CalculationNode const*>(getPlanNode());
|
||||
|
||||
std::unordered_set<Variable*> inVars = _expression->variables();
|
||||
|
@ -1867,7 +1868,8 @@ int SubqueryBlock::initialize () {
|
|||
return res;
|
||||
}
|
||||
|
||||
// We know that staticAnalysis has been run, so getPlanNode()->_varOverview is set up
|
||||
// We know that planRegisters() has been run, so
|
||||
// getPlanNode()->_varOverview is set up
|
||||
|
||||
auto en = static_cast<SubqueryNode const*>(getPlanNode());
|
||||
|
||||
|
@ -1930,7 +1932,8 @@ int FilterBlock::initialize () {
|
|||
return res;
|
||||
}
|
||||
|
||||
// We know that staticAnalysis has been run, so getPlanNode()->_varOverview is set up
|
||||
// We know that planRegisters() has been run, so
|
||||
// getPlanNode()->_varOverview is set up
|
||||
|
||||
auto en = static_cast<FilterNode const*>(getPlanNode());
|
||||
|
||||
|
@ -2117,7 +2120,8 @@ int AggregateBlock::initialize () {
|
|||
_variableNames.clear();
|
||||
|
||||
for (auto p : en->_aggregateVariables){
|
||||
// We know that staticAnalysis has been run, so getPlanNode()->_varOverview is set up
|
||||
// We know that planRegisters() has been run, so
|
||||
// getPlanNode()->_varOverview is set up
|
||||
auto itOut = en->getVarOverview()->varInfo.find(p.first->id);
|
||||
TRI_ASSERT(itOut != en->getVarOverview()->varInfo.end());
|
||||
|
||||
|
@ -2350,7 +2354,8 @@ int SortBlock::initialize () {
|
|||
_sortRegisters.clear();
|
||||
|
||||
for (auto p: en->_elements){
|
||||
// We know that staticAnalysis has been run, so getPlanNode()->_varOverview is set up
|
||||
// We know that planRegisters() has been run, so
|
||||
// getPlanNode()->_varOverview is set up
|
||||
auto it = en->getVarOverview()->varInfo.find(p.first->id);
|
||||
TRI_ASSERT(it != en->getVarOverview()->varInfo.end());
|
||||
_sortRegisters.push_back(make_pair(it->second.registerId, p.second));
|
||||
|
@ -3233,7 +3238,8 @@ int GatherBlock::initialize () {
|
|||
_sortRegisters.clear();
|
||||
|
||||
for( auto p: en->_elements){
|
||||
// We know that staticAnalysis has been run, so getPlanNode()->_varOverview is set up
|
||||
// We know that planRegisters has been run, so
|
||||
// getPlanNode()->_varOverview is set up
|
||||
auto it = en->getVarOverview()->varInfo.find(p.first->id);
|
||||
TRI_ASSERT(it != en->getVarOverview()->varInfo.end());
|
||||
_sortRegisters.push_back(make_pair(it->second.registerId, p.second));
|
||||
|
|
|
@ -461,7 +461,7 @@ std::cout << "REGISTERING QUERY ON COORDINATOR WITH ID: " << id << "\n";
|
|||
collection->setCurrentShard(shardId);
|
||||
|
||||
plan.findVarUsage();
|
||||
plan.staticAnalysis();
|
||||
plan.planRegisters();
|
||||
|
||||
// create a JSON representation of the plan
|
||||
triagens::basics::Json result(triagens::basics::Json::Array);
|
||||
|
@ -693,7 +693,7 @@ ExecutionEngine* ExecutionEngine::instanciateFromPlan (QueryRegistry* queryRegis
|
|||
if (! plan->varUsageComputed()) {
|
||||
plan->findVarUsage();
|
||||
}
|
||||
plan->staticAnalysis();
|
||||
plan->planRegisters();
|
||||
|
||||
ExecutionBlock* root = nullptr;
|
||||
|
||||
|
|
|
@ -571,10 +571,10 @@ struct StaticAnalysisDebugger : public WalkerWorker<ExecutionNode> {
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief staticAnalysis
|
||||
/// @brief planRegisters
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void ExecutionNode::staticAnalysis (ExecutionNode* super) {
|
||||
void ExecutionNode::planRegisters (ExecutionNode* super) {
|
||||
// The super is only for the case of subqueries.
|
||||
shared_ptr<VarOverview> v;
|
||||
if (super == nullptr) {
|
||||
|
@ -588,7 +588,7 @@ void ExecutionNode::staticAnalysis (ExecutionNode* super) {
|
|||
// Now handle the subqueries:
|
||||
for (auto s : v->subQueryNodes) {
|
||||
auto sq = static_cast<SubqueryNode*>(s);
|
||||
sq->getSubquery()->staticAnalysis(s);
|
||||
sq->getSubquery()->planRegisters(s);
|
||||
}
|
||||
v->reset();
|
||||
|
||||
|
|
|
@ -566,7 +566,7 @@ namespace triagens {
|
|||
/// @brief static analysis
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void staticAnalysis (ExecutionNode* super = nullptr);
|
||||
void planRegisters (ExecutionNode* super = nullptr);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief get varOverview
|
||||
|
@ -694,13 +694,13 @@ namespace triagens {
|
|||
ExecutionPlan* _plan;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief info about variables, filled in by staticAnalysis
|
||||
/// @brief info about variables, filled in by planRegisters
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::shared_ptr<VarOverview> _varOverview;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief depth of the current frame, will be filled in by staticAnalysis
|
||||
/// @brief depth of the current frame, will be filled in by planRegisters
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int _depth;
|
||||
|
|
|
@ -234,8 +234,8 @@ namespace triagens {
|
|||
/// @brief static analysis
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void staticAnalysis () {
|
||||
_root->staticAnalysis();
|
||||
void planRegisters () {
|
||||
_root->planRegisters();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue