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 2017/08/29 23:42:48 UTC
[1/4] tinkerpop git commit: tweaked how TraversalParent children are
processed in ComputerVerifiationStrategy. Given the outside-in nature of
Gremlin compilation, we were analyzing child traversals that were, in fact,
not compiled yet. We now check for l
Repository: tinkerpop
Updated Branches:
refs/heads/master 4d09fe540 -> d3220ab48
tweaked how TraversalParent children are processed in ComputerVerifiationStrategy. Given the outside-in nature of Gremlin compilation, we were analyzing child traversals that were, in fact, not compiled yet. We now check for local star graph issues on a per traversal level. I can't believe we didn't run into other problems before this.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c167d9ea
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c167d9ea
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c167d9ea
Branch: refs/heads/master
Commit: c167d9ea779ee2229e5cd56e35a37a6fd225ffc9
Parents: 7c954e9
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Aug 28 10:58:34 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Aug 28 10:58:34 2017 -0600
----------------------------------------------------------------------
.../ComputerVerificationStrategy.java | 24 ++++++--------------
.../ComputerVerificationStrategyTest.java | 4 ++++
2 files changed, 11 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c167d9ea/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
index 3a3c6e2..2d076b6 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
@@ -26,7 +26,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
import org.apache.tinkerpop.gremlin.process.traversal.step.PathProcessor;
-import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent;
import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectStep;
import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphStep;
@@ -38,7 +37,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
import java.util.Arrays;
import java.util.HashSet;
-import java.util.Optional;
import java.util.Set;
/**
@@ -56,7 +54,6 @@ public final class ComputerVerificationStrategy extends AbstractTraversalStrateg
@Override
public void apply(final Traversal.Admin<?, ?> traversal) {
-
if (!TraversalHelper.onGraphComputer(traversal))
return;
@@ -67,27 +64,20 @@ public final class ComputerVerificationStrategy extends AbstractTraversalStrateg
throw new VerificationException("Profiling a multi-VertexProgramStep traversal is currently not supported on GraphComputer", traversal);
}
- for (final Step<?, ?> step : traversal.getSteps()) {
-
- // you can not traverse past the local star graph with localChildren (e.g. by()-modulators).
- if (step instanceof TraversalParent) {
- final Optional<Traversal.Admin<Object, Object>> traversalOptional = ((TraversalParent) step).getLocalChildren().stream()
- .filter(t -> !TraversalHelper.isLocalStarGraph(t.asAdmin()))
- .findAny();
- if (traversalOptional.isPresent())
- throw new VerificationException("Local traversals may not traverse past the local star-graph on GraphComputer: " + traversalOptional.get(), traversal);
- }
+ // this is a problem because sideEffect.merge() is transient on the OLAP reduction
+ if (TraversalHelper.getRootTraversal(traversal).getTraverserRequirements().contains(TraverserRequirement.ONE_BULK))
+ throw new VerificationException("One bulk is currently not supported on GraphComputer: " + traversal, traversal);
- // this is a problem because sideEffect.merge() is transient on the OLAP reduction
- if (TraversalHelper.getRootTraversal(traversal).getTraverserRequirements().contains(TraverserRequirement.ONE_BULK))
- throw new VerificationException("One bulk is currently not supported on GraphComputer: " + step, traversal);
+ // you can not traverse past the local star graph with localChildren (e.g. by()-modulators).
+ if (!TraversalHelper.isGlobalChild(traversal) && !TraversalHelper.isLocalStarGraph(traversal))
+ throw new VerificationException("Local traversals may not traverse past the local star-graph on GraphComputer: " + traversal, traversal);
+ for (final Step<?, ?> step : traversal.getSteps()) {
if (step instanceof PathProcessor && ((PathProcessor) step).getMaxRequirement() != PathProcessor.ElementRequirement.ID)
throw new VerificationException("It is not possible to access more than a path element's id on GraphComputer: " + step + " requires " + ((PathProcessor) step).getMaxRequirement(), traversal);
if (UNSUPPORTED_STEPS.stream().filter(c -> c.isAssignableFrom(step.getClass())).findFirst().isPresent())
throw new VerificationException("The following step is currently not supported on GraphComputer: " + step, traversal);
-
}
Step<?, ?> nextParentStep = traversal.getParent().asStep();
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c167d9ea/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategyTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategyTest.java
index da41881..e594bd4 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategyTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategyTest.java
@@ -23,6 +23,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.P;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalStrategies;
import org.apache.tinkerpop.gremlin.process.traversal.util.EmptyTraversal;
import org.junit.Test;
@@ -34,6 +36,7 @@ import java.util.Arrays;
import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.max;
import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.min;
import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.out;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.outE;
import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.sum;
import static org.junit.Assert.fail;
@@ -53,6 +56,7 @@ public class ComputerVerificationStrategyTest {
{"__.values(\"age\").union(max(), min(), sum())", __.values("age").union(max(), min(), sum()), true},
{"__.count().sum()", __.count().sum(), true},
{"__.where(\"a\",eq(\"b\")).out()", __.where("a", P.eq("b")).out(), true},
+ {"__.where(and(outE(\"knows\"),outE(\"created\"))).values(\"name\")", __.where(__.and(outE("knows"), outE("created"))).values("name"), true},
});
}
[2/4] tinkerpop git commit: updated CHANGELOG.
Posted by ok...@apache.org.
updated CHANGELOG.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/eb1be4dc
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/eb1be4dc
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/eb1be4dc
Branch: refs/heads/master
Commit: eb1be4dcfb6053ff65aae6805db61e6556c22384
Parents: c167d9e
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Aug 28 11:04:12 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Aug 28 11:04:12 2017 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/eb1be4dc/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 9fff535..1ffa315 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
TinkerPop 3.2.7 (Release Date: NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Fixed a bug in `ComputerVerificationStrategy` where child traversals were being analyzed prior to compilation.
* Fixed a bug that prevented Gremlin from ordering lists and streams made of mixed number types.
[3/4] tinkerpop git commit: Merge branch 'TINKERPOP-1760' into tp32
Posted by ok...@apache.org.
Merge branch 'TINKERPOP-1760' into tp32
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/74f10b13
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/74f10b13
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/74f10b13
Branch: refs/heads/master
Commit: 74f10b1349ac4217a66be64431ef99b4388633bc
Parents: b5836ed eb1be4d
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Aug 29 17:42:25 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Aug 29 17:42:25 2017 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../ComputerVerificationStrategy.java | 24 ++++++--------------
.../ComputerVerificationStrategyTest.java | 4 ++++
3 files changed, 12 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/74f10b13/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --cc CHANGELOG.asciidoc
index d62df5c,1ffa315..fc0b9ef
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,8 -26,7 +26,9 @@@ image::https://raw.githubusercontent.co
TinkerPop 3.2.7 (Release Date: NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Ensured that plugins were applied in the order they were configured.
+* Fixed a bug in `Neo4jGremlinPlugin` that prevented it from loading properly in the `GremlinPythonScriptEngine`.
+ * Fixed a bug in `ComputerVerificationStrategy` where child traversals were being analyzed prior to compilation.
* Fixed a bug that prevented Gremlin from ordering lists and streams made of mixed number types.
[4/4] tinkerpop git commit: Merge branch 'tp32'
Posted by ok...@apache.org.
Merge branch 'tp32'
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d3220ab4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d3220ab4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d3220ab4
Branch: refs/heads/master
Commit: d3220ab48374cae7927744e6c5e87ee2d305a7f2
Parents: 4d09fe5 74f10b1
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Aug 29 17:42:39 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Aug 29 17:42:39 2017 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../ComputerVerificationStrategy.java | 24 ++++++--------------
.../ComputerVerificationStrategyTest.java | 4 ++++
3 files changed, 12 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d3220ab4/CHANGELOG.asciidoc
----------------------------------------------------------------------