s1ck / gdl Goto Github PK
View Code? Open in Web Editor NEWGraph Definition Language
License: Apache License 2.0
Graph Definition Language
License: Apache License 2.0
The Comparator::getInverse
that inverts a comparator looks like
...
case LT: return GT;
case GT: return LT;
case LTE: return GTE;
case GTE: return LTE;
....
However, the inverse of LT
should be GTE
and similarly the other inverses (GT ->LTE, LTE->GT, GTE->LT
).
For MATCH (n)
or MATCH ()-[e]->()
the parser produces the predicates n.__label__ = 'DefaultVertexLabel'
and e.__label__ = 'DefaultEdgeLabel'
which is not the expected behaviour
key = 1 -> Integer
key = 1L -> Long
for e.g. MATCH (v) WHERE v.__label__ = "Foo"
the label needs to be updated at the query vertex representing v.
Queries conjoining a NOT predicate are not handled correctly.
E.g., the query
MATCH (alice)-[r]->(bob) WHERE bob.age<30 AND NOT alice.age > 50
yields the predicate
(alice.age > 50 AND (NOT bob.age < 30))
in GDLLoader.java
.
I think this is due to confusion of FIFO/LIFO functionality in GDLLoader::exitNotExpression
Changing line 561 in GDLLoader.java
from
Predicate not = new Not(currentPredicates.pop());
to
Predicate not = new Not(currentPredicates.removeLast());
fixed this issue for me, test cases still worked after this change.
In Order to be able to match certain ID we have to be able to specify GradoopIDs inside a query
I would suggest the following markup
MATCH (a)
WHERE a = GradoopId(0000-0000-00-000)
RETURN
Would fix opencypher/morpheus#143
Would be great to reduce the necessary configuration overhead to use GDL by adding it to the maven central instead of our "special" solution as we discussed it in our gradoop-team-meeting.
In a project were we're implementing Cypher we're using GDL to generate test graphs. In order to test whether a GDL-defined graph is identical to a graph generated by our system, we need to control what ids entities in GDL are given.
It would be lovely to support some kind of injection of an id-generator interface, or similar, which we can use to position the id generator in the correct state for our test case.
Once Gradoop supports it, GDL should be able to parse Date and DateTime property values.
Gradoop issue dbs-leipzig/gradoop#488
E.g.
WHERE a.birthday > 01.01.1991
Related to dbs-leipzig/gradoop#1482
We should support alternate labels in the MATCH clause
E.g.
MATCH (me:Person|:Alien)
RETURN me
Which is equal to
MATCH (me)
WHERE me.__label__ = "Person" OR me.__label__ = "Alien"
RETURN me
e.g.:
String gdlString = "(alice:Person)-e->(:Person)";
GDLHandler gdlHandler = new GDLHandler.Builder().buildFromString(gdlString);
for (Vertex v : gdlHandler.getVertices()) {
System.out.println(v.getVariable());
}
output:
alice
null
We currently use !=
for not equal. However, Cypher uses <>
, hence we should support both?
MATCH ()-->()
loader.getEdges().stream().findFirst().get().hasVariableLength()
returns true
E.g. (u1 {score: 1.0}), (u1 {score: 2.0})
shouldn't be valid, as most likely it is a copy-paste error.
In another sense, this is actually trying to guess the users intent. Maybe a warning would also a solution.
From a compiler point of view, this is the equivalent of:
a = 10;
a = 12;
Co-issued: @breakanalysis
key = 1.0 -> Float
key = 1.0d -> Double
In Cypher nodes can have zero or more labels, and it would be nice to have support for that.
It seems that all special characters are prohibited in vertex and edge labels.
Is there a reason why?
I think a blacklist of reserved characters would be sufficient.
Currently the ANTLR parser uses the default error strategy org.antlr.v4.runtime.DefaultErrorStrategy
which just prints to the standard error for each parse error but continues the parsing. The user has no way of knowing/reacting to syntax errors.
If there was a way of specifying an alternative error strategy, for example org.antlr.v4.runtime.BailErrorStrategy
via org.antlr.v4.runtime.Parser.setErrorHandler(ANTLRErrorStrategy)
the user could choose to wrap the parser in a try/catch-block an catch org.antlr.v4.runtime.misc.ParseCancellationException.ParseCancellationException(Throwable)
.
Usually, a user would expect the GDL reader to throw an exception in case off the input not matching the correct GDL syntax. The DefaultErrorStrategy
only prints out the wrong syntax while the BailErrorStrategy
only throws an exception without printing that false input.
An additional ErrorStrategy printing out syntax errors and throwing exceptions would be helpful.
Instead of using thridparty travis ci for integration testing we can use the provided github actions to trigger testing with maven.
The Neo4j Cypher default for edge labels (or types) is upper-case snake-case, e.g., :WORKS_AT
.
Currently this is not supported by GDL
1.0$ -> BigDecimal
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.