Commit Graph

211 Commits

Author SHA1 Message Date
Marko Budiselic
3b42cd2579 Everything is merged (communication + query engine) but we have to fix the PULL_ALL issue. 2017-03-22 17:57:06 +01:00
Matej Ferencevic
5a5ffface3 Modified hardcoded queries to use new encoder.
Summary:
Removed old encoder.

Changed namespace from bolt to communication::bolt.

Removed old include from new encoder.

Added an empty message success to encoder.

Changed order in communication::Server.

Changed bolt session to use new encoder.

Merge remote-tracking branch 'origin/dev' into mg_hardcoded_queries

Fixed PrintRecordStream.

Reviewers: buda, dgleich

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D158
2017-03-22 17:09:22 +01:00
florijan
b236694fd2 Query - entry.hpp renamed to interpreter.hpp, Engine renamed to Interpreter
Summary: Query - interpreter console hack

Reviewers: buda, teon.banek, mislav.bradac

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D157
2017-03-22 16:39:00 +01:00
Matej Ferencevic
3bf0bd40a7 Initial version of new bolt encoder.
Reviewers: dgleich, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D104
2017-03-22 16:13:47 +01:00
Teon Banek
8da6ce67c0 Add planning CreateExpand operator
Summary: Add planning CreateExpand operator. This is quite similar to planning Expand, but I wouldn't abstract the duplicated parts yet. Also, raise semantic error if creating bidirectional edges

Reviewers: buda, mislav.bradac, florijan

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D155
2017-03-22 15:41:50 +01:00
florijan
981f93d575 Query - ExpandCreate, prop tests, MATCH_CREATE
Summary: Query - ExpandCreate op added (with tests). LogicalOp tests have property enabled. MATCH-CREATE test started but disabled due to MVCC.

Reviewers: buda, mislav.bradac, teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D150
2017-03-22 13:41:21 +01:00
Mislav Bradac
33eaf80344 Change thrown exception classes in cypher visitor
Reviewers: buda

Reviewed By: buda

Differential Revision: https://phabricator.memgraph.io/D151
2017-03-22 11:19:28 +01:00
Teon Banek
bff671af43 Add planning Expand logical operator
Summary:
Make LogicalOperator visitable.
Add unit tests for logical planner.
Add planning Expand logical operators.
Test planning edge expansion.
Add documentation to planner implementation.

Reviewers: florijan, buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D147
2017-03-22 10:58:42 +01:00
Teon Banek
b33a654137 Add basic type checking to SymbolGenerator
Summary:
Test for simple type mismatch of node/edge types.
Add basic type checking of variables.
Check for edge type when creating an edge.
Add documentation to private structs and methods.

Reviewers: mislav.bradac, buda, florijan

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D148
2017-03-22 10:49:52 +01:00
Dominik Gleich
6be2399ad1 Fix warnings all over the codebase.
Reviewers: florijan, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D146
2017-03-22 09:32:06 +01:00
Mislav Bradac
8e7ccf6e83 Extract literals to ast
Summary:
Extract literals to ast Literal node
Fix bugs in TypedValue
Add tests for properties to cypher_main_visitor test

Reviewers: buda, florijan, dgleich, teon.banek

Reviewed By: dgleich, teon.banek

Subscribers: dgleich, pullbot

Differential Revision: https://phabricator.memgraph.io/D149
2017-03-21 15:23:54 +01:00
florijan
a2a4c28168 Query - Add expansion LogicalOp and tests
Summary: Query - AstTreeStorage - TODO for forwarding resolved

Reviewers: teon.banek, mislav.bradac, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D139
2017-03-21 11:26:05 +01:00
matej.gradicek
88a96c2ebd Fixed logging tests.
Summary: Fixed logging tests.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot, matej.gradicek

Differential Revision: https://phabricator.memgraph.io/D137
2017-03-20 08:18:52 +00:00
Mislav Bradac
848d022c60 Bug fixes in cypher_main_visitor and add create clause
Reviewers: teon.banek, florijan

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D143
2017-03-17 16:47:29 +01:00
Teon Banek
5e6aaf231d Add tests for symbol generation in CREATE clause
Summary:
Add tests for symbol generation in CREATE clause and correctly (hopefully)
check symbols in create clause and properties.

Reviewers: florijan, mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D135
2017-03-17 15:50:19 +01:00
Mislav Bradac
dd56acf375 Add tests for CypherMainVisitor
Summary:
Add tests for CypherMainVisitor
Initialise members to nullptrs in ast.hpp data structures
Preserver users identifier names

Reviewers: teon.banek

Reviewed By: teon.banek

