GitHub user okram opened a pull request:
https://github.com/apache/incubator-tinkerpop/pull/277
TINKERPOP-1236: SelectDenormalizationStrategy for select().by(starGraph) in
OLAP.
https://issues.apache.org/jira/browse/TINKERPOP-1236
This is massive. We have been plagued by
`select("a","b").by("name").by("age")`-style traversals not working in OLAP
because they are `PathProcessor` traversals are grab `ReferenceElements` out of
the LABELED_PATH. However, you can compile these to work:
``
select("a").by("name") -> select("a").map(values("name"))
select("a","b").by("name").by("age") ->
select("a").map(values("name")).as("a").select("b").map(values("name")).as("b").select(last,"a","b")
```
When we are able to drop path labels, we will be able to open up
`where(as("a").outE().count().is(gt(10))`-style traversals to OLAP as well.
Note that this type of `WhereTraversalStep` typically is used in conjunction
with `MatchStep` and `MatchPredicateStrategy` handles it appropriately so we
are not missing out too much.
CHANGELOG
```
* `select("a","b").by("name").by("age")`-style traversals now work in OLAP
with new `PathProcessorStrategy`.
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP-1236
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-tinkerpop/pull/277.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 #277
----
commit 7a52aa4ebd072cdacdf07005eb587815e39835e7
Author: Marko A. Rodriguez <[email protected]>
Date: 2016-03-25T15:01:19Z
Created SelectLinearizationStrategy which for OLAP. Right now, it just does
the easy part of making select('a').by('name') into
select('a').map(values('name')). This doesn't cover the full range of what we
want, but a start.
commit bb06ee5a6f2347fd0495485bbbaaedf5e049a438
Author: Marko A. Rodriguez <[email protected]>
Date: 2016-03-25T16:53:21Z
Merge branch 'master' into TINKERPOP-1236
commit 9ff33dda97a4fa1927f1689b19a04d7e2e2b2f9b
Author: Marko A. Rodriguez <[email protected]>
Date: 2016-03-25T19:24:44Z
Renamed SelectLinearizationStrategy to PathProcessorStrategy as it handles
SelectStep, SelectOneStep, and WhereTraversalStep. Opened up a bunch more tests
throughout in WhereTest, SelectTest, and MatchTest.
commit 69d8ce69c148481c88f733fe90b6076c6f3d0341
Author: Marko A. Rodriguez <[email protected]>
Date: 2016-03-25T19:50:47Z
added PathProcessStratergyTest to ensure that the compilation is as
expected. Found a bug around TraversalFilterStep conversion required when a
WhereTraversal is stripped of its start/end labels. Fixed. This is ready to go.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---