Fill the EvaluationContext correctly for ProfileQuery

Reviewers: mtomic, llugovic, msantl

Reviewed By: llugovic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1919
This commit is contained in:
Teon Banek 2019-03-13 13:59:36 +01:00
parent d387bac544
commit 12799f12ef

View File

@ -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;