From 4be4a86d0a932a2242c15967844d9ce3eb1c1676 Mon Sep 17 00:00:00 2001 From: gvolfing <107616712+gvolfing@users.noreply.github.com> Date: Wed, 1 Feb 2023 11:39:48 +0100 Subject: [PATCH 1/3] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com> --- src/query/v2/plan/operator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/query/v2/plan/operator.cpp b/src/query/v2/plan/operator.cpp index 20425de6a..4a512fcd6 100644 --- a/src/query/v2/plan/operator.cpp +++ b/src/query/v2/plan/operator.cpp @@ -664,11 +664,10 @@ class DistributedScanByPrimaryKeyCursor : public Cursor { }); for (auto &result : get_prop_result) { - auto properties = result.props; // TODO (gvolfing) figure out labels when relevant. msgs::Vertex vertex = {.id = result.vertex, .labels = {}}; - id_to_accessor_mapping_.emplace(result.vertex, VertexAccessor(vertex, properties, &request_router)); + id_to_accessor_mapping_.emplace(result.vertex, VertexAccessor(std::move(vertex), std::move(result.properties), &request_router)); } } From bf93b53e7dcec4bbad54fe17968ce2d16b499a66 Mon Sep 17 00:00:00 2001 From: gvolfing <gabor.volfinger@memgraph.io> Date: Wed, 1 Feb 2023 12:36:27 +0100 Subject: [PATCH 2/3] Fix compile error due to wrong aggregate field name --- src/query/v2/plan/operator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/query/v2/plan/operator.cpp b/src/query/v2/plan/operator.cpp index 4a512fcd6..86b804db2 100644 --- a/src/query/v2/plan/operator.cpp +++ b/src/query/v2/plan/operator.cpp @@ -667,7 +667,8 @@ class DistributedScanByPrimaryKeyCursor : public Cursor { // TODO (gvolfing) figure out labels when relevant. msgs::Vertex vertex = {.id = result.vertex, .labels = {}}; - id_to_accessor_mapping_.emplace(result.vertex, VertexAccessor(std::move(vertex), std::move(result.properties), &request_router)); + id_to_accessor_mapping_.emplace(result.vertex, + VertexAccessor(std::move(vertex), std::move(result.props), &request_router)); } } From 8e315875f2f5aa08c60cc27dee29df5195399220 Mon Sep 17 00:00:00 2001 From: gvolfing <107616712+gvolfing@users.noreply.github.com> Date: Thu, 2 Feb 2023 07:44:47 +0100 Subject: [PATCH 3/3] Update src/query/v2/plan/operator.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com> --- src/query/v2/plan/operator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/query/v2/plan/operator.cpp b/src/query/v2/plan/operator.cpp index 86b804db2..1139c0fbd 100644 --- a/src/query/v2/plan/operator.cpp +++ b/src/query/v2/plan/operator.cpp @@ -761,7 +761,8 @@ class DistributedScanByPrimaryKeyCursor : public Cursor { output_frame[output_symbol_] = TypedValue(it->second); populated_any = true; ++output_frame_it; - } + } + own_frames_it_->MakeInvalid(); } break; }