[ https://issues.apache.org/jira/browse/TINKERPOP-2344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Mallette closed TINKERPOP-2344. --------------------------------------- Resolution: Not A Problem This issue is really "do while" vs "while do" - in that context I suppose it makes sense. Nothing to do here. > Consistency of times(0) and times(1) > ------------------------------------ > > Key: TINKERPOP-2344 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2344 > Project: TinkerPop > Issue Type: Improvement > Components: process > Affects Versions: 3.3.10 > Reporter: Stephen Mallette > Priority: Minor > > Interesting that these two queries return the same thing: > {code} > gremlin> g.V(1).repeat(both()).times(0) > ==>v[3] > ==>v[2] > ==>v[4] > gremlin> g.V(1).repeat(both()).times(1) > ==>v[3] > ==>v[2] > ==>v[4] > {code} > but compile differently: > {code} > gremlin> g.V(1).repeat(both()).times(0).explain() > ==>Traversal Explanation > ================================================================================================================================================== > Original Traversal [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > ConnectiveStrategy [D] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > MatchPredicateStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > FilterRankingStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > EarlyLimitStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > InlineFilterStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > IncidentToAdjacentStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > AdjacentToIncidentStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > RepeatUnrollStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > CountStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > PathRetractionStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > LazyBarrierStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > TinkerGraphCountStrategy [P] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > ProfileStrategy [F] [TinkerGraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > Final Traversal [TinkerGraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(0)),emit(false))] > gremlin> g.V(1).repeat(both()).times(1).explain() > ==>Traversal Explanation > ============================================================================================================================================ > Original Traversal [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(1)),emit(false))] > ConnectiveStrategy [D] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(1)),emit(false))] > MatchPredicateStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(1)),emit(false))] > FilterRankingStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(1)),emit(false))] > EarlyLimitStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(1)),emit(false))] > InlineFilterStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(1)),emit(false))] > IncidentToAdjacentStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(1)),emit(false))] > AdjacentToIncidentStrategy [O] [GraphStep(vertex,[1]), > RepeatStep([VertexStep(BOTH,vertex), > RepeatEndStep],until(loops(1)),emit(false))] > RepeatUnrollStrategy [O] [GraphStep(vertex,[1]), > VertexStep(BOTH,vertex), NoOpBarrierStep(2500)] > CountStrategy [O] [GraphStep(vertex,[1]), > VertexStep(BOTH,vertex), NoOpBarrierStep(2500)] > PathRetractionStrategy [O] [GraphStep(vertex,[1]), > VertexStep(BOTH,vertex), NoOpBarrierStep(2500)] > LazyBarrierStrategy [O] [GraphStep(vertex,[1]), > VertexStep(BOTH,vertex), NoOpBarrierStep(2500)] > TinkerGraphCountStrategy [P] [GraphStep(vertex,[1]), > VertexStep(BOTH,vertex), NoOpBarrierStep(2500)] > TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[1]), > VertexStep(BOTH,vertex), NoOpBarrierStep(2500)] > ProfileStrategy [F] [TinkerGraphStep(vertex,[1]), > VertexStep(BOTH,vertex), NoOpBarrierStep(2500)] > StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[1]), > VertexStep(BOTH,vertex), NoOpBarrierStep(2500)] > Final Traversal [TinkerGraphStep(vertex,[1]), > VertexStep(BOTH,vertex), NoOpBarrierStep(2500)] > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)