Differential Revision: https://phabricator.memgraph.io/D138
2017-03-17 10:45:13 +01:00
Mislav Bradac
0db7883670 Add AstTreeStorage
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D134
2017-03-16 15:07:22 +01:00
florijan
da0c9c03d6 Query - create implementation started
Summary: CreateOp tests

Reviewers: teon.banek, buda, mislav.bradac

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D132
2017-03-16 09:31:04 +01:00
Teon Banek
ffd399906a Use Symbol to get frame value
Summary:
Since we always use the symbol position to read from frame, it's more
convenient for `Frame::operator[]` to accept `Symbol` instead of `int`.

Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan, buda

Differential Revision: https://phabricator.memgraph.io/D129
2017-03-15 16:31:13 +01:00
florijan
6c7372b3c5 Query - AST tests in progress
Summary:
Query compiler AST test in progress
Logical operator testing. NodeFilter LogicalOperator added

Reviewers: mislav.bradac, buda, teon.banek

Reviewed By: buda, teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D126
2017-03-15 16:05:23 +01:00
Teon Banek
42e8d339c5 Add tests for symbol generation
Summary:
Add tests for symbol generator

Also, remove redundant PreVisit method from AST visitor

Reviewers: mislav.bradac, buda, florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D124
2017-03-15 14:27:21 +01:00
Teon Banek
b956d0812b Move all query related exceptions to a single file
Reviewers: mislav.bradac, buda, florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D125
2017-03-15 14:13:14 +01:00
florijan
1a6aaaed58 DBMS now returns a unique pointer to a GraphDbAccessor
Summary: See above.

Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D120
2017-03-14 13:37:23 +01:00
florijan
1d2d609896 VertexAccessor::in_out() added
Reviewers: buda, dgleich

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D100
2017-03-14 07:48:11 +01:00
Marko Budiselic
3e0b12f646 Merge branch 'compiler_prototype' into dev 2017-03-13 13:35:23 +01:00
Marko Budiselic
d0abb9f023 Interpreter works! 2017-03-12 03:05:31 +01:00
Marko Budiselic
1f75572d5e it compilesga -A! 2017-03-12 00:04:10 +01:00
Mislav Bradac
026e0e6fbd Implement ast generation by cypher visitor 2017-03-11 23:22:38 +01:00
Marko Budiselic
0eeb1fc5b4 Basic interpreter implementation. 2017-03-11 21:09:26 +01:00
Marko Budiselic
9030454132 Add compiler prototype entry point (work in progress). 2017-03-11 21:02:25 +01:00
Dominik Gleich
4a220411e1 Fix warnings.
Reviewers: buda, mferencevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D110
2017-03-10 21:36:55 +01:00
Teon Banek
333861e7e9 Generate flags for PlanCompiler via cmake
Summary:
Add join function to functions.cmake

This is a convenience function which will join a list of values by
replacing ';' with the given separator.

cmake: Add fetching compile flags in gcc format

This is a utility function which takes all target compilation flags that
can be passed to gcc or clang.

Generate flags for PlanCompiler via cmake

Cmake will now collect all compiler options and definitions which are
then stored in a generated `query/plan_compiler.hpp`. The generated file
is not tracked by git and is stored inside cmake's build directory. The
file is fast to generate and may change often depending on the build
type.

Additionally, link and include directories are also generated as
absolute paths. In the future, we may want to support relative paths so
that copying/installing the build dir creates runnable binaries.

Add -Wall flag for all build types

Lowercase #pragma once in tests for network_common

It seems 'once' may be case sensitive, since clang outputs a warning for
it that the pragma is unknown.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D107
2017-03-10 18:21:31 +01:00
Teon Banek
9dada557a3 Add coverage option to cmake
Summary:
Coverage is by default set to OFF, but the new option can be used for convenient
toggle when building.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D109
2017-03-10 18:05:15 +01:00
Mislav Bradac
4bcee620bc Change clique to use in64_t
Summary: Fix int -> int64_t in query_stripper

Reviewers: teon.banek, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D108
2017-03-10 13:58:02 +01:00
Mislav Bradac
725ebd1a0e int -> int64_t in in Typed and PropertyValue
Reviewers: buda, mferencevic

Reviewed By: buda, mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D106
2017-03-09 11:44:10 +01:00
Dominik Gleich
ca4ab42973 Supress intentional unused variable warning in for loop.
Reviewers: florijan, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D101
2017-03-08 17:13:48 +01:00
Dominik Gleich
97aa4b92e1 Static bitset with tests created.
Summary:
After manual merge of dev.

Merge branch 'dev' into separate_bitset

Include bitset in template.

Merge branch 'dev' into separate_bitset

