mirror of https://gitee.com/bigwinds/arangodb
added assertions
This commit is contained in:
parent
a9a078a22f
commit
9f9b35d685
|
@ -292,9 +292,9 @@ struct OptimizerRule {
|
|||
// entire document to a projection of this document
|
||||
reduceExtractionToProjectionRule,
|
||||
|
||||
// moves filters on collection data into EnumerateCollection to
|
||||
// moves filters on collection data into EnumerateCollection/Index to
|
||||
// avoid copying large amounts of unneeded documents
|
||||
moveFiltersIntoEnumerateCollectionRule,
|
||||
moveFiltersIntoEnumerateRule,
|
||||
|
||||
// parallelizes execution in coordinator-sided GatherNodes
|
||||
parallelizeGatherRule,
|
||||
|
@ -310,6 +310,18 @@ struct OptimizerRule {
|
|||
spliceSubqueriesRule
|
||||
};
|
||||
|
||||
#ifdef USE_ENTERPRISE
|
||||
static_assert(clusterOneShardRule < distributeInClusterRule);
|
||||
static_assert(clusterOneShardRule < smartJoinsRule);
|
||||
static_assert(clusterOneShardRule < scatterInClusterRule);
|
||||
|
||||
// smart joins must come before we move filters around, so the smart-join
|
||||
// detection code does not need to take the special filters into account
|
||||
static_assert(smartJoinsRule < moveFiltersIntoEnumerateRule);
|
||||
#endif
|
||||
|
||||
static_assert(scatterInClusterRule < parallelizeGatherRule);
|
||||
|
||||
velocypack::StringRef name;
|
||||
RuleFunction func;
|
||||
RuleLevel level;
|
||||
|
|
|
@ -377,7 +377,7 @@ void OptimizerRulesFeature::addRules() {
|
|||
OptimizerRule::Flags::ClusterOnly));
|
||||
|
||||
registerRule("move-filters-into-enumerate", moveFiltersIntoEnumerateRule,
|
||||
OptimizerRule::moveFiltersIntoEnumerateCollectionRule,
|
||||
OptimizerRule::moveFiltersIntoEnumerateRule,
|
||||
OptimizerRule::makeFlags(OptimizerRule::Flags::CanBeDisabled));
|
||||
|
||||
registerRule("parallelize-gather", parallelizeGatherRule,
|
||||
|
|
Loading…
Reference in New Issue