Commit Graph

497 Commits

Author SHA1 Message Date
florijan
47c1cd6e3d Degree(Vertex) function added
Summary:
- added only one function for getting the total (in + out) vertex degree, it's required for the Ravelin use-case
- specific `degree_in` and `degree_out` functions can be added as necessary
- also fixed random_graph_generator bug (needed it for testing)

Reviewers: buda, mislav.bradac

Reviewed By: buda, mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D652
2017-08-09 15:06:10 +02:00
Matej Ferencevic
6a2d123f30 Temporary IDs now sent to Bolt client. Documentation updated.
Reviewers: buda, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D643
2017-08-09 14:45:09 +02:00
florijan
caff5e4066 map_operations.feature added to QA
Reviewers: buda, mferencevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D651
2017-08-09 11:53:35 +02:00
florijan
b8957c999d Map type now supported
Summary:
- MapLiteral added
- PropertyLookup on maps added

This is the basic implementation, missing are:
- unit tests
- feature and TCK tests
- documentation
- changelog

That stuff is coming. Please review the implementation (Mislav).

Reviewers: mislav.bradac, buda, teon.banek

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D640
2017-08-08 14:34:26 +02:00
Mislav Bradac
7fe799f232 Fix tests that expect debug_assert to fail
Reviewers: buda, mferencevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D639
2017-08-07 16:38:15 +02:00
Teon Banek
0b8d71ee8f Plan BreadthFirstExpand
Summary:
Test planning BreadthFirstExpand

Add bfs tests to memgraph qa

Allow pointers in `print-operator-tree` for gdb

Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D618
2017-08-07 10:44:10 +02:00
florijan
bce4407ebe CostEstimator - adding new ScanAll and Expand ops
Summary:
Now all ScanAll and Expand ops are covered by the cost estimator. For ScanAll with indices cost estimation is pretty good, for new Expand ops it is tragically bad (Expand to the power of expansion depth, plus arbitrary filtering). Static cost estimation is wrong wrong wrong.

Currently cost estimation of even trivial plans that use indices is wrong because the planner leaves filtering expressions that are implicitly handled by the index in the operator tree, IIRC. Tasking Teon to revise this, even though I'm not sure how bad an influence this has on cost estimation and it's use in plan choosing.

Reviewers: mislav.bradac, teon.banek, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D633
2017-08-04 14:32:22 +02:00
florijan
6c22caa80e Query::Plan::Expand with preceeding optional bug fix
Summary:
This diff contains a bug fix for the expansion operators that are currently on dev.
More importantly, it proposes end-to-end testing for edge-cases for which it's a
pain to write single-phase tests. In my opinion this is OK, you're all reviewers so
you can comment.

The test relies on left-to-right query execution. We need this guarantee in tests
like this. I propose renaming "RuleBasedPlanner" to "LeftToRightPlanner" to make
this explicit. As Teon is not here at the moment, will make this a task/discussion.

Reviewers: buda, mislav.bradac, teon.banek, lion

Reviewed By: mislav.bradac

Subscribers: mferencevic, pullbot

Differential Revision: https://phabricator.memgraph.io/D626
2017-08-04 12:16:26 +02:00
florijan
0f73c2451b Query::Plan::ExpandVariable - graph state bugfix
Reviewers: buda, teon.banek, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D631
2017-08-04 12:12:44 +02:00
Matej Ferencevic
7939b04117 Removed unused template parameter from network stack.
Reviewers: mislav.bradac, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D632
2017-08-04 11:12:08 +02:00
Matej Ferencevic
71ded22b65 Removed Dbms and QueryEngine from the Network stack.
Reviewers: buda, mislav.bradac

Reviewed By: buda, mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D628
2017-08-03 16:33:10 +02:00
florijan
e45ae4c4b6 Query::Plan::ExpandBreadthFirst added
Summary:
Not complete (but review can start):
- implementation should be done
- still need to finish tests
- documentation missing

Reviewers: mislav.bradac, teon.banek, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D616
2017-08-03 16:22:38 +02:00
Mislav Bradac
da0e4a5b12 Implement explicitly started transactions
Summary: Fix tests

