You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/03/17 20:12:37 UTC

[4/4] incubator-tinkerpop git commit: updated CHANGELOG and UPGRADE docs. Fixed a type in the HasTest that MikeDias discovered.

updated CHANGELOG and UPGRADE docs. Fixed a type in the HasTest that MikeDias discovered.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/9f6df78f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/9f6df78f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/9f6df78f

Branch: refs/heads/master
Commit: 9f6df78f0d0d4cd307ada773187032e49d696e09
Parents: a8cefb0
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Thu Mar 17 13:12:25 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Thu Mar 17 13:12:25 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  3 +++
 .../upgrade/release-3.2.x-incubating.asciidoc   | 21 ++++++++++++++++++++
 .../process/traversal/step/filter/HasTest.java  |  2 +-
 3 files changed, 25 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9f6df78f/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index bad4523..a5aea3b 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -24,6 +24,9 @@ TinkerPop 3.2.0 (XXX)
 TinkerPop 3.2.0 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Added `GraphStep.addIds()` which is useful for `HasContainer` "fold ins."
+* Added a static `GraphStep.processHashContainerIds()` helper for handling id-based `HasContainers`.
+* `GraphStep` implementations should have `g.V().hasId(x)` and `g.V(x)` compile equivalently. (*breaking*)
 * Optimized `ExpandableStepIterator` with simpler logic and increased the likelihood of bulking.
 * Optimized `TraverserRequirement` calculations.
 * `Step.processNextStart()` and `Step.next()` now return `Traverser.Admin<E>`. (*breaking*)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9f6df78f/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 1b85738..4ad4299 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -181,6 +181,27 @@ Upgrading for Providers
 Graph System Providers
 ^^^^^^^^^^^^^^^^^^^^^^
 
+GraphStep Compilation Requirement
++++++++++++++++++++++++++++++++++
+
+OLTP graph providers that have a custom `GraphStep` implementation should ensure that `g.V().hasId(x)` and `g.V(x)` compile
+to the same representation. This ensures a consistent user experience around random access of elements based on ids
+(as opposed to potentially the former doing a linear scan). A static helper method called `GraphStep.processHasContainerIds()`
+has been added. `TinkerGraphStepStrategy` was updated as such:
+
+```
+((HasContainerHolder) currentStep).getHasContainers().forEach(tinkerGraphStep::addHasContainer);
+```
+
+is now
+
+```
+((HasContainerHolder) currentStep).getHasContainers().forEach(hasContainer -> {
+  if (!GraphStep.processHasContainerIds(tinkerGraphStep, hasContainer))
+    tinkerGraphStep.addHasContainer(hasContainer);
+});
+```
+
 Step API Update
 +++++++++++++++
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9f6df78f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
index f544313..3cc94e8 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
@@ -376,7 +376,7 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
         printTraversalForm(traversala1);
         printTraversalForm(traversala2);
         printTraversalForm(traversalb1);
-        printTraversalForm(traversala2);
+        printTraversalForm(traversalb2);
         checkResults(Collections.singletonList(convertToVertex(graph, "marko")), traversala1);
         checkResults(Collections.singletonList(convertToVertex(graph, "marko")), traversala2);
         checkResults(Arrays.asList(convertToVertex(graph, "marko"), convertToVertex(graph, "vadas")), traversalb1);