Commit Graph

457 Commits

Author SHA1 Message Date
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
Mislav Bradac
fee59a7ec2 Add first parallel benchmark
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D557
2017-07-17 19:29:29 +02:00
Teon Banek
104fe22f53 Plan ScanAll by using a range index
Summary:
Add optional bounds to PropertyFilter and collect them

Relation operators (e.g. `<`, `>` ...) should be used to produce
scanning the index by a range of values. For that reason, PropertyFilter
is extended to store either the equality expression or range bounds.
The `AnalyzeFilter` function is extended to look for those operators and
see if their top level expression contains a property lookup. If it
does, a filter with a bound is generated.

Test for property comparison preventing index use

Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D529
2017-07-17 16:34:07 +02:00
Mislav Bradac
10ded31eac Store json results in harness
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D556
2017-07-17 15:26:27 +02:00
Mislav Bradac
50cd53e5c9 Migrate timer to use walltime, instead of cputime
Summary:
 - Move some stuff to poc
 - Use steady_clock instead of system_clock

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D555
2017-07-17 13:42:44 +02:00
Mislav Bradac
4a500b99fa Add a way to stop query execution
Reviewers: buda, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D552
2017-07-14 14:36:44 +02:00
Marko Budiselic
d14a4b69ab Max Query Size
Summary: Query Size Limit in Python, Java, JavaScript

Reviewers: mferencevic, mislav.bradac, teon.banek

Reviewed By: mferencevic, teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D508
2017-07-13 14:09:27 +02:00
Marko Budiselic
5d9373a22a Stress test small fix.
Summary: Update of tests/stress/create_match.py to use the right functions from tests/stress/common.py.

Reviewers: florijan

Reviewed By: florijan

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D547
2017-07-12 18:22:12 +02:00
Mislav Bradac
26144ee8fd Fix bugs in MatchReal (StrippedQuery)
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D546
2017-07-12 16:50:53 +02:00
matej.gradicek
45922a987e Implemented label-property index recovery.
Reviewers: buda, florijan, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D530
2017-07-12 12:49:57 +02:00
Mislav Bradac
6068a95a0e Move dbms to database
Summary:
There was only two files in dbms directory so I moved them to database
directory.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D540
2017-07-12 12:44:11 +02:00
Mislav Bradac
ec32ae8bad Fix delete and aggregation benchmarks
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D539
2017-07-11 19:58:03 +02:00
Mislav Bradac
955962d036 Fix bugs in benchmarks
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D536
2017-07-11 14:46:06 +02:00
Mislav Bradac
d14accad07 Migrate harness to memgraph
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D532
2017-07-10 19:07:32 +02:00
Mislav Bradac
99fffc23f7 Change FILE COPY to configure_file COPYONLY
Summary:
FILE COPY copies files only in configuration stage, configure_file
copies files in make stage if file has changed.

Reviewers: buda, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D531
2017-07-10 16:26:30 +02:00
Mislav Bradac
0588de76bb Move unused datastructures to poc
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D526
2017-07-10 12:03:11 +02:00
Teon Banek
88153595ce Make GraphDbAccessor mandatory for planning
Reviewers: florijan, mislav.bradac, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D527
2017-07-10 10:13:12 +02:00
Teon Banek
d9a724f0cd Plan scanning by label & property index for node atoms
Summary:
Add Filters class for storing additional info

Add FindOr to utils/algorithm.hpp

Use all collected labels when scanning by them

Collect label filters inside WHERE

Document the Filters class

Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan

Subscribers: pullbot, lion

Differential Revision: https://phabricator.memgraph.io/D515
2017-07-07 11:30:54 +02:00
Teon Banek
9fbaf69441 Plan CreateIndex operator
Reviewers: florijan, mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D525
2017-07-06 14:05:15 +02:00
Mislav Bradac
cbe6648eb8 Migrate command line args to gflgs in tests
Summary: Some other minor cleanups

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D523
2017-07-06 13:54:12 +02:00
Mislav Bradac
d608d523c5 Add CreateIndex conversion to ast
Reviewers: florijan, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D522
2017-07-06 13:32:37 +02:00
florijan
c22ac38ea2 GraphDbAccessor - label+property index cardinalities for exact value and value ranges
Summary:
- added functionality to `GraphDbAccessor` for cardinality estimates
- changed all `GraphDbAccessor::Count...` functions to return `int64_t`
- added the need functionality into `LabelPropertyIndex`
- modified `SkipList::position_and_count` to accept a custom `equals` function. Equality could not be implemented using only the custom `less` because it compares a templated `TItem` with skiplist element type `T`, and is therefore not symetrical.

Reviewers: teon.banek, buda, mislav.bradac

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D521
2017-07-06 10:22:19 +02:00
florijan
feb854d0c7 Skiplist::PositionAndCount refactor and test
Summary:
 - refactored so `less` is used instead of `greater`
 - added a fuzzy unit test

