From 27a90a5c25ae5eabd1dcc0f835b4804f32879a02 Mon Sep 17 00:00:00 2001 From: Teon Banek Date: Thu, 1 Feb 2018 11:00:06 +0100 Subject: [PATCH] Support distributed CreateIndex plan Reviewers: florijan, msantl Reviewed By: msantl Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1162 --- src/query/plan/distributed.cpp | 4 +--- tests/unit/query_planner.cpp | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/query/plan/distributed.cpp b/src/query/plan/distributed.cpp index fb6d80a32..43c422908 100644 --- a/src/query/plan/distributed.cpp +++ b/src/query/plan/distributed.cpp @@ -325,9 +325,7 @@ class DistributedPlanner : public HierarchicalLogicalOperatorVisitor { bool Visit(Once &) override { return true; } - bool Visit(CreateIndex &) override { - throw utils::NotYetImplemented("distributed planning"); - } + bool Visit(CreateIndex &) override { return true; } // TODO: Write operators, accumulate and unwind diff --git a/tests/unit/query_planner.cpp b/tests/unit/query_planner.cpp index d31384d4a..7b35581fa 100644 --- a/tests/unit/query_planner.cpp +++ b/tests/unit/query_planner.cpp @@ -1446,6 +1446,9 @@ TYPED_TEST(TestPlanner, CreateIndex) { AstTreeStorage storage; QUERY(SINGLE_QUERY(CREATE_INDEX_ON(label, property))); CheckPlan(storage, ExpectCreateIndex(label, property)); + ExpectedDistributedPlan expected{ + MakeCheckers(ExpectCreateIndex(label, property)), {}}; + CheckDistributedPlan(storage, expected); } TYPED_TEST(TestPlanner, AtomIndexedLabelProperty) {