-
Notifications
You must be signed in to change notification settings - Fork 36
Add errors for unsupported combinations with path modes #399
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| :page-role: new-2025.11 | ||
| = 42N60 | ||
dogofbrian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| == Status description | ||
| error: syntax error or access rule violation - unsupported combination of match mode and path mode. `REPEATABLE ELEMENTS` with `{ <<pathMode>> }` path mode is not supported. | ||
|
|
||
| == Example scenario | ||
| For example, in the following query `REPEATABLE ELEMENTS` is used with the `TRAIL` path mode: | ||
|
|
||
| [source,cypher] | ||
| ---- | ||
| MATCH REPEATABLE ELEMENTS p = TRAIL (:A)-[:R]->{,10}(:B) | ||
| RETURN p | ||
| ---- | ||
| This will result in an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001], with a cause detailed in xref:errors/gql-errors/42N60.adoc[42N60] and the following status description: | ||
|
|
||
| [source] | ||
| ---- | ||
| error: syntax error or access rule violation - unsupported combination of match mode and path mode. `REPEATABLE ELEMENTS` with `TRAIL` path mode is not supported. | ||
| ---- | ||
|
|
||
| ifndef::backend-pdf[] | ||
| [discrete.glossary] | ||
| == Glossary | ||
|
|
||
| include::partial$glossary.adoc[] | ||
| endif::[] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| :page-role: new-2025.11 | ||
| = 42N61 | ||
dogofbrian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| == Status description | ||
| error: syntax error or access rule violation - unsupported mixing of different path modes. Mixing `{ <<pathModeList>> }` in the same graph pattern is not supported. Split the pattern into separate `MATCH` clauses instead. | ||
|
|
||
| == Example scenario | ||
| For example, in the following query `TRAIL` and `ACYCLIC` are used: | ||
|
|
||
| [source,cypher] | ||
| ---- | ||
| MATCH p = ACYCLIC (a:A)-[:P]->+(b:B), | ||
| q = TRAIL (b)-[:Q]->+(a) | ||
| RETURN p, q | ||
| ---- | ||
| This will result in an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001], with a cause detailed in xref:errors/gql-errors/42N61.adoc[42N61] and the following status description: | ||
|
|
||
| [source] | ||
| ---- | ||
| error: syntax error or access rule violation - unsupported mixing of different path modes. Mixing `ACYCLIC` and `TRAIL` in the same graph pattern is not supported. Split the pattern into separate `MATCH` clauses instead. | ||
| ---- | ||
|
|
||
| == Possible solution | ||
| Split the graph pattern into separate `MATCH` clauses and use predicates to enforce relationship uniqueness across the set of paths. | ||
|
|
||
| For example, the above query can be rewritten as: | ||
|
|
||
| [source,cypher] | ||
| ---- | ||
| MATCH p = ACYCLIC (a:A)-[r1:P]->+(b:B) | ||
| MATCH q = TRAIL (b)-[r2:Q WHERE NOT r2 IN r1]->+(a) | ||
| RETURN p, q | ||
| ---- | ||
|
|
||
| Here the predicate `NOT r2 IN r1` ensures that the relationships in path `q` do not overlap with those in path `p`, replicating the effect of Cypher's default match mode `DIFFERENT RELATIONSHIPS`. | ||
|
|
||
| ifndef::backend-pdf[] | ||
| [discrete.glossary] | ||
| == Glossary | ||
|
|
||
| include::partial$glossary.adoc[] | ||
| endif::[] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.