[
https://issues.apache.org/jira/browse/TINKERPOP-1090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kuppitz closed TINKERPOP-1090.
-------------------------------------
Resolution: Won't Fix
Closing, as the queries in this ticket are bad, There should still be dynamic
id lookups, but a) a proper example query would look more like
{{g.inject(1L).as("id").V().where(id().as("id"))}} and b) I see this more as a
provider problem, since it's not only about id lookups, but indexes in general.
> 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
> Priority: Major
>
> {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
(v7.6.3#76005)