OpenCypher TCK Tests

23 views
Skip to first unread message

Michael Burbidge

unread,
May 23, 2023, 4:56:32 PM5/23/23
to openCypher
Are there projects that actually use the TCK tests to validate an implementation? I'm wondering if the tests themselves are valid.

Michael-

Michael Burbidge

unread,
May 23, 2023, 5:10:54 PM5/23/23
to openCypher
The reason I'm asking is that there appears to be some tests that have conflicting assertions. Consider test 10 in Match1.feature and test 23 in Match6.feature. Substituting the first example for each test, yields the following test cases:

Match1.feature [10]:

MATCH r = ()-[]-(), (r)
RETURN r

Match6.feature [23]:

MATCH p = (p)-[]-()
RETURN p

These seem to be validating the exact same error condition, yet in the first case the result is supposed to be the syntax error VariableTypeConflict, and in the second case is supposed to result in the syntax error VariableAlreadyBound.

I acknowledge that the two test cases are slightly different, but not significantly so. What is the distinguishing difference between these two test cases that would allow an implementation to provide the proper error code, according to the test?

Michael-

David Bechberger

unread,
May 23, 2023, 6:49:24 PM5/23/23
to Michael Burbidge, openCypher
Hello Michael,

To summarize, for these examples, I would expect different error messages as the difference is the use of the same variable across patterns versus in the same pattern.

In the first case, we have two patterns, one where the variable r is equal to the path, and then a second pattern it is trying to bind a path (r) to a node.  In this scenario, I would expect a type conflict error as we are trying to bind a path to a node.  

In the second case, we are attempting to bind the variable `p` twice within the same pattern.  Once as the path variable (p=) and once as the first node in the path ( (p)-[]-()).   Since this is the same pattern, the error would be different, as there is not a way to know the type of data being bound.  

Hopefully, this helps.

Thanks,
Dave

--
You received this message because you are subscribed to the Google Groups "openCypher" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencypher+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencypher/f279e47d-e600-4f24-9f14-84a4bfbb2c02n%40googlegroups.com.

Michael Burbidge

unread,
May 23, 2023, 7:11:18 PM5/23/23
to openCypher
Thanks for the explanation Dave. I don't understand why in the second case you can't know the type of p, from the syntax. My understanding is that the variable assigned to the results of a pattern is always a path.

By the way, both Memgraph and Neo4j treat these exactly same.

Neo4j returns "Type mismatch: p already defined as Path, expected Vertex." for both and Memgraph returns "Query failed: Type mismatch: r already defined as Path, expected Vertex." for both.

Michael-

Reply all
Reply to author
Forward
0 new messages