[ 
https://issues.apache.org/jira/browse/TINKERPOP-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15812290#comment-15812290
 ] 

Marko A. Rodriguez commented on TINKERPOP-1496:
-----------------------------------------------

>From a while ago, in {{master/}}, {{select(last)}} is now default so its 
>consistent across {{as()}}-based selection.

{code}
gremlin> g = TinkerFactory.createModern().traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g.V().as("a").both().as("a").where(__.as("a").has("lang","java"))
==>v[3]
==>v[3]
==>v[3]
==>v[5]
gremlin> g.V().as("a").both().as("a").where(select("a").has("lang","java"))
==>v[3]
==>v[5]
==>v[3]
==>v[3]
gremlin>
{code}

> Should a head-as("x") always be a select("x")?
> ----------------------------------------------
>
>                 Key: TINKERPOP-1496
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1496
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.2
>            Reporter: Marko A. Rodriguez
>              Labels: breaking
>
> There are two steps that treat a head of {{as("x")}} as {{select("x")}}. 
> {code}
> match(as("x").out().as("y"), ...) => match(select("x").out().as("y"), ...)
> where(as("x").has("name")) => where(select("x").has("name"))
> {code}
> I don't like how these steps are "special" in this respect and I think that 
> it would be elegant if a head-{{as()}} has a consistent meaning for all inner 
> traversals.
> Thus, I'm wondering if we should make it such that EVERY head {{as("x")}} 
> gets translated to {{select("x")}}.
> {code}
> addE("knows").to(as("x").out("mother"))
> property("name", as("x").out("mother").values("name"))
> {code}
> I believe this would be backwards compatible in the sense that there really 
> isn't a reason why an inner traversal head-{{as()}} would be used to label. 
> Dunno -- definitely need [~dkuppitz]/etc. feedback.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to