Cypher: Stating a pattern twice in the match clause doesn't work #154

Closed
lassewesth opened this Issue Nov 12, 2012 · 5 comments

Comments

Projects
None yet
2 participants
Owner

lassewesth commented Nov 12, 2012

@systay: 'This query should work:

START x=node(0)
MATCH x-->y<--x
RETURN x

It's repeating x-->y twice, which should work. No matches are found instead.'

Owner

lassewesth commented Nov 12, 2012


valueCount: 1
values:

Owner

lassewesth commented Nov 12, 2012

@chrisleishman: This is a casualty of the uniqueness stuff we've discussed.

Owner

lassewesth commented Nov 12, 2012

@chrisleishman: As we have relationship single traversal (aka relationship uniqueness), the above is equivalent to:

START x=node(0)
MATCH x-[r1]->y<-[r2]-x
WHERE r1 <> r2
RETURN x

Hence it wont match unless there are two relationships between x and y.

Owner

lassewesth commented Nov 12, 2012

@systay: You are quite right.

Contributor

jakewins commented Mar 4, 2013

This is expected behavior, closing this.

@jakewins jakewins closed this Mar 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment