1
0
Fork 0

fixed display of Traversals in AQL explain

This commit is contained in:
Jan Steemann 2016-02-02 11:24:51 +01:00
parent 3e044748bf
commit 45d9745756
3 changed files with 11 additions and 4 deletions

View File

@ -111,6 +111,7 @@ TraversalNode::TraversalNode(ExecutionPlan* plan, size_t id,
_vertexOutVariable(nullptr),
_edgeOutVariable(nullptr),
_pathOutVariable(nullptr),
_inVariable(nullptr),
_graphObj(nullptr),
_condition(nullptr) {
TRI_ASSERT(_vocbase != nullptr);
@ -244,9 +245,14 @@ TraversalNode::TraversalNode(ExecutionPlan* plan, size_t id,
_minDepth(minDepth),
_maxDepth(maxDepth),
_directions(directions),
_graphObj(nullptr),
_condition(nullptr) {
_graphJson = arangodb::basics::Json(arangodb::basics::Json::Array, edgeColls.size());
for (auto& it : edgeColls) {
_edgeColls.push_back(it);
_graphJson.add(arangodb::basics::Json(it));
}
}
@ -258,6 +264,7 @@ TraversalNode::TraversalNode(ExecutionPlan* plan,
_edgeOutVariable(nullptr),
_pathOutVariable(nullptr),
_inVariable(nullptr),
_graphObj(nullptr),
_condition(nullptr) {
_minDepth =
arangodb::basics::JsonHelper::stringUInt64(base.json(), "minDepth");

View File

@ -788,7 +788,7 @@ function processQuery (query, explain) {
node.edgeCollectionNameStrLen = node.graphDefinition.edgeCollectionNames.join(", ").length;
}
else {
var edgeCols = node.graph;
var edgeCols = node.graph || [ ];
edgeCols.forEach(function(ecn) {
e.push(collection(ecn));
});
@ -809,7 +809,7 @@ function processQuery (query, explain) {
(node.count ? " " + keyword("WITH COUNT") : "") +
(node.outVariable ? " " + keyword("INTO") + " " + variableName(node.outVariable) : "") +
(node.keepVariables ? " " + keyword("KEEP") + " " + node.keepVariables.map(function(variable) { return variableName(variable); }).join(", ") : "") +
" " + annotation("/* " + node.aggregationOptions.method + "*/");
" " + annotation("/* " + node.aggregationOptions.method + " */");
case "CollectNode":
var collect = keyword("COLLECT") + " " +
node.groups.map(function(node) {

View File

@ -787,7 +787,7 @@ function processQuery (query, explain) {
node.edgeCollectionNameStrLen = node.graphDefinition.edgeCollectionNames.join(", ").length;
}
else {
var edgeCols = node.graph;
var edgeCols = node.graph || [ ];
edgeCols.forEach(function(ecn) {
e.push(collection(ecn));
});
@ -808,7 +808,7 @@ function processQuery (query, explain) {
(node.count ? " " + keyword("WITH COUNT") : "") +
(node.outVariable ? " " + keyword("INTO") + " " + variableName(node.outVariable) : "") +
(node.keepVariables ? " " + keyword("KEEP") + " " + node.keepVariables.map(function(variable) { return variableName(variable); }).join(", ") : "") +
" " + annotation("/* " + node.aggregationOptions.method + "*/");
" " + annotation("/* " + node.aggregationOptions.method + " */");
case "CollectNode":
var collect = keyword("COLLECT") + " " +
node.groups.map(function(node) {