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

stephen mallette commented on TINKERPOP-2209:
---------------------------------------------

i guess it gets folding differently into `GraphStep`:

{code}
gremlin> g.V().until(hasId(ids)).repeat(out().simplePath()).profile()
==>Traversal Metrics
Step                                                               Count  
Traversers       Time (ms)    % Dur
=============================================================================================================
TinkerGraphStep(vertex,[])                                             6        
   6           0.320    19.84
RepeatStep(until([HasStep([~id.eq([1, 2])]), Pr...                              
               1.296    80.16
  HasStep([~id.eq([1, 2])])                                                     
               0.143
  VertexStep(OUT,vertex)                                               8        
   8           0.247
  PathFilterStep(simple)                                               8        
   8           0.219
  RepeatEndStep                                                                 
               0.195
                                            >TOTAL                     -        
   -           1.617        -
gremlin> g.V().hasId(ids).profile()
==>Traversal Metrics
Step                                                               Count  
Traversers       Time (ms)    % Dur
=============================================================================================================
TinkerGraphStep(vertex,[1, 2])                                         2        
   2           0.098   100.00
                                            >TOTAL                     -        
   -           0.098        -
{code}

> hasId is not converting properly when multiple values are passed
> ----------------------------------------------------------------
>
>                 Key: TINKERPOP-2209
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2209
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.3.3
>         Environment: loaded GraphOfTheGods in JanusGraph 0.3.1 on a macbook.
>            Reporter: Chris Hupman
>            Priority: Minor
>
> While [trying to answer a question on Stack Overflow 
> |[https://stackoverflow.com/questions/55912624/get-all-edges-between-multiple-vertices-janusgraph/55929179#55929179]]
>  I found that hasId is performing `~id.eq` against arrays instead of 
> `~id.within` For a workaround the user reporting the issue found that quoting 
> the values or converting them to longs worked. 
>  
> ```
> {{ids = [8440,12536]}}
> {{paths = 
> g.V(ids).until(hasId(ids)).repeat(out().simplePath()).limit(10).path().explain()}}
> {{...RepeatStep(until([HasStep([~id.eq([4112, 4128, ...])])]),}}{{}}
> {{paths = 
> g.V(ids).until(hasId("8440","12536")).repeat(outE().simplePath()).limit(10).path().explain()}}
> {{...RepeatStep(until([HasStep([~id.within([8440, 12536])])])}}
> ```



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to