Reviewers: mislav.bradac, buda, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D519
2017-07-05 12:02:12 +02:00
Marko Budiselic
e7111b286a Property based tests registration.
Summary: Register property based tests to ctest.

Reviewers: matej.gradicek

Reviewed By: matej.gradicek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D517
2017-07-04 11:06:10 +02:00
Teon Banek
1841ff9616 Add operators for getting nodes by label-property index
Summary:
Add ScanAllByLabelPropertyRange operator
This operator uses the label + property indexing feature to iterate over
the vertices. The property value of each vertex is checked whether it is
inside the given range of values. The range is inclusive from both
sides. If the value isn't in range, the vertex is filtered out.

This manual filtering should be replaced by a database API when it
becomes available.

Add ScanAllByLabelPropertyValue operator

Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan, mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D503
2017-07-03 11:03:46 +02:00
Teon Banek
f5db9d65b0 Add CreateIndex operator
Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D516
2017-07-03 11:03:15 +02:00
matej.gradicek
818ac3b731 Added rapidcheck
Reviewers: buda, teon.banek

Reviewed By: buda, teon.banek

Subscribers: lion, pullbot

Differential Revision: https://phabricator.memgraph.io/D509
2017-06-30 16:26:21 +02:00
Marko Budiselic
5b1fde2a98 Credit Card Fraud Detection Gist
Summary: Add Credit Card Fraud Detection as a TCK feature.

Reviewers: matej.gradicek, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D514
2017-06-29 16:27:49 +02:00
Marko Budiselic
530ab30a33 tests/qa/init cleanup.
Summary: tests/qa/init cleanup.

Reviewers: teon.banek, mferencevic

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D512
2017-06-27 22:20:38 +02:00
Mislav Bradac
3119ae5343 Supstitute named expressions in ast cache
Reviewers: buda, teon.banek

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D510
2017-06-26 16:33:17 +02:00
Matej Ferencevic
44e948c769 Started TCK cleanup.
Summary:
Changed run script to use built memgraph binary.

Added missing binary check to run script.

Reviewers: buda, teon.banek

Reviewed By: buda, teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D504
2017-06-21 16:49:04 +02:00
Mislav Bradac
3a922de963 Implementation of new lexer
Summary: WORK IN PROGRESS

Reviewers: buda, teon.banek, dgleich

Reviewed By: dgleich

Subscribers: dgleich, pullbot

Differential Revision: https://phabricator.memgraph.io/D496
2017-06-21 16:16:17 +02:00
Mislav Bradac
e86d73eb98 Change keyword symbolic names
Reviewers: mferencevic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D505
2017-06-21 15:54:06 +02:00
Dominik Gleich
e2f3aba332 Use GLogger instead of broken memgraph Logger.
Summary:
http://rpg.ifi.uzh.ch/docs/glog.html

Second phase before tests complete.

Delete logging test.

Finish relase loging.

Reviewers: mislav.bradac, teon.banek, buda

Reviewed By: teon.banek

Subscribers: buda, pullbot

Differential Revision: https://phabricator.memgraph.io/D500
2017-06-21 15:33:24 +02:00
florijan
19c0dfe084 SkipList - added position_and_count function
Summary: This is the first implementation that seems to work. I am not happy with it's complexity. Might attempt a simpler implementation, at the cost of some performance.

Reviewers: dgleich, buda

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D502
2017-06-21 14:12:29 +02:00
florijan
a726ac0023 Tests - long-running test added
Summary:
Tests - long-running test added

 - common functionality refactor
 - long running tests WIP

tests/stress/common: minor refactor, long_running WIP

tests/stress/long_running - stable single-threaded, unstable concurrent

tests/stress/long_running - added error summary output

test/stress/long_running - add/remove vertex/edge stable multithreaded

test/stress/long_running - added vertex label testing

tests/stress/long_running - time limit added

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D489
2017-06-21 12:10:36 +02:00
florijan
01d9688273 tests/qa/tests/ - empty folder that's defined as submodule removed 2017-06-21 11:24:26 +02:00
florijan
ad148692c3 Concurrent::PushQueue added
Summary:
PushQueue with concurrent lock-free pushing, and single-threaded deletion. Iteration without modification can also be concurrent. Deletion should NOT be concurrent with iteration and other deletions, but can be concurrent with pushing.

There is no const iteraton at the moment, we can add it when necessary. Also I've not handled std::iterator_traits, might be fun getting into that :D

Reviewers: buda, dgleich, mislav.bradac

Reviewed By: dgleich

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D420
2017-06-21 09:03:33 +02:00
Marko Budiselic
366c2d4520 Merge branch 'qa_merge' into dev 2017-06-20 15:05:56 +02:00
Marko Budiselic
a7cbea3999 .gitignore wasn't updated. 2017-06-20 15:01:11 +02:00
Mislav Bradac
b6ecc5631f Disallow keywords as symbolic names
Reviewers: teon.banek, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D497
2017-06-20 11:58:14 +02:00