[
https://issues.apache.org/jira/browse/TINKERPOP-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16852270#comment-16852270
]
Daniel Kuppitz commented on TINKERPOP-2230:
-------------------------------------------
To me it looked like the implementation made the assumption that patterns are
always circular (e.g. you can pick a random start label and from there you can
reach any other label). Also, the user-defined start step (the start step of
your first pattern) was never moved, so if you came up with pre-sorted solvable
sequence, you wouldn't have run into an error.
Now, bad things started to happen if there's a start label that is never used
as an end label. The start step discovery algorithm didn't force this child
pattern to be pushed to the top (and thus define the ultimate start label).
Hence, you sometimes got the unsolvable pattern error, although all child
patterns as a whole would have produced a valid pattern (if only the start step
would have been be right).
> match() step unexpected behaviours
> ----------------------------------
>
> Key: TINKERPOP-2230
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2230
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.4.1
> Reporter: Fabio Lorenzi
> Assignee: Daniel Kuppitz
> Priority: Major
> Labels: gremlin
>
> On the well known software graph:
> {code:java}
> gremlin> g.V().match(
> ......1> __.as('a').out('knows').as('b'),
> ......2> __.as('b').out('created').as('c'))
> ==>[a:v[1],b:v[4],c:v[5]]
> ==>[a:v[1],b:v[4],c:v[3]]
> gremlin> g.V().match(
> ......1> __.as('b').out('created').as('c'),
> ......2> __.as('a').out('knows').as('b'))
> The provided match pattern is unsolvable: [[MatchStartStep(a),
> VertexStep(OUT,[knows],vertex), MatchEndStep(b)], [MatchStartStep(b),
> VertexStep(OUT,[created],vertex), MatchEndStep(c)]]
> {code}
> with the second one being solvable as well (I think). (?)
> Quoting [~dkuppitz]:
> "I just noticed that the error message of my failing traversal actually
> contains a solvable form of patterns. It's really confusing; if you want,
> create a Jira ticket for that issue, perhaps someone dares to analyze that
> crazy code"
> please see
> [this|https://stackoverflow.com/questions/56218188/match-clause-is-unsolvable-behavior-is-not-clear/56260508#56260508]
> for more information.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)