[
https://issues.apache.org/jira/browse/TINKERPOP-2384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17137898#comment-17137898
]
Stephen Mallette commented on TINKERPOP-2384:
---------------------------------------------
This seems to have opened a bag of worms a bit. It seems that the problem is
that {{select(Traversal)}} was not treating that argument as a local child so
side-effects were not properly propagating to it. If I "fix" that then problems
start to occur with {{GraphComputer}} tests where it thinks that verifications
are being violated with respect to {{PathProcessor}} max requirements. Not sure
how to fix this one immediately.
> Inject and withSideEffect causing different outcomes in order step
> ------------------------------------------------------------------
>
> Key: TINKERPOP-2384
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2384
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.4.6
> Environment: TinkerGraph @ 3.4.6 , TinkerFactory.createModern() ,
> Gremlin Console
> Reporter: Kelvin R. Lawrence
> Priority: Major
>
> I tried creating the following query two different ways. One using _*inject*_
> and the other using _*withSideEffect*_. The version using _*inject*_ works as
> expected and the version using _*withSideEffect*_ causes an exception. As I
> understand it, in this case the two should be equivalent. When used outside
> of an *_order().by()_* the _*select*_ steps work fine in my testing
>
> gremlin>
> g.inject('name').as('key').V().order().by(valueMap().select(select('key')).unfold()).values('name')
> ==>josh
> ==>lop
> ==>marko
> ==>peter
> ==>ripple
> ==>vadas
> gremlin>
> g.withSideEffect('key','name').V().order().by(valueMap().select(select('key')).unfold()).values('name')
> The provided traverser does not map to a value:
> v[1]->[PropertyMapStep(value), TraversalSelectStep([SelectOneStep(last,ke
> y)]), UnfoldStep]
> Type ':help' or ':h' for help.
> gremlin>
> g.withSideEffect('key','name').V().valueMap().select(select('key')).unfold()
> ==>marko
> ==>vadas
> ==>lop
> ==>josh
> ==>ripple
> ==>peter
--
This message was sent by Atlassian Jira
(v8.3.4#803005)