florijan
03c78c1277
BFS syntax changes
...
Summary:
- The new BFS syntax implemented as proposed.
- AST BreadthFirstAtom now uses EdgeAtom members: has_range_{true}, upper_bound_, lower_bound_
- Edges data structure now handles all the edge filtering (single or multiple edges), to ease planning. Additional edge filtering (additional Filter op in the plan) is removed. AST EdgeTypeTest is no longer used and is removed.
Current state is stable but there are things left to do:
- BFS property filtering.
- BFS lower_bound_ support.
- Support for lambdas in variable length expansion. This includes obligatory (even if not user_defined) inner_node and inner_edge symbols for easier handling.
- Code-sharing between BFS and variable length expansions.
I'll add asana tasks (and probably start working on them immediately) when/if this lands.
Reviewers: buda, teon.banek, mislav.bradac
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D836
2017-09-27 16:25:19 +02:00
Teon Banek
d116e0deb1
Generate ParameterLookup instead of PrimitiveLiteral
...
Summary:
This is done when the generated AST will be cached.
Remove LiteralsPlugger.
Reviewers: florijan, mislav.bradac
Reviewed By: mislav.bradac
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D788
2017-09-13 17:49:34 +02:00
Teon Banek
a83bea0b74
Add ParameterLookup to AST
...
Reviewers: florijan, mislav.bradac
Reviewed By: mislav.bradac
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D782
2017-09-13 14:28:48 +02:00
Teon Banek
4601f6c368
Add filtering BFS by edge type
...
Summary:
Antlr grammar has been updated to support putting edge types after the BFS
symbol. Planner collects edge type filters for BFS and inlines them in the
operator by joining the filter with the user input BFS filter itself. This
requires no change from the standpoint of the operator. On the other hand, in
order to use the faster lookup by a single edge type, `ExpandBreadthFirst`
operator now accept an optional edge type. The edge type is passed from the
planner only if the user is filtering by a single type.
Unit tests as well as tck have been updated.
Reviewers: florijan, mislav.bradac
Reviewed By: florijan
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D777
2017-09-12 11:29:38 +02:00
Mislav Bradac
74d0a426ab
Use \u for utf16 and \U for utf32
...
Reviewers: buda
Reviewed By: buda
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D773
2017-09-09 16:16:30 +02:00
florijan
f68bac922f
Map indexing added
...
Reviewers: mislav.bradac, buda
Reviewed By: mislav.bradac
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D739
2017-09-04 09:12:46 +02:00
florijan
ca8fb55ac5
Collect Map added
...
Summary:
Tests are on the way. Please first comment if you're OK with this implementation, some points are discussable.
What works now:
```
bash:MEMGRAPH_ROOT/build/>./tests/manual/console 10
MG>MATCH (n) RETURN COLLECT("age_" + n.age, n.height)
+-----------------------------------------------------------------------------------------------------------------------------------+
| COLLECT("age_" + n.age, n.height) |
+-----------------------------------------------------------------------------------------------------------------------------------+
| {age_10: 176, age_13: 180, age_24: 172, age_25: 179, age_32: 123, age_33: 186, age_37: 147, age_43: 162, age_49: 126, age_6: 170} |
+-----------------------------------------------------------------------------------------------------------------------------------+
```
Reviewers: mislav.bradac, teon.banek, buda
Reviewed By: mislav.bradac, buda
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D695
2017-08-25 12:51:18 +02:00
Mislav Bradac
8792b8f931
Implement CASE construct
...
Summary: Missing: documentation
Reviewers: buda, teon.banek
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D685
2017-08-21 13:30:41 +02:00
florijan
1d112e1141
GraphDbAccessor - style change
...
Summary: Not strictly neccessary, but it's been itching me. It took an hour.
Reviewers: buda, mislav.bradac
Reviewed By: mislav.bradac
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D648
2017-08-09 16:09:08 +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
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
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
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
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
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
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
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
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
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
Mislav Bradac
c56eb4310e
Remember token positions for literals
...
Summary: Remove yaml
Reviewers: buda
Reviewed By: buda
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D466
2017-06-13 17:11:27 +02:00
Mislav Bradac
f7d540829a
Add deep clone to Ast
...
Summary: Prepare your aspergillums for blessing this magnificent diff.
Reviewers: buda, teon.banek, florijan
Reviewed By: teon.banek
Subscribers: lion, pullbot
Differential Revision: https://phabricator.memgraph.io/D458
2017-06-13 12:22:25 +02:00
Teon Banek
e631eb4eb2
Rename directions from LEFT/RIGHT to IN/OUT
...
Reviewers: florijan, mislav.bradac
Reviewed By: mislav.bradac
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D405
2017-05-30 13:14:34 +02:00
Mislav Bradac
f9cd87bb46
Implement collect aggregation
...
Reviewers: teon.banek, florijan
Reviewed By: teon.banek, florijan
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D386
2017-05-19 17:24:12 +02:00
Teon Banek
28fbeb8e9d
Raise if MATCH is after OPTIONAL MATCH
...
Reviewers: florijan, mislav.bradac
Reviewed By: mislav.bradac
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D383
2017-05-19 16:27:21 +02:00
Mislav Bradac
6a027ea3b2
Throw on key appearing twice in map literal
...
Reviewers: teon.banek
Reviewed By: teon.banek
Differential Revision: https://phabricator.memgraph.io/D388
2017-05-19 16:17:40 +02:00
florijan
97638d3327
Query - grammar changed to support '1 IN [[1, 2]][0]'
...
Reviewers: mislav.bradac, teon.banek, buda
Reviewed By: mislav.bradac
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D381
2017-05-19 09:09:12 +02: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
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
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
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
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
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
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
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
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
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
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
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
Mislav Bradac
36129cdcae
Implement simple function conversion
...
Reviewers: buda
Reviewed By: buda
Subscribers: florijan, teon.banek
Differential Revision: https://phabricator.memgraph.io/D264
2017-04-11 19:14:08 +02:00
Mislav Bradac
dfa6800edd
Add aggregation conversion from antlr to ast
...
Reviewers: teon.banek
Reviewed By: teon.banek
Differential Revision: https://phabricator.memgraph.io/D260
2017-04-11 14:55:26 +02:00
Mislav Bradac
d92caf1163
Check clauses ordering
...
Reviewers: buda, florijan, teon.banek
Reviewed By: buda, teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D257
2017-04-11 12:30:17 +02:00
Teon Banek
804d0b09b9
Move typed_value to query top level and namespace it
...
Summary:
Upgraded old uses of TypedValue.
Also, implemented operator<< for EdgeAccessor and VertexAccessor.
Reviewers: buda, florijan, mislav.bradac, mferencevic
Reviewed By: florijan
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D251
2017-04-11 08:50:46 +02:00
Mislav Bradac
b7ee09785b
Implement IS NULL and IS NOT NULL
...
Reviewers: teon.banek, florijan
Reviewed By: florijan
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D254
2017-04-10 16:55:58 +02:00
Mislav Bradac
7a58ec5afb
Fix bug in parenthesized expression
...
Reviewers: buda
Reviewed By: buda
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D249
2017-04-07 18:33:07 +02:00
Mislav Bradac
a0049c9691
Convert With clause from antlr to high level ast
...
Reviewers: teon.banek
Reviewed By: teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D230
2017-04-05 16:22:46 +02:00
Mislav Bradac
6112454b08
Throw exception on trailing text in query
...
Reviewers: buda
Reviewed By: buda
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D222
2017-04-04 18:48:55 +02:00
florijan
5134a94f1c
Query::Plan - RemoveLabels added and tested
...
Summary:
Query::Plan::RemoveProperty op added and tested
Query::AST:: Remove added to cypher main visitor. Tested. Grammar corrected on missing whitespace in removeItem production
Reviewers: buda, mislav.bradac, teon.banek
Reviewed By: mislav.bradac
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D202
2017-03-30 08:53:18 +02:00
Dominik Gleich
bd0b81526e
Initial version of mvcc_gc.
...
Summary:
Tested MVCC garbage collector.
Also refactors graph_db forward declarations of vertex and edge which were causing issues.
Reviewers: mislav.bradac, dtomicevic, florijan, teon.banek, buda
Reviewed By: teon.banek, buda
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D177
2017-03-29 12:38:24 +02:00