1
0
Fork 0

handle K_SHORTEST_PATHS where it was forgotten (#9955)

This commit is contained in:
Jan 2019-09-09 20:32:58 +02:00 committed by KVS85
parent 1d92a22f76
commit 4feb615de7
5 changed files with 9 additions and 2 deletions

View File

@ -1659,7 +1659,8 @@ void Ast::injectBindParameters(BindParameters& parameters,
node->getString().c_str()); node->getString().c_str());
} else if (node->type == NODE_TYPE_TRAVERSAL) { } else if (node->type == NODE_TYPE_TRAVERSAL) {
extractCollectionsFromGraph(node->getMember(2)); extractCollectionsFromGraph(node->getMember(2));
} else if (node->type == NODE_TYPE_SHORTEST_PATH) { } else if (node->type == NODE_TYPE_SHORTEST_PATH ||
node->type == NODE_TYPE_K_SHORTEST_PATHS) {
extractCollectionsFromGraph(node->getMember(3)); extractCollectionsFromGraph(node->getMember(3));
} }

View File

@ -364,6 +364,7 @@ CostEstimate DistributeNode::estimateCost() const {
return castTo<IndexNode const*>(node)->collection(); return castTo<IndexNode const*>(node)->collection();
case TRAVERSAL: case TRAVERSAL:
case SHORTEST_PATH: case SHORTEST_PATH:
case K_SHORTEST_PATHS:
return castTo<GraphNode const*>(node)->collection(); return castTo<GraphNode const*>(node)->collection();
case SCATTER: case SCATTER:
return nullptr; // diamond boundary return nullptr; // diamond boundary

View File

@ -2334,7 +2334,8 @@ bool ExecutionPlan::isDeadSimple() const {
if (nodeType == ExecutionNode::SUBQUERY || nodeType == ExecutionNode::ENUMERATE_COLLECTION || if (nodeType == ExecutionNode::SUBQUERY || nodeType == ExecutionNode::ENUMERATE_COLLECTION ||
nodeType == ExecutionNode::ENUMERATE_LIST || nodeType == ExecutionNode::TRAVERSAL || nodeType == ExecutionNode::ENUMERATE_LIST || nodeType == ExecutionNode::TRAVERSAL ||
nodeType == ExecutionNode::SHORTEST_PATH || nodeType == ExecutionNode::INDEX) { nodeType == ExecutionNode::SHORTEST_PATH || nodeType == ExecutionNode::K_SHORTEST_PATHS ||
nodeType == ExecutionNode::INDEX) {
// these node types are not simple // these node types are not simple
return false; return false;
} }

View File

@ -387,6 +387,7 @@ bool hasDependencies(aql::ExecutionPlan const& plan, aql::AstNode const& node,
case aql::ExecutionNode::TRAVERSAL: case aql::ExecutionNode::TRAVERSAL:
case aql::ExecutionNode::INDEX: case aql::ExecutionNode::INDEX:
case aql::ExecutionNode::SHORTEST_PATH: case aql::ExecutionNode::SHORTEST_PATH:
case aql::ExecutionNode::K_SHORTEST_PATHS:
case aql::ExecutionNode::ENUMERATE_IRESEARCH_VIEW: case aql::ExecutionNode::ENUMERATE_IRESEARCH_VIEW:
// we're in the loop with dependent context // we're in the loop with dependent context
return true; return true;
@ -415,6 +416,7 @@ bool isInInnerLoopOrSubquery(aql::ExecutionNode const& node) {
case aql::ExecutionNode::TRAVERSAL: case aql::ExecutionNode::TRAVERSAL:
case aql::ExecutionNode::ENUMERATE_LIST: case aql::ExecutionNode::ENUMERATE_LIST:
case aql::ExecutionNode::SHORTEST_PATH: case aql::ExecutionNode::SHORTEST_PATH:
case aql::ExecutionNode::K_SHORTEST_PATHS:
case aql::ExecutionNode::ENUMERATE_IRESEARCH_VIEW: case aql::ExecutionNode::ENUMERATE_IRESEARCH_VIEW:
// we're in a loop // we're in a loop
return true; return true;

View File

@ -162,6 +162,7 @@ bool optimizeSort(IResearchViewNode& viewNode, ExecutionPlan* plan) {
current->getType() == EN::ENUMERATE_COLLECTION || current->getType() == EN::ENUMERATE_COLLECTION ||
current->getType() == EN::TRAVERSAL || current->getType() == EN::TRAVERSAL ||
current->getType() == EN::SHORTEST_PATH || current->getType() == EN::SHORTEST_PATH ||
current->getType() == EN::K_SHORTEST_PATHS ||
current->getType() == EN::INDEX || current->getType() == EN::INDEX ||
current->getType() == EN::COLLECT) { current->getType() == EN::COLLECT) {
// any of these node types will lead to more/less results in the output, // any of these node types will lead to more/less results in the output,
@ -239,6 +240,7 @@ bool optimizeSort(IResearchViewNode& viewNode, ExecutionPlan* plan) {
current->getType() == EN::ENUMERATE_COLLECTION || current->getType() == EN::ENUMERATE_COLLECTION ||
current->getType() == EN::TRAVERSAL || current->getType() == EN::TRAVERSAL ||
current->getType() == EN::SHORTEST_PATH || current->getType() == EN::SHORTEST_PATH ||
current->getType() == EN::K_SHORTEST_PATHS ||
current->getType() == EN::INDEX || current->getType() == EN::INDEX ||
current->getType() == EN::COLLECT || current->getType() == EN::COLLECT ||
current->getType() == EN::SORT) { current->getType() == EN::SORT) {