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

Daniel Kuppitz commented on TINKERPOP-1090:
-------------------------------------------

The first issue (last query) was solved in 
https://github.com/apache/incubator-tinkerpop/commit/bb275d9d7d65fd2b0b917804087c5c5dc6cd1734.

> Dynamic vertex by id lookups
> ----------------------------
>
>                 Key: TINKERPOP-1090
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1090
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.1.0-incubating
>            Reporter: Daniel Kuppitz
>
> {noformat}
> gremlin> g.inject(0L).as("id").V().has(id.getAccessor(), 
> 0L).iterate().toString()
> ==>[InjectStep([0])@[id], TinkerGraphStep(vertex,[~id.eq(0)])]
> gremlin> g.inject(0L).as("id").V().has(id.getAccessor(), 
> select("id")).iterate().toString()
> ==>[InjectStep([0])@[id], TinkerGraphStep([],vertex), 
> TraversalFilterStep([PropertiesStep([~id],value), SelectOneStep(id)])]
> gremlin> g.inject(0L).as("id").V().has(id, select("id")).iterate().toString()
> ==>[InjectStep([0])@[id], 
> TinkerGraphStep(vertex,[~id.eq([SelectOneStep(id)])])]
> {noformat}
> The last compiled query is wrong, because we don't have a method overload for 
> {{has(accessor, traversal)}}. The second one looks good and should return the 
> same result as the first one, but its result is always empty.
> {noformat}
> gremlin> g.inject(0L).as("id").V().has(id.getAccessor(), 0L)
> ==>v[0]
> gremlin> g.inject(0L).as("id").V().has(id.getAccessor(), select("id"))
> gremlin> 
> {noformat}
> A (very) nice to have would be if the dynamic lookup would not result in a 
> full graph scan.



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

Reply via email to