[
https://issues.apache.org/jira/browse/TINKERPOP-1973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483090#comment-16483090
]
Daniel Kuppitz commented on TINKERPOP-1973:
-------------------------------------------
This is the expected behavior. {{emit()}} is only for intermediate vertices.
You see {{ripple}} because it's the end of the repetition.
{noformat}
gremlin> g.V().repeat(out()).times(2).emit(has('name', 'lop')).path().by('name')
==>[marko,lop]
==>[marko,josh,ripple]
==>[marko,josh,lop]
==>[josh,lop]
==>[peter,lop]
{noformat}
{{emit())) should not be seen as a filter, but rather as an injector.
> Emit predicate ignored after final loop of a RepeatStep with times or until
> ---------------------------------------------------------------------------
>
> Key: TINKERPOP-1973
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1973
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.3.3, 3.2.9
> Reporter: Ted Wilmes
> Assignee: Ted Wilmes
> Priority: Major
>
> When combined with a {{times}} or {{until}}, the {{emit}} predicate is not
> applied to the output of the last loop of the {{RepeatStep}}.
> {code}
> gremlin> g = TinkerFactory.createModern().traversal()
> ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
> gremlin> g.V().repeat(out()).emit(has('name', 'lop')).values('name')
> ==>lop
> ==>lop
> ==>lop
> ==>lop
> gremlin> g.V().repeat(out()).times(2).emit(has('name', 'lop')).values('name')
> ==>lop
> ==>ripple
> ==>lop
> ==>lop
> ==>lop
> gremlin>
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)