Commit Graph

1036 Commits

Author SHA1 Message Date
florijan
0866fdcb0c Query:: COUNT(*) added to logical planning and execution
Reviewers: mislav.bradac, buda, teon.banek

Reviewed By: mislav.bradac, teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D353
2017-05-08 11:19:57 +02:00
Matej Gradiček
d29c38f6fd Removed hardcoded queries and modified run and init script
Reviewers: buda, mislav.bradac

Reviewed By: buda, mislav.bradac

Differential Revision: https://phabricator.memgraph.io/D332
2017-05-08 08:17:43 +00:00
Mislav Bradac
871b81656b Implement InListOperator
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D354
2017-05-07 17:52:08 +02:00
Mislav Bradac
5ae55499bc Convert escaped labels to AST
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D352
2017-05-06 15:34:02 +02:00
Mislav Bradac
b76685cba7 Fix bug
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D351
2017-05-05 20:10:32 +02:00
Mislav Bradac
3d026b106d Handle asterisk in AST conversion
Summary: TODO: Handle COUNT_ASTERISK aggregation in operator (will do in next diff)

Reviewers: teon.banek, florijan, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D350
2017-05-05 20:01:56 +02:00
Dominik Gleich
3428a9bfbd Fix assert fail.
Summary: Assert fail introduced by me, by incorrectly fixing skiplist find_or_larger.

Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D349
2017-05-05 18:46:10 +02:00
Florijan Stamenkovic
1333bfeb39 Mvcc - unit test infrastructure setup
Summary:
Gradicek's Mvcc test have seen the following changes:
- provided a test infrastructure (fixture and macros) to facilitate testing and increase readability
- split tests into multi-transaction update, VersionList::find and general Mvcc testing
- multi-transaction update tests have been refactored (i *think* nothing got deleted, but it was a mess so I don't guarantee)
- changed all multithreaded tests to be single-threaded because multiple threads were not necessary
- changed transaction naming from T5, T8, T10 to T1, T2... for consistency with actual transaction indices

What still needs to be done:
- Gleich and Gradicek need to review the infrastructure (possible improvements)
- multi-transaction update tests need to be addressed by Gradicek (see "TODO gradicek" in code, discuss with Flor)
- the wiki/draw.io documentation needs to be updated. it is not imperative that all the tests be drawn in draw.io, only the general infrastructure explained. perhaps only a few examples drawn. Gradicek discuss with Flor
- Gleich see the "TODO Gleich" lines in the diff and discuss with flor

Suggested workflow:
- review this diff, hopefully land (before resolving all the TODOs)
- discard D169
- Gradicek and Gleich address the TODOs
- Flor reviews the results (in following diffs)

Reviewers: dgleich, matej.gradicek, buda

Reviewed By: matej.gradicek, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D348
2017-05-05 14:46:18 +02:00
Mislav Bradac
cfb987a90c Evaluate epressions EdgeTypeTest and LabelsTest
Reviewers: florijan, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D345
2017-05-05 13:25:23 +02:00
Mislav Bradac
72d4a67c4a Convert labels test from antlr to AST
Reviewers: florijan, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D346
2017-05-05 12:13:55 +02:00
Dominik Gleich
3b4e66e0e3 Fix hang.
Summary: Thread pool had the same bug as scheduler before, missing condition variable notifications because of not holding lock while emitting notification.

Reviewers: teon.banek, buda

Reviewed By: teon.banek

Differential Revision: https://phabricator.memgraph.io/D347
2017-05-05 10:28:50 +02:00
Mislav Bradac
2e9c0e4cb9 Implement evaluation of list indexing and slicing
Reviewers: florijan, teon.banek

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D342
2017-05-04 15:34:33 +02:00
Mislav Bradac
d2f9affb4c Add labels and edge type test nodes to ast
Reviewers: teon.banek

Reviewed By: teon.banek

Differential Revision: https://phabricator.memgraph.io/D343
2017-05-04 14:55:22 +02:00
florijan
0968224a3d Query::Delete - can now delete Null (naturally occuring in optional match)
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D339
2017-05-04 10:35:20 +02:00
Mislav Bradac
cb7310fb6a Add list indexing and slicing conversion to AST
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D341
2017-05-03 19:40:34 +02:00
Teon Banek
d06f80e3f3 Plan Distinct
Summary:
Support WITH/RETURN DISTINCT in test macros.
Test planning Distinct.
Implement OutputSymbols in Distinct operator.

Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D340
2017-05-03 16:35:48 +02:00
Mislav Bradac
fb18866aed Add memgraph specific tests
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D337
2017-05-03 16:11:02 +02:00
Dominik Gleich
b6c26a1a86 Fix Jenkins hang.
Summary:
Jenkins would hang at a random time while running all the tests.
The reason for that is a bug in skiplist implementation.

Skiplist method find_or_larger was never ending and would continuously stay in the while loop because the next node (with the queried value) onto which it would try to jump would be marked as deleted and that would stop it from jumping on it, or ending on that node.

Reviewers: buda, teon.banek, mislav.bradac

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D334
2017-05-03 15:58:46 +02:00
florijan
0a33a555a6 GraphDdAccessor and KeyIndex API upgrades. Test refactoring
Summary:
The GraphDbAccessor and KeyIndex APIs can now also return records for the current transaction+command graph state. This is necessary to correctly implement MERGE. The new logic is has increased the MVCC+Accessor related chaos and should be revised when refactoring MVCC (as planned).

Previous index testing was separated into VertexIndex and EdgeIndex testing. This is inappropriate since most of the logic is exaclty the same. Also it was not clearly defined what gets tested via the GraphDbAccessor API, and what directly through the KeyIndex API. This has also been refactored, but it needs additional work (Gleich).

Reviewers: buda, dgleich

Reviewed By: buda, dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D306
2017-05-03 15:42:04 +02:00
florijan
355f62ce71 Query::Plan - Distinct added
Reviewers: buda, mislav.bradac, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D336
2017-05-03 15:27:24 +02:00
Matej Ferencevic
b6ff1e1bbc Removed large bolt encoder test to reduce runtime.
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D338
2017-05-03 14:50:02 +02:00
Matej Ferencevic
18782e67fd Fixed bolt encoder test.
Summary: Fixed encoder off-by-one limit.

Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D335
2017-05-03 14:33:33 +02:00
Teon Banek
cbd3998899 Plan Unwind operator
Summary:
Support ListLiteral in test macros.
Test planning Unwind.
Support UNWIND in test macros.
Test SymbolGenerator for UNWIND clause.
Use namespace in QueryPlan Unwind test.

Reviewers: mislav.bradac, buda, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D331
2017-05-03 13:54:33 +02:00
Teon Banek
eef6fb1981 Convert antlr Unwind to AST
Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D330
2017-05-03 12:32:18 +02:00
Dominik Gleich
487f429d5b Add concurrent benchmarks for skiplist.
Summary: Skiplist benchmark and refactor testing infrastructure.

Reviewers: mferencevic, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D103
2017-05-03 11:03:23 +02:00
florijan
ffc977dbfc Query::Plan::Unwind added
Reviewers: teon.banek, mislav.bradac, buda

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D328
2017-05-03 08:38:25 +02:00
florijan
dc5ef33c8f Query::ExpresionEval - Null.prop is now Null
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D329
2017-05-03 08:36:56 +02:00
Mislav Bradac
53061a0412 Split features in separate files
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D333
2017-05-02 18:47:42 +02:00
florijan
2e5eccf197 Query::AST::Literal refactor. Repl and TypedValue mods.
Summary:
- Query::AST::Literal refactor (LiteralBase introduced, ListLiteral added)
- Repl now prints out list TypedValues properly
- TypedValue to string conversion refactors

Reviewers: teon.banek, mislav.bradac, buda

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D327
2017-04-28 14:58:16 +02:00
Teon Banek
9653c703dc Plan optional matching
Summary:
Support OPTIONAL MATCH in test macros.
Test planning Optional.

Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D322
2017-04-28 14:03:08 +02:00
Teon Banek
3b9d13f1e1 Fix errors introduced in D298
Reviewers: florijan, mislav.bradac, mferencevic, buda

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D326
2017-04-28 11:11:32 +02:00
Marko Budiselic
e6191eadb4 The rest of core engine exceptions are extended from the BasicException (because of the error handling in the communication stack). Maximum value of the MVCC command id is calculated in the compile time.
Summary:
The rest of core engine exceptions are extended from the BasicException (because of the error handling in the communication stack). Maximum value of the MVCC command id is calculated in the compile time.

I've put the tasks to implement concurrent tests in the qa repo in the backlog. Hopefully they will be implemented within this sprint.

Reviewers: mislav.bradac, mferencevic, florijan

Reviewed By: mislav.bradac

Subscribers: dgleich, pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D298
2017-04-27 13:17:40 -04:00
Mislav Bradac
a99f096814 Remove traling whitespace
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D325
2017-04-27 19:17:04 +02:00
Mislav Bradac
78af8c8339 Add variable with all memgraph dependent libraries
Reviewers: teon.banek, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D324
2017-04-27 18:40:34 +02:00
Teon Banek
35a35f0d5f Split semantic tests into test cases
Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D323
2017-04-27 14:18:38 +02:00
Mislav Bradac
1c51ce77ef Even more awesome functions
Reviewers: florijan, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D319
2017-04-27 14:11:12 +02:00
florijan
2710485742 Query::Plan::Optional added, MergeCursor slight mod
Reviewers: teon.banek, buda, mislav.bradac

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D321
2017-04-27 12:06:02 +02:00
Teon Banek
8b8aee9b38 Add optional flag to Match clause
Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D320
2017-04-27 11:16:30 +02:00
Teon Banek
f0aaca4a1a Plan Skip and Limit after OrderBy
Summary:
Revive the OutputSymbols method.
Use OutputSymbols to stream results in Interpret.

Reviewers: mislav.bradac, buda, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D318
2017-04-26 16:27:41 +02:00
Mislav Bradac
16d8a5b447 Refactor scripts
Reviewers: buda, teon.banek, florijan

Reviewed By: teon.banek

Differential Revision: https://phabricator.memgraph.io/D313
2017-04-26 14:51:56 +02:00
Teon Banek
8fa574026e Plan Merge operator
Summary:
Check symbols in Merge.
Support MERGE macro in query tests.
Test SymbolGenerator with MERGE.
Test planning Merge.

Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D317
2017-04-26 14:47:10 +02:00
Mislav Bradac
0fa4555cad Implement opencypher functions
Summary: Implement opencypher functions

Reviewers: florijan, buda, teon.banek

Reviewed By: buda, teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D299
2017-04-26 13:27:42 +02:00
florijan
ecca97ef72 Query::Plan::Merge added
Reviewers: teon.banek, mislav.bradac, buda

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D316
2017-04-25 16:24:24 +02:00
Teon Banek
788d4a37d0 Convert antlr merge to AST
Summary: Convert antlr merge to AST and add Merge node to AST

Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D315
2017-04-25 16:04:05 +02:00
florijan
cc00101cbd Query::StateSwitch added
Summary:
- an enum in query/common.hpp for flagging what kind of switching should be done
- changes in expression evaluator
- changes in logical operators
- modification in RecordAccessor::SwitchOld to support operator functionality
- tests

Reviewers: teon.banek, mislav.bradac, buda

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D314
2017-04-25 15:54:30 +02:00
florijan
774029cfcf Query::Plan - switch from 'cycle' to 'existing' naming where appropriate
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D312
2017-04-24 15:20:11 +02:00
Teon Banek
e53e232e49 Plan OrderBy
Summary:
Support OrderBy in test macros.
Test planning OrderBy.
Handle symbol visibility for ORDER BY and WHERE.
Add Hash struct to Symbol.
Collect used symbols in ORDER BY and WHERE.

Reviewers: mislav.bradac, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D307
2017-04-24 15:18:01 +02:00
Mislav Bradac
fe36835519 Add db_accessor to ExpressionEvaluator
Summary: Add db_accessor to ExpressionEvaluator

Reviewers: florijan, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D310
2017-04-24 14:38:38 +02:00
florijan
d29a1f5353 Query::Plan::Operator - ACCEPT macro, Cursor::Reset, const correctness
Summary:
Query::Plan::Operator - ACCEPT_WITH_INPUT macro for default accept implementation
Query::Plan::Cursor Reset() function added (NOT tested), will be needed for MERGE
Query::Plan - logical const correctness and cleanup

Reviewers: teon.banek, buda

Reviewed By: teon.banek

Differential Revision: https://phabricator.memgraph.io/D311
2017-04-24 13:00:27 +02:00
Mislav Bradac
f86c96e62c Forbid nonaliased expressions in WITH
Reviewers: teon.banek, florijan

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D309
2017-04-24 12:58:41 +02:00