[
https://issues.apache.org/jira/browse/TINKERPOP3-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14947700#comment-14947700
]
Daniel Kuppitz commented on TINKERPOP3-793:
-------------------------------------------
I agree. Either {{filter}} or {{coalesce}}:
{code}
gremlin> g.V().as("a").out().out().as("b").select("a",
"b").by("name").by(coalesce(hasLabel("person").values("name"),
constant('enterprise software')))
==>[a:marko, b:enterprise software]
==>[a:marko, b:enterprise software]
{code}
I'm afraid that stopping the traversal would lead to a lot of confusion. Think
of complex queries over large graphs and people only getting 100 results when
they expect 1.000. It would be so hard to track that down.
> select should stop traversal on unproductive by
> -----------------------------------------------
>
> Key: TINKERPOP3-793
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-793
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.0.1-incubating
> Reporter: Matt Frantz
> Assignee: Marko A. Rodriguez
> Fix For: 3.1.0-incubating
>
>
> Instead of throwing an exception, we should stop traversal if a {{by}} clause
> fails to produce.
> Current:
> {noformat}
> gremlin> g.V().as('a').out().out().as('b')
> .select('a', 'b')
> .by('name')
> .by(has('name', 'lop').values('name'))
> The provided start does not map to a value: v[5]->[HasStep([name.eq(lop)])]
> {noformat}
> Desired:
> {noformat}
> gremlin> g.V().as('a').out().out().as('b')
> .select('a', 'b')
> .by('name')
> .by(has('name', 'lop').values('name'))
> ==>[a:marko, b:lop]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)