[
https://issues.apache.org/jira/browse/TINKERPOP-1606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15828937#comment-15828937
]
ASF GitHub Bot commented on TINKERPOP-1606:
-------------------------------------------
GitHub user okram opened a pull request:
https://github.com/apache/tinkerpop/pull/539
TINKERPOP-1606: Refactor GroupStep to not have the reduction traversal
included in its BiOperator.
https://issues.apache.org/jira/browse/TINKERPOP-1606
This is huge. With this PR and https://github.com/apache/tinkerpop/pull/538
we will no longer have any reducers that require a `Traversal` in its
representation. This will remove a great number of problems associated with
maintaining state in a reducer. Moreover, OLAP `group()` had peculiarities
associated with the fact that the `valueTraversal` was detached from the root
traversal and thus, side-effects were not accessible. This is no longer the
case. `GroupStep` and `GroupSideEffectStep` have been completely refactored to
only require a `BinaryOperator`-based reducer. This is going to make my life
soooooooooo much easier (you don't know the troubles I've suffered because of
stateful reducers).
Note that this PR is headed to `master/` given heavy rewrite of
`GroupStep.GroupBiOperator`.
VOTE +1.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1606
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/539.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #539
----
commit f53327b7fe7ba927a04400739d30b9f28ec85ac2
Author: Marko A. Rodriguez <[email protected]>
Date: 2017-01-18T21:17:35Z
Got a super simple implementation of GroupStep working. Tada. I think I can
get it even simpler too....
commit fe470e7cc379e502eae7d14f9c8728ffd3762136
Author: Marko A. Rodriguez <[email protected]>
Date: 2017-01-18T22:49:01Z
wow. I can't believe I did it. With this branch and the ProjectedTraverser
branch, there are no reducers that take a Traversal. At most they are take a
BinaryOperator and thus, are stateless. This is huge. So many errant bugs will
go away. Best of all, GroupStep and GroupSideEffectStep are crazy simple now.
Like basic (and way more efficient).
----
> Refactor GroupStep to not have the reduction traversal included in its
> BiOperator.
> ----------------------------------------------------------------------------------
>
> Key: TINKERPOP-1606
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1606
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.2.3
> Reporter: Marko A. Rodriguez
> Assignee: Marko A. Rodriguez
>
> {{GroupStep}} has a complicated {{BiOperator}} (its reducer). I believe we
> can simplify it significantly by considering only two states.
> 1. A {{by()}}-modulation that does NOT have a {{Barrier}}.
> 2. A {{by()}}-modulation that DOES have a {{Barrier}}.
> For the first, simply store a single {{Traverser}}. No need to aggregate all
> traversers as only one will ultimately be emitted.
> For the latter, simply store the barrier's BiOperator (NOT the step itself).
> In this way, we will no longer have to encode a traversal in the reducer and
> thus, will remove various potential problems associated with detached
> traversals.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)