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/10/17 18:25:05 UTC
[jira] [Created] (TINKERPOP3-896) Simplify the {{withSack}} methods
of {{GraphTraversalSource}}.
Marko A. Rodriguez created TINKERPOP3-896:
---------------------------------------------
Summary: Simplify the {{withSack}} methods of {{GraphTraversalSource}}.
Key: TINKERPOP3-896
URL: https://issues.apache.org/jira/browse/TINKERPOP3-896
Project: TinkerPop 3
Issue Type: Improvement
Components: process
Affects Versions: 3.0.2-incubating
Reporter: Marko A. Rodriguez
Assignee: Marko A. Rodriguez
Fix For: 3.1.0-incubating
We currently have these method:
{code}
withSack(initialValue,splitOperator,mergeOperator)
{code}
I messed this up. It should be:
{code}
withSack(splitOperator,mergeOperator)
{code}
Why? Because we use {{new Traverser()}} at other points in the code besides just with the {{TraverserGenerators}} (e.g. reducing barriers). Dah! The way this should be done is:
{code}
g.withSack(splitOperator,mergeOperator).V().sack(1.0)....
{code}
This way, the user defines the sack value at the traversal level, not at the construction level and thus, any other constructions of a traverser don't have a sack value.
The other option is to simply say:
"Make sure your initial sack value is the identity in the set (given the merge operator)"
Where you will do:
{code}
g.withSack(0,sum).V().sack(1).blah.blah
{code}
This ensures that EVERY traverser in the computation has a sack value, but that if a traverser is created later in computation, its sack value is the identity. With that, we should change the term "initial value" to "identity value" so people understand the consequence of the logic.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)