From 12799f12ef1128c6cec14594f3fd01b453ac82bb Mon Sep 17 00:00:00 2001 From: Teon Banek Date: Wed, 13 Mar 2019 13:59:36 +0100 Subject: [PATCH] Fill the EvaluationContext correctly for ProfileQuery Reviewers: mtomic, llugovic, msantl Reviewed By: llugovic Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1919 --- src/query/interpreter.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/query/interpreter.cpp b/src/query/interpreter.cpp index 917f0d4c9..72c39dced 100644 --- a/src/query/interpreter.cpp +++ b/src/query/interpreter.cpp @@ -842,6 +842,14 @@ Interpreter::Results Interpreter::operator()( auto cursor = cypher_query_plan->plan().MakeCursor(*context->db_accessor); + // We are pulling from another plan, so set up the EvaluationContext + // correctly. The rest of the context should be good for sharing. + context->evaluation_context.properties = + NamesToProperties(cypher_query_plan->ast_storage().properties_, + context->db_accessor); + context->evaluation_context.labels = NamesToLabels( + cypher_query_plan->ast_storage().labels_, context->db_accessor); + // Pull everything to profile the execution utils::Timer timer; while (cursor->Pull(*frame, *context)) continue;