Hi Michael,

Yes, see ReducingBarrierStep :).

        
https://github.com/apache/incubator-tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/ReducingBarrierStep.java#L100

See a traverser is generated a fresh!

Marko.

http://markorodriguez.com

On Dec 9, 2015, at 3:17 PM, Michael Pollmeier <[email protected]> 
wrote:

> Sweet, that's what I was looking for. Just to confirm: the path history only 
> get's cleared for ReducingBarrierStep, not for the other BarrierSteps?
> 
> Do you happen to know where this is implemented in the tinkerpop3 codebase?
> 
> On 12/10/2015 03:00 AM, Marko Rodriguez wrote:
>> Hi Michael,
>> 
>> Every time there is a reducing barrier step, the path history is lost. Why, 
>> when you go many-to-one what is the path?
>> 
>>      
>> http://tinkerpop.apache.org/docs/3.1.0-incubating/#a-note-on-barrier-steps
>> 
>> In TinkerPop2, a reducing barrier would make the path of the yielded 
>> traverser be the path of the last reduced traverser. However, this is random 
>> as ordering is random. In TinkerPop3, it was decided best to just say "the 
>> path starts a fresh."
>> 
>> Thoughts?,
>> Marko.
>> 
>> http://markorodriguez.com
>> 
>> On Dec 8, 2015, at 9:16 PM, Michael Pollmeier <[email protected]> 
>> wrote:
>> 
>>> There are some steps that empty out the path, e.g. `mean`:
>>> 
>>> gremlin> g.E().as("a").values("weight").as("b").path()
>>> ==>[e[7][1-knows->2], 0.5]
>>> ==>[e[8][1-knows->4], 1.0]
>>> ==>[e[9][1-created->3], 0.4]
>>> ==>[e[10][4-created->5], 1.0]
>>> ==>[e[11][4-created->3], 0.4]
>>> ==>[e[12][6-created->3], 0.2]
>>> gremlin> g.E().as("a").values("weight").mean().as("b").path()
>>> ==>[0.5833333333333334]
>>> 
>>> Question: where does this 'emptying out' happen? How can I tell which steps 
>>> have this behaviour?
>>> 
>>> 
>>> Background: Gremlin-Scala preserves the type of every labelled step, so 
>>> that the `select` step returns a typed list (HList) of the labelled types.
>>> 
>>> Cheers
>>> Michael
>> 
>> 

Reply via email to