From fc10f5676e92f9e7475dc99d57bd8dc3b1251ffd Mon Sep 17 00:00:00 2001 From: niko4299 Date: Tue, 2 Aug 2022 15:38:06 +0200 Subject: [PATCH] Fix --- src/query/plan/operator.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/query/plan/operator.cpp b/src/query/plan/operator.cpp index 9ec15067f..32c67eee7 100644 --- a/src/query/plan/operator.cpp +++ b/src/query/plan/operator.cpp @@ -822,8 +822,7 @@ namespace { * @return See above. */ auto ExpandFromVertex(const VertexAccessor &vertex, EdgeAtom::Direction direction, - const std::vector &edge_types, utils::MemoryResource *memory, - const ExecutionContext &context) { + const std::vector &edge_types, utils::MemoryResource *memory) { // wraps an EdgeAccessor into a pair auto wrapper = [](EdgeAtom::Direction direction, auto &&edges) { return iter::imap([direction](const auto &edge) { return std::make_pair(edge, direction); }, @@ -841,6 +840,7 @@ auto ExpandFromVertex(const VertexAccessor &vertex, EdgeAtom::Direction directio } if (direction != EdgeAtom::Direction::IN) { + auto edges = UnwrapEdgesResult(vertex.OutEdges(view, edge_types)); if (edges.begin() != edges.end()) { chain_elements.emplace_back(wrapper(EdgeAtom::Direction::OUT, std::move(edges))); } @@ -905,9 +905,8 @@ class ExpandVariableCursor : public Cursor { // a stack of edge iterables corresponding to the level/depth of // the expansion currently being Pulled - using ExpandEdges = - decltype(ExpandFromVertex(std::declval(), EdgeAtom::Direction::IN, self_.common_.edge_types, - utils::NewDeleteResource(), std::declval())); + using ExpandEdges = decltype(ExpandFromVertex(std::declval(), EdgeAtom::Direction::IN, + self_.common_.edge_types, utils::NewDeleteResource())); utils::pmr::vector edges_; // an iterator indicating the position in the corresponding edges_ element @@ -948,8 +947,7 @@ class ExpandVariableCursor : public Cursor { if (upper_bound_ > 0) { auto *memory = edges_.get_allocator().GetMemoryResource(); - edges_.emplace_back( - ExpandFromVertex(vertex, self_.common_.direction, self_.common_.edge_types, memory, context)); + edges_.emplace_back(ExpandFromVertex(vertex, self_.common_.direction, self_.common_.edge_types, memory)); edges_it_.emplace_back(edges_.back().begin()); } @@ -1047,7 +1045,7 @@ class ExpandVariableCursor : public Cursor { if (upper_bound_ > static_cast(edges_.size())) { auto *memory = edges_.get_allocator().GetMemoryResource(); edges_.emplace_back( - ExpandFromVertex(current_vertex, self_.common_.direction, self_.common_.edge_types, memory, context)); + ExpandFromVertex(current_vertex, self_.common_.direction, self_.common_.edge_types, memory)); edges_it_.emplace_back(edges_.back().begin()); }