mirror of https://gitee.com/bigwinds/arangodb
adding registration of the remove unnecessary remote scatter optimizer rule.
This commit is contained in:
parent
d177bc110c
commit
d204ce4019
|
@ -463,6 +463,11 @@ void Optimizer::setupRules () {
|
|||
registerRule("distribute-sort-to-cluster",
|
||||
distributeSortToCluster,
|
||||
distributeSortToCluster_pass10,
|
||||
false);*/
|
||||
|
||||
registerRule("remove-unnecessary-remote-scatter",
|
||||
removeUnnecessaryRemoteScatter,
|
||||
removeUnnecessaryRemoteScatter_pass10,
|
||||
false);
|
||||
|
||||
}
|
||||
|
|
|
@ -145,7 +145,12 @@ namespace triagens {
|
|||
|
||||
// move SortNodes into the distribution.
|
||||
// adjust gathernode to also contain the sort criterions.
|
||||
distributeSortToCluster_pass10 = 1020
|
||||
distributeSortToCluster_pass10 = 1020,
|
||||
|
||||
// try to get rid of a RemoteNode->ScatterNode combination which has
|
||||
// only a SingletonNode and possibly some CalculationNodes as dependencies
|
||||
|
||||
removeUnnecessaryRemoteScatter_pass10 = 1030
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
|
@ -1905,6 +1905,7 @@ class ScatterToSingletonViaCalcOnlyFinder: public WalkerWorker<ExecutionNode> {
|
|||
case EN::SCATTER:{
|
||||
if (_scatter != nullptr) {
|
||||
return true; // somehow found 2 scatter nodes . . .
|
||||
// FIXME is this even possible?
|
||||
}
|
||||
_scatter = en;
|
||||
return false; // continue . . .
|
||||
|
@ -1915,7 +1916,7 @@ class ScatterToSingletonViaCalcOnlyFinder: public WalkerWorker<ExecutionNode> {
|
|||
}
|
||||
case EN::SINGLETON: {
|
||||
if (_scatter == nullptr) {
|
||||
return true; // found no scatter nodes
|
||||
return true; // found no scatter nodes, abort
|
||||
}
|
||||
auto newPlan = _plan->clone();
|
||||
if (newPlan == nullptr) {
|
||||
|
|
|
@ -116,8 +116,6 @@ namespace triagens {
|
|||
|
||||
int distributeSortToCluster (Optimizer*, ExecutionPlan*, Optimizer::Rule const*);
|
||||
|
||||
int distributeSortToCluster (Optimizer*, ExecutionPlan*, Optimizer::Rule const*);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief try to get rid of a RemoteNode->ScatterNode combination which has
|
||||
/// only a SingletonNode and possibly some CalculationNodes as dependencies
|
||||
|
|
Loading…
Reference in New Issue