[
https://issues.apache.org/jira/browse/TINKERPOP-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15644762#comment-15644762
]
Marko A. Rodriguez commented on TINKERPOP-1541:
-----------------------------------------------
The reason we allow for the same path label to be used is because of:
{code}
g.V().repeat(out().as('a')).times(3).select('a')
{code}
Given that you can't change the label in the {{repeat(}}, you have it multiple
times. Note that there is {{Pop}} where you can {{Pop.last}}, {{Pop.first}}, or
{{Pop.all}}. Right now the default for most {{PathProcessor}} steps is
{{Pop.all}}. If we could change that to {{Pop.last}}, then what we could do is
simply analyze the traversal and compile time and unless there is a different
{{Pop}} somewhere, then only keep the last version of the labeled step. That
would be best. The problem -- it would be a major breaking change.
> Should repeated objects be returned for the same label?
> -------------------------------------------------------
>
> Key: TINKERPOP-1541
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1541
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.2.3
> Reporter: Marko A. Rodriguez
> Labels: breaking
>
> Check this out:
> {code}
> gremlin> g.V().as('a').select('a').as('a').select('a')
> ==>[v[1],v[1]]
> ==>[v[2],v[2]]
> ==>[v[3],v[3]]
> ==>[v[4],v[4]]
> ==>[v[5],v[5]]
> ==>[v[6],v[6]]
> {code}
> Shouldn't we just return the uniques? This is a big decision as this can
> cause massive rippling breakage for users :).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)