Commit Graph

827 Commits

Author SHA1 Message Date
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
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
Mislav Bradac
e79f091a69 Convert bag and distinct from antlr to AST
Reviewers: teon.banek, florijan

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D308
2017-04-21 16:48:13 +02:00
florijan
20d22b4e62 Query::Plan::Once added
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D305
2017-04-21 15:51:03 +02:00
florijan
6e50a7605a Query::Plan::Aggregate - removed advance_command
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D304
2017-04-21 15:46:13 +02:00
Teon Banek
55dc08fc30 Plan Skip and Limit operators
Summary:
Support SKIP and LIMIT macros in tests.
Test planning Skip and Limit.
Prevent variables in SKIP and LIMIT.

Reviewers: mislav.bradac, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D296
2017-04-21 13:28:04 +02:00
Teon Banek
893df584f6 Merge utils/exceptions into single file
Summary: Update documentation of `utils/exceptions.hpp`

Reviewers: mislav.bradac, florijan, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D300
2017-04-20 16:53:21 +02:00
florijan
e5cc3f1561 Query::Plan::OrderBy
Reviewers: mislav.bradac, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D302
2017-04-20 15:04:48 +02:00
Teon Banek
4ec363c272 Move common members of Return and With to ReturnBody
Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D303
2017-04-20 13:18:56 +02:00
florijan
2b6baeae93 Query::TypedValue - logical ops bugfixes
Reviewers: teon.banek, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D295
2017-04-20 09:54:03 +02:00
Teon Banek
14b6c739bb Catch NotYetImplemented in Repl
Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D297
2017-04-19 15:58:14 +02:00
Teon Banek
b778c54d74 Reset bound symbols after planning WITH
Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D290
2017-04-19 12:30:04 +02:00
Mislav Bradac
d42d519956 Delete import and serialisation
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D294
2017-04-19 12:00:11 +02:00
Mislav Bradac
5434e79ea6 Merge string utils to one file
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D281
2017-04-18 17:39:58 +02:00
florijan
541c3f0af7 Query::Plan - Skip and Limit added
Reviewers: mislav.bradac, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D292
2017-04-18 16:39:31 +02:00
florijan
157327de48 Storage::TypedValue - big int equality bug fix
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D293
2017-04-18 16:34:56 +02:00
Teon Banek
c429923b31 Prevent same names in named expressions
Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D291
2017-04-18 15:57:18 +02:00
Teon Banek
c1d0090fe1 During type check Any type should always match
Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D286
2017-04-18 13:45:31 +02:00
Teon Banek
dbe5ffc4ea Raise if Abs function got a boolean
Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D289
2017-04-18 13:28:34 +02:00
florijan
231b84e834 Query::Plan - Reconstruct fails after delete
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D287
2017-04-18 12:25:41 +02:00
florijan
21770e2aca Query::Plan::Aggregate - first value type check bugfix
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D285
2017-04-18 09:46:43 +02:00
Teon Banek
ffade52fca Remove unused query exceptions
Reviewers: florijan, mislav.bradac, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D283
2017-04-18 09:20:01 +02:00
Matej Ferencevic
f05fcd91c3 Refactored bolt session to use new decoder.
Summary:
Bolt buffer is now a template.

Communication worker now has a new interface.

Fixed network tests to use new interface.

Fixed bolt tests to use new interface.

Added more functions to bolt decoder.

Reviewers: dgleich, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D256
2017-04-15 16:35:09 +02:00
Dominik Gleich
db30e72069 Change back to seq_cst memory ordering.
Summary: This probably made the sl_simulation test hang. We'll update it to this for now and see how it will behave in the future.

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D284
2017-04-14 17:50:08 +02:00
Dominik Gleich
461ea65ad4 Deferred deleter added.
Summary:
Add tests.

Merge branch 'dev' into remove_locks

Everything works. Refactor complete.

Documentation:
https://phabricator.memgraph.io/w/memgraph_implementation/indexing/

Reviewers: buda, mislav.bradac, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D258
2017-04-14 17:46:16 +02:00
florijan
0a09a6ac64 Storage, Query - deletion bugfix and improvements
Summary:
Multiple attempts to delete a record dont crash anymore.
Deleting a vertex and its blocking edge in the same delete op now supported.
Utils::Assert - permanent_fail bug fix

Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D282
2017-04-14 16:34:38 +02:00
florijan
3d0181b28b Query::Plan::Aggregation - optional input bugfix
Reviewers: teon.banek, mislav.bradac

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D280
2017-04-14 15:06:24 +02:00
Mislav Bradac
bba20cf89c Remove unneccessary files from utils
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D276
2017-04-13 17:55:33 +02:00
florijan
59a9aaea16 Query::Context - removed some junk
Reviewers: teon.banek, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D278
2017-04-13 16:49:18 +02:00
Teon Banek
67b7428e5e Reset in_create_node flag during symbol generation
Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D279
2017-04-13 16:44:51 +02:00
Marko Budiselic
38c40096c5 Interpreter build script + dockerfile.
Summary: Interpreter build script + dockerfile.

Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D275
2017-04-13 14:58:14 +02:00
Teon Banek
15d5328957 Check if aggregation is used in right clause
Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D274
2017-04-13 13:31:52 +02:00
florijan
d9e02d624d Query::TypedValue - equality, functionality
Summary:
Changed the equality to always return Null or Bool TypedValue and never throw.
Changed BoolEquality to use the new raw equality.
Added equality, BoolEquality and hash support for Type::Map.
Added tests for new stuff.

Reviewers: teon.banek, mislav.bradac

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D273
2017-04-13 11:50:47 +02:00
Teon Banek
3b27b20992 Reorganize query directory tree
Summary:
Move query/frontend/interpret to query/interpret.
Split interpret.hpp to frame.hpp and eval.hpp.
Move query/frontend/logical to query/plan.
Nest namespace frontend::opencypher inside query.

Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D272
2017-04-13 11:28:11 +02:00
florijan
c89c65a748 Query::Plan::Aggregate - count edge-case fix
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D270
2017-04-13 08:30:34 +02:00
Dominik Gleich
afbec0a26e Test GarbageCollector in skiplist.
Summary: Tests the skiplist GC.

Reviewers: florijan, mferencevic, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D145
2017-04-12 17:02:29 +02:00
Teon Banek
596b015e99 Correctly check variables inside property maps
Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D271
2017-04-12 16:44:16 +02:00
Mislav Bradac
55ef48c78e Add antlr error description to SyntaxException
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D269
2017-04-12 15:51:21 +02:00