Reviewers: buda, mferencevic

Reviewed By: mferencevic

Subscribers: mferencevic, pullbot

Differential Revision: https://phabricator.memgraph.io/D623
2017-08-03 16:17:19 +02:00
florijan
bb5d06e276 Skiplist::position_and_count fix
Summary: Fixed bug for SkipList::position_and_count for an item lesser then all skiplist elements.

Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Differential Revision: https://phabricator.memgraph.io/D629
2017-08-03 14:57:11 +02:00
florijan
31ee8a148f Long running test speedup
Summary: Index added to long running test to speed up edge creation and vertex deletion.

Reviewers: buda, mferencevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D621
2017-08-03 14:48:55 +02:00
Matej Ferencevic
797fa10f7c Added antlr sigsegv test.
Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D622
2017-08-03 13:06:18 +02:00
Mislav Bradac
6bc9deba5f Replace map with bitset in stripped query
Summary:
Implement trie and use it in stripper

Make it nicer

Reviewers: buda, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D614
2017-08-02 22:17:36 +02:00
florijan
57dea09b5b Console and random-graph generation improvements
Summary: Random graph generation is now parallel. Slow, though.

Reviewers: teon.banek, buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D586
2017-08-02 12:23:51 +02:00
Matej Ferencevic
2ba3df942b Added continuous_integration script to stress tests.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D620
2017-08-02 12:06:59 +02:00
Matej Ferencevic
374fda2a9d Removed unnecessary dependencies from QA.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D617
2017-08-02 12:06:42 +02:00
Mislav Bradac
5e3ff2438e Fix some benchmarks
Summary: Fix bug in perf wrapper

Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D611
2017-07-30 20:12:25 +02:00
Teon Banek
4b72118894 Generate symbols for BFS
Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D608
2017-07-30 12:25:30 +02:00
Mislav Bradac
0aa399bd91 Add cpu time to harness
Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D607
2017-07-30 11:42:17 +02:00
Teon Banek
c84d8f6bd7 Add BreadthFirstAtom to Ast
Summary: Add BFS to Cypher grammar

Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D605
2017-07-29 23:53:31 +02:00
Mislav Bradac
ddbb63a601 More apollo harness integration
Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D603
2017-07-29 21:58:10 +02:00
Matej Ferencevic
0f562cd043 First version of apollo harness integration.
Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D602
2017-07-29 21:14:29 +02:00
Mislav Bradac
d9fbcfc1a2 Don't init perf if on apollo
Reviewers: mferencevic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D601
2017-07-29 19:21:50 +02:00
Mislav Bradac
b98c12ea89 Clean up of benchmark requirements file
Reviewers: mferencevic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D600
2017-07-29 18:26:18 +02:00
Teon Banek
160a6866dc Break the query part on Unwind
Summary:
`UNWIND` can come before `MATCH`, so it needs to break query parts. If
it didn't, a query part would incorrectly grab all the matches and plan
them incorrectly. A test for such a case has been added.

Reviewers: florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D598
2017-07-29 18:14:06 +02:00
Mislav Bradac
06d3629fd0 Migrate to new jail faker
Reviewers: mferencevic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D599
2017-07-29 18:06:44 +02:00
Mislav Bradac
68e78c417b NeoRunner + Harness bugfix
Reviewers: mferencevic, buda

Reviewed By: mferencevic

Subscribers: mferencevic, pullbot

Differential Revision: https://phabricator.memgraph.io/D588
2017-07-29 17:46:24 +02:00
florijan
04c2ab3ba9 Plan::ExpandVariable - bounds are now expressions
Reviewers: teon.banek, buda

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D596
2017-07-29 14:33:16 +02:00
Teon Banek
9e157eb495 Generate All to filter variable length paths
Summary:
Use All to filter variable length paths.
Test filtered variable length paths in qa

Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D592
2017-07-26 13:03:54 +02:00
Teon Banek
9ae1a9a585 Plan variable length expand
Summary: Handle reordering expansions with variable path length

Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D579
2017-07-26 12:36:47 +02:00
Teon Banek
b33aae42ab Add ALL function to openCypher
Summary:
Add All expression to Ast
Evaluate All expression
Visit All and generate symbols
Handle All when collecting context during planning

