From c503910d540342def8aab98d33dc366c0d8e84ea Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Wed, 16 Mar 2016 11:10:43 +0100 Subject: [PATCH] AQL Traversal now uses VPackResult instead of JSON --- arangod/Aql/TraversalBlock.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arangod/Aql/TraversalBlock.cpp b/arangod/Aql/TraversalBlock.cpp index 5c30936438..d3e094d031 100644 --- a/arangod/Aql/TraversalBlock.cpp +++ b/arangod/Aql/TraversalBlock.cpp @@ -263,6 +263,7 @@ bool TraversalBlock::morePaths(size_t hint) { } auto en = static_cast(getPlanNode()); + VPackBuilder tmp; for (size_t j = 0; j < hint; ++j) { std::unique_ptr p(_traverser->next()); @@ -271,21 +272,20 @@ bool TraversalBlock::morePaths(size_t hint) { break; } - AqlValue pathValue; - - if (usesPathOutput() || (en->condition() != nullptr)) { - // pathValue = AqlValue(p->pathToJson(_trx, _resolver)); -#warning FIX PATH CREATION - } - if (usesVertexOutput()) { - _vertices.emplace_back(p->lastVertexToJson(_trx, _resolver)); + tmp.clear(); + p->lastVertexToVelocyPack(_trx, tmp); + _vertices.emplace_back(tmp.slice()); } if (usesEdgeOutput()) { - _edges.emplace_back(p->lastEdgeToJson(_trx, _resolver)); + tmp.clear(); + p->lastEdgeToVelocyPack(_trx, tmp); + _edges.emplace_back(tmp.slice()); } if (usesPathOutput()) { - _paths.emplace_back(pathValue); + tmp.clear(); + p->pathToVelocyPack(_trx, tmp); + _paths.emplace_back(tmp.slice()); } _engine->_stats.scannedIndex += p->getReadDocuments();