This is working as designed because you are using simplePath
Cheers, Kelvin > On Dec 23, 2021, at 3:31 PM, Fredrick Eisele (Jira) <[email protected]> wrote: > > > [ > https://issues.apache.org/jira/browse/TINKERPOP-2674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel > ] > > Fredrick Eisele updated TINKERPOP-2674: > --------------------------------------- > Description: > The inclusion of the `select()` step changes the result when it should not. > > Steps to replicate. > Given a graph: > {code:groovy} > g.addV('[avm]Design').as('root'). > property('VertexLabel','[avm]Design'). > property('uuid','SRC_UUID'). > property('[]Name', 'Axe'). > addV('[]RootContainer').as('rc'). > property('VertexLabel','[]RootContainer'). > property('[]Name','Axe'). > addV('[]Property').as('p1'). > property('VertexLabel','[]Property'). > property('[]XPosition','56'). > addV('[]Value').as('v1'). > property('VertexLabel','[]Value'). > property('[]stuff','12'). > addV('[]Property').as('p2'). > property('VertexLabel','[]Property'). > property('[]XPosition','80'). > addV('[]Value').as('v2'). > property('VertexLabel','[]Value'). > property('[]stuff','90'). > addE('inside').from('rc').to('root'). > addE('inside').from('p1').to('rc'). > addE('inside').from('v1').to('p1'). > addE('inside').from('p2').to('rc'). > addE('inside').from('v2').to('p2'). > iterate() > {code} > The following two queries {color:#FF0000}*incorrectly*{color} produce > different results. > This first query produces a list of all the vertices with the exception of > 'r0'. > {code:groovy} > g.V(). > has('[avm]Design', 'uuid', 'SRC_UUID').as('r0'). > repeat(__.in('inside').simplePath()). > emit(). > until(__.in('inside').count().is(0)). > toList() > {code} > The addition of the `select('r0')` step in this query causes no vertices to > be returned. > {code:groovy} > g.V(). > has('[avm]Design', 'uuid', 'SRC_UUID').as('r0'). > select('r0'). > repeat(__.in('inside').simplePath()). > emit(). > until(__.in('inside').count().is(0)). > toList() > {code} > > was: > The inclusion of the `select()` step changes the result when it should not. > > Steps to replicate. > Given a graph: > {code:groovy} > g.addV('[avm]Design').as('root'). > property('VertexLabel','[avm]Design'). > property('uuid','SRC_UUID'). > property('[]Name', 'Axe'). > addV('[]RootContainer').as('rc'). > property('VertexLabel','[]RootContainer'). > property('[]Name','Axe'). > addV('[]Property').as('p1'). > property('VertexLabel','[]Property'). > property('[]XPosition','56'). > addV('[]Value').as('v1'). > property('VertexLabel','[]Value'). > property('[]stuff','12'). > addV('[]Property').as('p2'). > property('VertexLabel','[]Property'). > property('[]XPosition','80'). > addV('[]Value').as('v2'). > property('VertexLabel','[]Value'). > property('[]stuff','90'). > addE('inside').from('rc').to('root'). > addE('inside').from('p1').to('rc'). > addE('inside').from('v1').to('p1'). > addE('inside').from('p2').to('rc'). > addE('inside').from('v2').to('p2'). > iterate() > {code} > The following two queries produce different results. > This first query produces a list of all the vertices with the exception of > 'r0'. > > {code:groovy} > g.V(). > has('[avm]Design', 'uuid', 'SRC_UUID').as('r0'). > repeat(__.in('inside').simplePath()). > emit(). > until(__.in('inside').count().is(0)). > toList() > {code} > The addition of the `select('r0')` step in this query causes no vertices to > be returned. > > {code:groovy} > g.V(). > has('[avm]Design', 'uuid', 'SRC_UUID').as('r0'). > select('r0'). > repeat(__.in('inside').simplePath()). > emit(). > until(__.in('inside').count().is(0)). > toList() > {code} > > > >> `as('a')` step followed by `select('a')` not behaving as expected >> ----------------------------------------------------------------- >> >> Key: TINKERPOP-2674 >> URL: https://issues.apache.org/jira/browse/TINKERPOP-2674 >> Project: TinkerPop >> Issue Type: Bug >> Components: tinkergraph >> Affects Versions: 3.5.1 >> Reporter: Fredrick Eisele >> Priority: Major >> >> The inclusion of the `select()` step changes the result when it should not. >> Steps to replicate. >> Given a graph: >> {code:groovy} >> g.addV('[avm]Design').as('root'). >> property('VertexLabel','[avm]Design'). >> property('uuid','SRC_UUID'). >> property('[]Name', 'Axe'). >> addV('[]RootContainer').as('rc'). >> property('VertexLabel','[]RootContainer'). >> property('[]Name','Axe'). >> addV('[]Property').as('p1'). >> property('VertexLabel','[]Property'). >> property('[]XPosition','56'). >> addV('[]Value').as('v1'). >> property('VertexLabel','[]Value'). >> property('[]stuff','12'). >> addV('[]Property').as('p2'). >> property('VertexLabel','[]Property'). >> property('[]XPosition','80'). >> addV('[]Value').as('v2'). >> property('VertexLabel','[]Value'). >> property('[]stuff','90'). >> addE('inside').from('rc').to('root'). >> addE('inside').from('p1').to('rc'). >> addE('inside').from('v1').to('p1'). >> addE('inside').from('p2').to('rc'). >> addE('inside').from('v2').to('p2'). >> iterate() >> {code} >> The following two queries {color:#FF0000}*incorrectly*{color} produce >> different results. >> This first query produces a list of all the vertices with the exception of >> 'r0'. >> {code:groovy} >> g.V(). >> has('[avm]Design', 'uuid', 'SRC_UUID').as('r0'). >> repeat(__.in('inside').simplePath()). >> emit(). >> until(__.in('inside').count().is(0)). >> toList() >> {code} >> The addition of the `select('r0')` step in this query causes no vertices to >> be returned. >> {code:groovy} >> g.V(). >> has('[avm]Design', 'uuid', 'SRC_UUID').as('r0'). >> select('r0'). >> repeat(__.in('inside').simplePath()). >> emit(). >> until(__.in('inside').count().is(0)). >> toList() >> {code} > > > > -- > This message was sent by Atlassian Jira > (v8.20.1#820001)
