Separate query types in AST and interpreter

Summary:
`Query` is now an abstract class which has `CypherQuery`,
`ExplainQuery`, `IndexQuery`, `AuthQuery` and `StreamQuery` as derived
classes. Only `CypherQuery` is forwarded to planner and the rest of the
queries are handled directly in the interpreter. This enabled us to
remove auth, explain and stream operators, clean up `Context` class and
remove coupling between `Results` class and plan cache. This should make
it easier to add similar functionality because no logical operator
boilerplate is needed. It should also be easier to separate community
and enterprise features for open source.

Remove Explain logical operator
Separate IndexQuery in AST
Handle index creation in interpreter
Remove CreateIndex operator and ast nodes
Remove plan cache reference from Results
Move auth queries out of operator tree
Remove auth from context
Fix tests, separate stream queries
Remove in_explicit_transaction and streams from context

Reviewers: teon.banek, mferencevic, msantl

Reviewed By: teon.banek, mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1664
This commit is contained in:
Marin Tomic
2018-10-19 16:18:44 +02:00
parent 187da7f910
commit eee8b57daf
37 changed files with 1546 additions and 2948 deletions

View File

@@ -64,7 +64,7 @@ void AssertRows(const std::vector<std::vector<TypedValue>> &datum,
};
void CheckPlansProduce(
size_t expected_plan_count, query::Query *query, AstStorage &storage,
size_t expected_plan_count, query::CypherQuery *query, AstStorage &storage,
database::GraphDbAccessor &dba,
std::function<void(const std::vector<std::vector<TypedValue>> &)> check) {
auto symbol_table = MakeSymbolTable(*query);