You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2015/09/01 22:33:45 UTC

[jira] [Closed] (TINKERPOP3-796) Support merge binary operator for Gremlin sacks

     [ https://issues.apache.org/jira/browse/TINKERPOP3-796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marko A. Rodriguez closed TINKERPOP3-796.
-----------------------------------------
       Resolution: Implemented
    Fix Version/s: 3.1.0-incubating

This is now implemented. Note that this is a breaking change. For off, I made it so {{TraversalSideEffects}} doesn't return {{Optional}} for sack operators and values. Sacks are constantly being split and merged and this extra object wrapping into {{Optional}} is expensive. While we have been very keen on saying "optional everywhere," this is an exception to the mantra. Especially since this is very low level/vendor specific, I think its okay.

Next, so now there are two types of sack operators: split unary operator and merge binary operator.

I added {{SackFunctions.Barrier.normSack}} as a helper enum, but think we will fiddle with this location as {{3.1.0}} approaches.

> Support merge binary operator for Gremlin sacks
> -----------------------------------------------
>
>                 Key: TINKERPOP3-796
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-796
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: process
>            Reporter: Marko A. Rodriguez
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.1.0-incubating
>
>
> We originally had the merge capability with Gremlin sacks, but I removed it as there was a semantic problem when you merge + have bulk. For instance, suppose you sack is some "energy" between 0 and 1.0. When you split then the sack for each split traverser is, lets say, 0.5 and 0.5. Then lets say those two guys now merge on the next step. The sack would be 1.0 but your bulk would be 2 and thus, you have 2 energy (1.0 * 2). Its as if merging with sacks should ALSO dictate how bulks are merged.
> Given the complications at the time, I dropped the ability to merge sacks, but we will need it again, especially with some new work I want to do with "wave form Gremlin."



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)