Reviewers: florijan, mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D587
2017-07-25 16:32:45 +02:00
Teon Banek
da7bfe05b7 Collect symbols in variable length path
Summary:
Add EdgeList symbol type and check for redeclaration

The result of variable path is a list of edges, so the symbol type has
been added. In the future, we need to extend the type checker and the
type structure to have a generic list type.

We also currently do not support reusing an already bound symbol for a
variable path, so the SymbolGenerator will raise a redeclaration error.

Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot, lion

Differential Revision: https://phabricator.memgraph.io/D574
2017-07-25 12:39:14 +02:00
Mislav Bradac
10b0f7cdf4 Add multithreaded create benchmark
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D585
2017-07-21 15:17:29 +02:00
Matej Ferencevic
29a7b12e22 Added qa tests to apollo generate.
Summary:
The main init script now calls qa init.

QA CI script now runs the tests.

QA run script now returns a good exit code.

Explicitly bind to 127.0.0.1.

localhost on some machines resolves to an IPv6 address, and Memgraph
listens exclusively on IPv4.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D583
2017-07-21 14:40:55 +02:00
Mislav Bradac
aa5de5629a Minor fix in bolt session
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D582
2017-07-21 13:19:23 +02:00
Teon Banek
20f2c885c8 Test grammar for variable length with filters
Summary: Update Cypher grammar to pickup properties after range

Reviewers: mislav.bradac, florijan

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D578
2017-07-21 11:51:55 +02:00
florijan
f02c658ed4 GraphDbAccessor::Transfer added
Summary: A helper function added for transferring graph elements into some GraphDbAccessor.

Reviewers: mislav.bradac, buda, teon.banek

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D581
2017-07-21 11:42:44 +02:00
Marko Budiselic
80b8d7fb97 Folder rename.
Summary: property_based renamed to property.

Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D576
2017-07-21 09:50:30 +02:00
Mislav Bradac
b9f84ca00e Minor refactor of bolt session
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D577
2017-07-20 18:53:04 +02:00
Mislav Bradac
270ad45552 Use symlinked binary to run memgraph
Reviewers: buda

Reviewed By: buda

Subscribers: mferencevic, pullbot

Differential Revision: https://phabricator.memgraph.io/D572
2017-07-20 14:38:09 +02:00
florijan
7328f5ec7f Query::Plan::VariableExpand added
Summary:
Variable expansion logical operator added. Some functionalities are missing:
- taking into account optional matching when expanding into existing symbol
- accepting Expression bounds (current implementation takes size_t)

Also, a TODO is added for handling optional matching in the uniqueness operator (with an Asana task)

All this will be done in the following diff, this is already substantial.

Also, please consider if we want to have all those `VLOG`s in the code. Not very pretty. And I think that `VLOG` is not compiled-away in release build, will put an asana task.

Reviewers: teon.banek, mislav.bradac, buda

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D569
2017-07-20 14:26:41 +02:00
Teon Banek
b4d2d1ff81 Support variable length path in CypherMainVisitor
Summary:
Allow expressions for variable length path bounds

Replace test which expected a syntax exception

Since we now allow variable length to have an arbitrary expression, the
test case is obsolete. It was replaced with something that excepts an
expression which wasn't allowed before.

Reviewers: florijan, mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: lion, pullbot

Differential Revision: https://phabricator.memgraph.io/D568
2017-07-20 13:14:50 +02:00
Mislav Bradac
e8a465e4b5 Add query parameters support
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D570
2017-07-19 18:44:59 +02:00
florijan
a7d8b7124e GraphDbAccessor - index range API
Summary:
- GraphDbAccessor - index range API added
- index api tests refactored
- skiplist minor cleanup.

Reviewers: teon.banek, buda, mislav.bradac

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D533
2017-07-19 11:55:40 +02:00
Mislav Bradac
da0fce1a84 Separate bolt::State::executor to Idle and Result
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D567
2017-07-18 17:57:07 +02:00
Mislav Bradac
32ed2d7ab8 Remove unnecessary integratino tests
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D566
2017-07-18 15:52:37 +02:00