Reviewers: florijan, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D97
2017-03-08 17:13:20 +01:00
florijan
971e006d13 Query stripping now uses a parse tree and differentiates between int literals in a range expression (not stripped) and outside of a range (stripped).
Summary: See above

Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D98
2017-03-08 14:19:55 +01:00
Mislav Bradac
00d818c762 Implement expression code generator
Summary: Work in progress, this is not usable yet

Reviewers: florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D84
2017-03-08 14:10:16 +01:00
Marko Budiselic
b834cdc94a memgraph coverage (lcov setup in progress...)
Summary: first version of coverage (will be polished)

Reviewers: dgleich, mferencevic, florijan, teon.banek

Reviewed By: dgleich

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D76
2017-03-07 18:27:03 +01:00
Dominik Gleich
57740bcf95 Fix bug -db_accessor passed along as &
Summary: Db_accessor is tied to one transaction, and as such each query should work on seperate db_accessor.

Reviewers: florijan, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D96
2017-03-07 15:55:56 +01:00
Dominik Gleich
8e1a897b7a Fix query integration test because of config. Fix hardcoded queries not working because of include bug.
Summary:
#1 Hardcoded query integration test was failling because the .so files couldn't be linked, because of wrong compiled directory path (missing config flag).
#2 Hardcoded query not working in production because typed_value changed so some includes didn't work.

Reviewers: florijan, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D90
2017-03-07 12:37:30 +01:00
Dominik Gleich
57f1b40d8d Refactor transaction inside db_accessor. Also introduce advance_command.
Summary:
Modification to MVCC - CHECK!

Refactor transaction_read

Add automatic commit/abort functionality to graph_db_accessor.

Fix failing test in graph_db_accessor.

Reviewers: buda, dtomicevic, florijan

Reviewed By: buda, florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D87
2017-03-07 09:42:04 +01:00
Matej Ferencevic
58a173c026 Fixed network tests so they can run concurrently.
Reviewers: dgleich

Reviewed By: dgleich

Differential Revision: https://phabricator.memgraph.io/D91
2017-03-06 14:52:25 +01:00
Matej Ferencevic
813a3b9eed Started network refactorization.
Summary:
Moved server and worker from bolt to communication. Started
templatization.

Started removal of Bolt class.

Removed unnecessary files from network.

Converted states to template functions.

Bolt::Session is now a template.

Merge remote-tracking branch 'origin/dev' into mg_refactor_network

Merged bolt_serializer.cpp into hpp.

Removed obsolete include.

Initial version of bolt session unit test.

Uncommented leftover log commands.

Reimplemented io::Socket.

Added client-stress.sh script.

Reviewers: dgleich, buda

Reviewed By: dgleich, buda

Subscribers: pullbot, mferencevic, buda

Differential Revision: https://phabricator.memgraph.io/D64
2017-03-06 13:52:34 +01:00
florijan
38c3c513fa Serialization, record stream refactor in progress. UNSTABLE STATE.
Summary: Bolt record stream refactoring. BOLT STACK IN UNSTABLE STATE. RecordStreamMocker also refactored

Reviewers: buda, dgleich, mferencevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D88
2017-03-03 14:06:40 +01:00
florijan
2aeef25881 Traversal namespace specialization added for real DB primitives
Summary: database/GraphDbAccessor and storage/...Accessor now returns iterators over lazily created Accessors (filtered on visibility). Dependecies and forward declarations reorganized to support new code

Reviewers: buda, teon.banek

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D83
2017-03-03 14:01:01 +01:00
florijan
92aa235a26 traversal/test.hpp contents moved to tests/unit/traversal.cpp
Summary: See above.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot, florijan, buda

Differential Revision: https://phabricator.memgraph.io/D82
2017-03-02 09:22:54 +01:00
florijan
80c266ce21 Traversal added. Only the core, tests and template specialization is on the way
Summary: See above.

Reviewers: buda, dgleich, mislav.bradac

Reviewed By: buda, dgleich, mislav.bradac

Subscribers: pullbot, mislav.bradac, buda, florijan

Differential Revision: https://phabricator.memgraph.io/D67
2017-03-01 16:45:00 +01:00
Mislav Bradac
ccdffa1d7e Refactor TypedValue to PropertyValue
Summary:
Rename TypedValue to PropertyValue.
Move original TypedValue to query/backend/cpp.
Fix undefined behaviours and memory leaks in PropertyValue.
Add list type to PropertyValue.
Operators and appropriate tests will be revised in following commits.

Fix bugs in TypedValue

Fix bugs in typed value

Reviewers: buda, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D77
2017-03-01 12:31:47 +01:00