vesoft-inc / nebula

A distributed, fast open-source graph database featuring horizontal scalability and high availability
https://nebula-graph.io
Apache License 2.0
10.63k stars 1.19k forks source link

[opencypher multiple match incompatible ] How to use two match in one sentence. #2687

Open whitewum opened 3 years ago

whitewum commented 3 years ago

The example is very simple and classic.

MATCH (tom: Person { name: 'Tom Hanks' })-[:ACTED_IN]->(m: Movie)
MATCH (m)<-[:DIRECTED]-(director: Person)
RETURN DISTINCT director.name

I tried

MATCH (tom: Person { name: 'Tom Hanks' })-[:ACTED_IN]->(m: Movie)
, (m)<-[:DIRECTED]-(director: Person)
MATCH
UNWIND
WITH
MATCH

or

MATCH 
| 
MATCH
xxx

And I'm told SematicError.

czpmango commented 3 years ago

Not supported yet.

wey-gu commented 3 years ago

Another example that the user required multiple matches in one query.

https://discuss.nebula-graph.com.cn/t/topic/3853/12