-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any workaround to run cypher "path" #959
Comments
Hello @ministat It was a long time ago since I (or anyone, really) worked on this library, so I do not recall exactly if we implemented support for variable-length relationship variables. If we did, you could try:
|
@Mats-SX Thanks for your reply. Unfortunately, I got exception when I run the cyper you suggested. It looks like the pattern is unsupported.
|
As a last attempt, try adding an upper bound to the variable-length pattern. I noted that we declared unbounded var-length patterns as not implemented here.
|
The exception changed, but unfortunately, it still failed for something not implemented.
|
@Mats-SX Do you have any document introducing the design and implementation? I'd like to evaluate the effort to support this feature. That will be great if you or your colleagues can provide some help and guide. |
I think you are quite close, this should work:
There is one caveat though. IIRC the Variable Path Expand will always try to do as many expands as you specify, because we basically unroll this into optional joins in spark. So you might want to play around with that upper bound to get faster query results |
Yes. It looks quite close to be working. However, there is an exception. Can I ignore this?
Source code in SparkSQLExprMapper.scala:
|
I really don't recall how this works. It looks like we're expanding the relationship variable I couldn't say what is wrong -- my best advice is to try some more alternatives, maybe this one:
But it could also be the case that what you're trying to do is not properly implemented. In case you want to implement more support feel free to go ahead. At Neo4j we are not pursuing anything with this project currently. We do have another project https://github.com/neo4j-contrib/neo4j-spark-connector which is actively maintained. I've contacted the people who work on that to see if it can help your use case. |
Thanks for your patient response. The following cypher does not throw exception nor give the expected result.
|
Morpheus does not support "path" (https://github.com/opencypher/morpheus/blob/master/documentation/asciidoc/cypher-cypher9-features.adoc), but I encountered a problem which requires "path", I'd like to know is there any workaround.
The text was updated successfully, but these errors were encountered: