tinkerpop git commit: foo
Repository: tinkerpop Updated Branches: refs/heads/TRAVIS-TEST-tp33 e8593192a -> b6b74e94e foo Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b6b74e94 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b6b74e94 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b6b74e94 Branch: refs/heads/TRAVIS-TEST-tp33 Commit: b6b74e94ec32104d631bcccbfb27c9fd9b780b6e Parents: e859319 Author: Daniel KuppitzAuthored: Thu Mar 15 22:47:48 2018 -0700 Committer: Daniel Kuppitz Committed: Thu Mar 15 22:47:48 2018 -0700 -- .../strategy/decoration/SubgraphStrategyProcessTest.java | 2 -- .../optimization/IncidentToAdjacentStrategyProcessTest.java | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b6b74e94/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java -- diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java index 15b1da5..10473a8 100644 --- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java +++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategyProcessTest.java @@ -31,9 +31,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TraversalFilterStep; import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy; -import org.apache.tinkerpop.gremlin.process.traversal.traverser.B_LP_O_P_S_SE_SL_Traverser; import org.apache.tinkerpop.gremlin.process.traversal.traverser.B_LP_O_P_S_SE_SL_TraverserGenerator; -import org.apache.tinkerpop.gremlin.process.traversal.traverser.B_O_Traverser; import org.apache.tinkerpop.gremlin.process.traversal.traverser.B_O_TraverserGenerator; import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; import org.apache.tinkerpop.gremlin.structure.Column; http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b6b74e94/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyProcessTest.java -- diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyProcessTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyProcessTest.java index bdea707..8f640f3 100644 --- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyProcessTest.java +++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyProcessTest.java @@ -21,11 +21,9 @@ package org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization; import org.apache.tinkerpop.gremlin.LoadGraphWith; import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest; import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner; -import org.apache.tinkerpop.gremlin.process.remote.RemoteGraph; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.process.traversal.traverser.B_O_TraverserGenerator; -import org.hamcrest.Matchers; import org.junit.Test; import org.junit.runner.RunWith; @@ -41,7 +39,7 @@ public class IncidentToAdjacentStrategyProcessTest extends AbstractGremlinProces @Test @LoadGraphWith(MODERN) -public void shouldInvalidateTraverserRequirementsIfNecessary() throws Exception { +public void shouldGenerateCorrectTraversers() throws Exception { final GraphTraversalSource itag = g.withStrategies(IncidentToAdjacentStrategy.instance());
tinkerpop git commit: CTR: Reverted most of the previous changes around the invalidation of traverser requirements. It turned out that `PathRetractionStrategy` was to blame for too early caching of re
Repository: tinkerpop Updated Branches: refs/heads/TRAVIS-TEST-tp33 [created] e8593192a CTR: Reverted most of the previous changes around the invalidation of traverser requirements. It turned out that `PathRetractionStrategy` was to blame for too early caching of requirements. The problem is that `PathRetractionStrategy` processes all child traversals before other strategies even had the chance to mutate them. So in order to fix the problem, I used the same anti-pattern (process all child traversals immediately) in the 2 strategies that can potentially mutate the traversal in a way that its requirements change (`SubgraphStrategy` and `IncidentToAdjacentStrategy`). Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e8593192 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e8593192 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e8593192 Branch: refs/heads/TRAVIS-TEST-tp33 Commit: e8593192a8f1dd9a401fe11a0500770e17802dd8 Parents: 00b5a69 Author: Daniel KuppitzAuthored: Thu Mar 15 09:08:02 2018 -0700 Committer: Daniel Kuppitz Committed: Thu Mar 15 21:16:33 2018 -0700 -- .../step/map/TraversalVertexProgramStep.java| 3 +++ .../traversal/AbstractRemoteTraversal.java | 5 - .../gremlin/process/traversal/Traversal.java| 10 - .../lambda/AbstractLambdaTraversal.java | 7 --- .../strategy/decoration/SubgraphStrategy.java | 22 +++- .../IncidentToAdjacentStrategy.java | 15 - .../traversal/util/DefaultTraversal.java| 9 .../decoration/SubgraphStrategyProcessTest.java | 2 +- .../IncidentToAdjacentStrategyProcessTest.java | 3 --- 9 files changed, 26 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e8593192/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java index a591a25..642ad00 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java @@ -24,11 +24,14 @@ import org.apache.tinkerpop.gremlin.process.computer.GraphFilter; import org.apache.tinkerpop.gremlin.process.computer.Memory; import org.apache.tinkerpop.gremlin.process.computer.traversal.MemoryTraversalSideEffects; import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram; +import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy; +import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.finalization.ComputerFinalizationStrategy; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; +import org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalStrategies; import org.apache.tinkerpop.gremlin.process.traversal.util.PureTraversal; import org.apache.tinkerpop.gremlin.structure.Graph; import org.apache.tinkerpop.gremlin.structure.util.StringFactory; http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e8593192/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/AbstractRemoteTraversal.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/AbstractRemoteTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/AbstractRemoteTraversal.java index 480d1fc..0c6a7aa 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/AbstractRemoteTraversal.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/AbstractRemoteTraversal.java @@ -88,11 +88,6 @@ public abstract class AbstractRemoteTraversal implements RemoteTraversal
tinkerpop git commit: CTR: Reverted most of the previous changes around the invalidation of traverser requirements. It turned out that `PathRetractionStrategy` was to blame for too early caching of re
Repository: tinkerpop Updated Branches: refs/heads/TRAVIS-TEST b7ed64d61 -> 3835141aa (forced update) CTR: Reverted most of the previous changes around the invalidation of traverser requirements. It turned out that `PathRetractionStrategy` was to blame for too early caching of requirements. The problem is that `PathRetractionStrategy` processes all child traversals before other strategies even had the chance to mutate them. So in order to fix the problem, I used the same anti-pattern (process all child traversals immediately) in the 2 strategies that can potentially mutate the traversal in a way that its requirements change (`SubgraphStrategy` and `IncidentToAdjacentStrategy`). Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3835141a Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3835141a Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3835141a Branch: refs/heads/TRAVIS-TEST Commit: 3835141aa8cb21438fadf9069fc4fb6cecb9c416 Parents: f2f0cbd Author: Daniel KuppitzAuthored: Thu Mar 15 09:08:02 2018 -0700 Committer: Daniel Kuppitz Committed: Thu Mar 15 21:10:45 2018 -0700 -- .../step/map/TraversalVertexProgramStep.java| 3 +++ .../traversal/AbstractRemoteTraversal.java | 5 - .../gremlin/process/traversal/Traversal.java| 10 - .../lambda/AbstractLambdaTraversal.java | 7 --- .../strategy/decoration/SubgraphStrategy.java | 22 +++- .../IncidentToAdjacentStrategy.java | 15 - .../traversal/util/DefaultTraversal.java| 9 .../decoration/SubgraphStrategyProcessTest.java | 2 +- .../IncidentToAdjacentStrategyProcessTest.java | 3 --- 9 files changed, 26 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3835141a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java index a591a25..642ad00 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/TraversalVertexProgramStep.java @@ -24,11 +24,14 @@ import org.apache.tinkerpop.gremlin.process.computer.GraphFilter; import org.apache.tinkerpop.gremlin.process.computer.Memory; import org.apache.tinkerpop.gremlin.process.computer.traversal.MemoryTraversalSideEffects; import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram; +import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy; +import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.finalization.ComputerFinalizationStrategy; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies; import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; +import org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalStrategies; import org.apache.tinkerpop.gremlin.process.traversal.util.PureTraversal; import org.apache.tinkerpop.gremlin.structure.Graph; import org.apache.tinkerpop.gremlin.structure.util.StringFactory; http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3835141a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/AbstractRemoteTraversal.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/AbstractRemoteTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/AbstractRemoteTraversal.java index 480d1fc..0c6a7aa 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/AbstractRemoteTraversal.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/AbstractRemoteTraversal.java @@ -88,11 +88,6 @@ public abstract class AbstractRemoteTraversal implements RemoteTraversal
[1/2] tinkerpop git commit: Cleaned up the sink dataset a bit.
Repository: tinkerpop Updated Branches: refs/heads/tp33 4a838c0f4 -> 00b5a69f9 Cleaned up the sink dataset a bit. Introduced more consistent,general property/label names. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d3d1ccfa Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d3d1ccfa Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d3d1ccfa Branch: refs/heads/tp33 Commit: d3d1ccfa673765085e6299cfbf0c17ccd3318e88 Parents: 0bf9b2f Author: Stephen MalletteAuthored: Thu Mar 15 18:37:28 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 18:37:28 2018 -0400 -- data/tinkerpop-sink-typed.json | 4 ++-- data/tinkerpop-sink-v2d0-typed.json| 4 ++-- data/tinkerpop-sink-v2d0.json | 4 ++-- data/tinkerpop-sink.json | 4 ++-- data/tinkerpop-sink.kryo | Bin 288 -> 234 bytes .../io/graphson/tinkerpop-sink-typed.json | 4 ++-- .../io/graphson/tinkerpop-sink-v2d0-typed.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink-v2d0.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink.json | 4 ++-- .../gremlin/structure/io/gryo/tinkerpop-sink.kryo | Bin 288 -> 234 bytes .../tinkergraph/structure/TinkerFactory.java | 11 --- 11 files changed, 20 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d3d1ccfa/data/tinkerpop-sink-typed.json -- diff --git a/data/tinkerpop-sink-typed.json b/data/tinkerpop-sink-typed.json index bc56489..2e83384 100644 --- a/data/tinkerpop-sink-typed.json +++ b/data/tinkerpop-sink-typed.json @@ -1,3 +1,3 @@ -{"@class":"java.util.HashMap","id":2000,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}} -{"@class":"java.util.HashMap","id":2001,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}} +{"@class":"java.util.HashMap","id":2000,"label":"message","inE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}} +{"@class":"java.util.HashMap","id":2001,"label":"message","inE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}} {"@class":"java.util.HashMap","id":1000,"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"outV":1000}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"inV":1000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",0],"value":"loop"}]]}} http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d3d1ccfa/data/tinkerpop-sink-v2d0-typed.json -- diff --git a/data/tinkerpop-sink-v2d0-typed.json b/data/tinkerpop-sink-v2d0-typed.json index c0844a3..7a27853 100644 --- a/data/tinkerpop-sink-v2d0-typed.json +++ b/data/tinkerpop-sink-v2d0-typed.json @@ -1,3 +1,3 @@
[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Conflicts: data/tinkerpop-sink.json gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/00b5a69f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/00b5a69f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/00b5a69f Branch: refs/heads/master Commit: 00b5a69f96f3378f93ab8a18226be55f099f569d Parents: 4a838c0 d3d1ccf Author: Stephen MalletteAuthored: Thu Mar 15 18:44:00 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 18:44:00 2018 -0400 -- data/tinkerpop-sink.json | 4 ++-- data/tinkerpop-sink.kryo | Bin 288 -> 234 bytes .../io/graphson/tinkerpop-sink-typed-v1d0.json | 4 ++-- .../io/graphson/tinkerpop-sink-typed-v2d0.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink-v1d0.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink-v2d0.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink-v3d0.json | 4 ++-- .../structure/io/gryo/tinkerpop-sink-v1d0.kryo | Bin 288 -> 234 bytes .../structure/io/gryo/tinkerpop-sink-v3d0.kryo | Bin 288 -> 234 bytes .../tinkergraph/structure/TinkerFactory.java | 11 --- 10 files changed, 16 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00b5a69f/data/tinkerpop-sink.json -- diff --cc data/tinkerpop-sink.json index c0844a3,420e089..7a27853 --- a/data/tinkerpop-sink.json +++ b/data/tinkerpop-sink.json @@@ -1,3 -1,3 +1,3 @@@ - {"id":{"@type":"g:Int32","@value":2000},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":5},"outV":{"@type":"g:Int32","@value":2000}}]},"outE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"inV":{"@type":"g:Int32","@value":2001}},{"id":{"@type":"g:Int32","@value":5},"inV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":2},"value":"a"}]}} - {"id":{"@type":"g:Int32","@value":2001},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"outV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":3},"value":"b"}]}} -{"id":2000,"label":"message","inE":{"link":[{"id":5,"outV":2000}]},"outE":{"link":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"name":[{"id":2,"value":"a"}]}} -{"id":2001,"label":"message","inE":{"link":[{"id":4,"outV":2000}]},"properties":{"name":[{"id":3,"value":"b"}]}} -{"id":1000,"label":"loops","inE":{"self":[{"id":1,"outV":1000}]},"outE":{"self":[{"id":1,"inV":1000}]},"properties":{"name":[{"id":0,"value":"loop"}]}} ++{"id":{"@type":"g:Int32","@value":2000},"label":"message","inE":{"link":[{"id":{"@type":"g:Int32","@value":5},"outV":{"@type":"g:Int32","@value":2000}}]},"outE":{"link":[{"id":{"@type":"g:Int32","@value":4},"inV":{"@type":"g:Int32","@value":2001}},{"id":{"@type":"g:Int32","@value":5},"inV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":2},"value":"a"}]}} ++{"id":{"@type":"g:Int32","@value":2001},"label":"message","inE":{"link":[{"id":{"@type":"g:Int32","@value":4},"outV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":3},"value":"b"}]}} +{"id":{"@type":"g:Int32","@value":1000},"label":"loops","inE":{"self":[{"id":{"@type":"g:Int32","@value":1},"outV":{"@type":"g:Int32","@value":1000}}]},"outE":{"self":[{"id":{"@type":"g:Int32","@value":1},"inV":{"@type":"g:Int32","@value":1000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":0},"value":"loop"}]}} http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00b5a69f/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed-v1d0.json -- diff --cc gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed-v1d0.json index bc56489,000..2e83384 mode 100644,00..100644 --- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed-v1d0.json +++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed-v1d0.json @@@ -1,3 -1,0 +1,3 @@@ -
[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Conflicts: data/tinkerpop-sink.json gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed.json gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink.json Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/00b5a69f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/00b5a69f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/00b5a69f Branch: refs/heads/tp33 Commit: 00b5a69f96f3378f93ab8a18226be55f099f569d Parents: 4a838c0 d3d1ccf Author: Stephen MalletteAuthored: Thu Mar 15 18:44:00 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 18:44:00 2018 -0400 -- data/tinkerpop-sink.json | 4 ++-- data/tinkerpop-sink.kryo | Bin 288 -> 234 bytes .../io/graphson/tinkerpop-sink-typed-v1d0.json | 4 ++-- .../io/graphson/tinkerpop-sink-typed-v2d0.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink-v1d0.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink-v2d0.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink-v3d0.json | 4 ++-- .../structure/io/gryo/tinkerpop-sink-v1d0.kryo | Bin 288 -> 234 bytes .../structure/io/gryo/tinkerpop-sink-v3d0.kryo | Bin 288 -> 234 bytes .../tinkergraph/structure/TinkerFactory.java | 11 --- 10 files changed, 16 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00b5a69f/data/tinkerpop-sink.json -- diff --cc data/tinkerpop-sink.json index c0844a3,420e089..7a27853 --- a/data/tinkerpop-sink.json +++ b/data/tinkerpop-sink.json @@@ -1,3 -1,3 +1,3 @@@ - {"id":{"@type":"g:Int32","@value":2000},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":5},"outV":{"@type":"g:Int32","@value":2000}}]},"outE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"inV":{"@type":"g:Int32","@value":2001}},{"id":{"@type":"g:Int32","@value":5},"inV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":2},"value":"a"}]}} - {"id":{"@type":"g:Int32","@value":2001},"label":"message_passing_test","inE":{"msg_pass_test_edge":[{"id":{"@type":"g:Int32","@value":4},"outV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":3},"value":"b"}]}} -{"id":2000,"label":"message","inE":{"link":[{"id":5,"outV":2000}]},"outE":{"link":[{"id":4,"inV":2001},{"id":5,"inV":2000}]},"properties":{"name":[{"id":2,"value":"a"}]}} -{"id":2001,"label":"message","inE":{"link":[{"id":4,"outV":2000}]},"properties":{"name":[{"id":3,"value":"b"}]}} -{"id":1000,"label":"loops","inE":{"self":[{"id":1,"outV":1000}]},"outE":{"self":[{"id":1,"inV":1000}]},"properties":{"name":[{"id":0,"value":"loop"}]}} ++{"id":{"@type":"g:Int32","@value":2000},"label":"message","inE":{"link":[{"id":{"@type":"g:Int32","@value":5},"outV":{"@type":"g:Int32","@value":2000}}]},"outE":{"link":[{"id":{"@type":"g:Int32","@value":4},"inV":{"@type":"g:Int32","@value":2001}},{"id":{"@type":"g:Int32","@value":5},"inV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":2},"value":"a"}]}} ++{"id":{"@type":"g:Int32","@value":2001},"label":"message","inE":{"link":[{"id":{"@type":"g:Int32","@value":4},"outV":{"@type":"g:Int32","@value":2000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":3},"value":"b"}]}} +{"id":{"@type":"g:Int32","@value":1000},"label":"loops","inE":{"self":[{"id":{"@type":"g:Int32","@value":1},"outV":{"@type":"g:Int32","@value":1000}}]},"outE":{"self":[{"id":{"@type":"g:Int32","@value":1},"inV":{"@type":"g:Int32","@value":1000}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":0},"value":"loop"}]}} http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/00b5a69f/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed-v1d0.json -- diff --cc gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed-v1d0.json index bc56489,000..2e83384 mode 100644,00..100644 --- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed-v1d0.json +++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/tinkerpop-sink-typed-v1d0.json @@@ -1,3 -1,0 +1,3 @@@ -
tinkerpop git commit: Cleaned up the sink dataset a bit.
Repository: tinkerpop Updated Branches: refs/heads/tp32 0bf9b2f71 -> d3d1ccfa6 Cleaned up the sink dataset a bit. Introduced more consistent,general property/label names. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d3d1ccfa Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d3d1ccfa Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d3d1ccfa Branch: refs/heads/tp32 Commit: d3d1ccfa673765085e6299cfbf0c17ccd3318e88 Parents: 0bf9b2f Author: Stephen MalletteAuthored: Thu Mar 15 18:37:28 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 18:37:28 2018 -0400 -- data/tinkerpop-sink-typed.json | 4 ++-- data/tinkerpop-sink-v2d0-typed.json| 4 ++-- data/tinkerpop-sink-v2d0.json | 4 ++-- data/tinkerpop-sink.json | 4 ++-- data/tinkerpop-sink.kryo | Bin 288 -> 234 bytes .../io/graphson/tinkerpop-sink-typed.json | 4 ++-- .../io/graphson/tinkerpop-sink-v2d0-typed.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink-v2d0.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink.json | 4 ++-- .../gremlin/structure/io/gryo/tinkerpop-sink.kryo | Bin 288 -> 234 bytes .../tinkergraph/structure/TinkerFactory.java | 11 --- 11 files changed, 20 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d3d1ccfa/data/tinkerpop-sink-typed.json -- diff --git a/data/tinkerpop-sink-typed.json b/data/tinkerpop-sink-typed.json index bc56489..2e83384 100644 --- a/data/tinkerpop-sink-typed.json +++ b/data/tinkerpop-sink-typed.json @@ -1,3 +1,3 @@ -{"@class":"java.util.HashMap","id":2000,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}} -{"@class":"java.util.HashMap","id":2001,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}} +{"@class":"java.util.HashMap","id":2000,"label":"message","inE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}} +{"@class":"java.util.HashMap","id":2001,"label":"message","inE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}} {"@class":"java.util.HashMap","id":1000,"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"outV":1000}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"inV":1000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",0],"value":"loop"}]]}} http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d3d1ccfa/data/tinkerpop-sink-v2d0-typed.json -- diff --git a/data/tinkerpop-sink-v2d0-typed.json b/data/tinkerpop-sink-v2d0-typed.json index c0844a3..7a27853 100644 --- a/data/tinkerpop-sink-v2d0-typed.json +++ b/data/tinkerpop-sink-v2d0-typed.json @@ -1,3 +1,3 @@
[1/3] tinkerpop git commit: Cleaned up the sink dataset a bit.
Repository: tinkerpop Updated Branches: refs/heads/master f2f0cbd33 -> a33c5ca80 Cleaned up the sink dataset a bit. Introduced more consistent,general property/label names. CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d3d1ccfa Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d3d1ccfa Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d3d1ccfa Branch: refs/heads/master Commit: d3d1ccfa673765085e6299cfbf0c17ccd3318e88 Parents: 0bf9b2f Author: Stephen MalletteAuthored: Thu Mar 15 18:37:28 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 18:37:28 2018 -0400 -- data/tinkerpop-sink-typed.json | 4 ++-- data/tinkerpop-sink-v2d0-typed.json| 4 ++-- data/tinkerpop-sink-v2d0.json | 4 ++-- data/tinkerpop-sink.json | 4 ++-- data/tinkerpop-sink.kryo | Bin 288 -> 234 bytes .../io/graphson/tinkerpop-sink-typed.json | 4 ++-- .../io/graphson/tinkerpop-sink-v2d0-typed.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink-v2d0.json | 4 ++-- .../structure/io/graphson/tinkerpop-sink.json | 4 ++-- .../gremlin/structure/io/gryo/tinkerpop-sink.kryo | Bin 288 -> 234 bytes .../tinkergraph/structure/TinkerFactory.java | 11 --- 11 files changed, 20 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d3d1ccfa/data/tinkerpop-sink-typed.json -- diff --git a/data/tinkerpop-sink-typed.json b/data/tinkerpop-sink-typed.json index bc56489..2e83384 100644 --- a/data/tinkerpop-sink-typed.json +++ b/data/tinkerpop-sink-typed.json @@ -1,3 +1,3 @@ -{"@class":"java.util.HashMap","id":2000,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}} -{"@class":"java.util.HashMap","id":2001,"label":"message_passing_test","inE":{"@class":"java.util.HashMap","msg_pass_test_edge":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}} +{"@class":"java.util.HashMap","id":2000,"label":"message","inE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":5,"outV":2000}]]},"outE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"inV":2001},{"@class":"java.util.HashMap","id":5,"inV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",2],"value":"a"}]]}} +{"@class":"java.util.HashMap","id":2001,"label":"message","inE":{"@class":"java.util.HashMap","link":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":4,"outV":2000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",3],"value":"b"}]]}} {"@class":"java.util.HashMap","id":1000,"label":"loops","inE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"outV":1000}]]},"outE":{"@class":"java.util.HashMap","self":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":1,"inV":1000}]]},"properties":{"@class":"java.util.HashMap","name":["java.util.ArrayList",[{"@class":"java.util.HashMap","id":["java.lang.Long",0],"value":"loop"}]]}} http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d3d1ccfa/data/tinkerpop-sink-v2d0-typed.json -- diff --git a/data/tinkerpop-sink-v2d0-typed.json b/data/tinkerpop-sink-v2d0-typed.json index c0844a3..7a27853 100644 --- a/data/tinkerpop-sink-v2d0-typed.json +++ b/data/tinkerpop-sink-v2d0-typed.json @@ -1,3 +1,3 @@
tinkerpop git commit: TINKERPOP-1854 Make Lambda implementation internal [Forced Update!]
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1854 11351a828 -> 7fbb77901 (forced update) TINKERPOP-1854 Make Lambda implementation internal Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7fbb7790 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7fbb7790 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7fbb7790 Branch: refs/heads/TINKERPOP-1854 Commit: 7fbb779010f028c8f3df6935969d29afefe0fb0f Parents: 0cdaa3a Author: Florian HockmannAuthored: Thu Mar 15 18:26:40 2018 +0100 Committer: Florian Hockmann Committed: Thu Mar 15 18:26:40 2018 +0100 -- docs/src/reference/gremlin-variants.asciidoc| 4 +- .../src/Gremlin.Net/Process/Traversal/Lambda.cs | 45 +++- .../Process/Traversal/StringBasedLambda.cs | 42 ++ .../Structure/IO/GraphSON/GraphSONWriter.cs | 2 +- .../Structure/IO/GraphSON/LambdaSerializer.cs | 43 --- .../IO/GraphSON/StringBasedLambdaSerializer.cs | 43 +++ 6 files changed, 104 insertions(+), 75 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7fbb7790/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index bf8c8b1..c19160a 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -451,8 +451,8 @@ g.V().Out().Map(Lambda.Python("lambda x: len(x.get().value('name'))")).Sum< <1> `Lambda.Groovy()` can be used to create a Groovy lambda. <2> `Lambda.Python()` can be used to create a Python lambda. -The `Lambda` class implements interfaces like `IFunction` and `IPredicate` that mirror their Java counterparts which makes it possible -to use lambdas with Gremlin.Net for the same steps as in Gremlin-Java. +The `ILambda` interface returned by these two methods inherits interfaces like `IFunction` and `IPredicate` that mirror +their Java counterparts which makes it possible to use lambdas with Gremlin.Net for the same steps as in Gremlin-Java. [[gremlin-javascript]] == Gremlin-JavaScript http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7fbb7790/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Lambda.cs -- diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Lambda.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Lambda.cs index 21849ef..12eb016 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Lambda.cs +++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Lambda.cs @@ -26,47 +26,34 @@ namespace Gremlin.Net.Process.Traversal /// /// Represents a lambda. /// -public class Lambda : IFunction, IBiFunction, IPredicate, IUnaryOperator, IBinaryOperator, IComparator, IConsumer, -ISupplier +public interface ILambda : IFunction, IBiFunction, IPredicate, IUnaryOperator, IBinaryOperator, IComparator, +IConsumer, ISupplier { -private const int DefaultArgument = -1; - -private Lambda(string expression, string language) -{ -LambdaExpression = expression; -Language = language; -} - -/// -/// Gets the lambda expression. -/// -public string LambdaExpression { get; } - -/// -/// Gets the language of this lambda. -/// -public string Language { get; } - -internal object Arguments => DefaultArgument; +} +/// +/// Provides methods to create lambdas. +/// +public static class Lambda +{ /// -/// Creates a new Groovy . +/// Creates a new Groovy lambda. /// /// The lambda expression. -/// The created . -public static Lambda Groovy(string expression) +/// The created lambda. +public static ILambda Groovy(string expression) { -return new Lambda(expression, "gremlin-groovy"); +return new StringBasedLambda(expression, "gremlin-groovy"); } /// -/// Creates a new Python . +/// Creates a new Python lambda. /// /// The lambda expression. -/// The created . -public static Lambda Python(string expression) +/// The created lambda. +public static ILambda Python(string expression) { -return new Lambda(expression, "gremlin-python"); +return new StringBasedLambda(expression, "gremlin-python"); } } } \ No newline at end of
[2/9] tinkerpop git commit: TINKERPOP-1898 Specifically tested SubgraphStrategy for jython evaluation
TINKERPOP-1898 Specifically tested SubgraphStrategy for jython evaluation Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c677a21d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c677a21d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c677a21d Branch: refs/heads/TINKERPOP-1854 Commit: c677a21d3fde73c496145915c66e7963c5290f69 Parents: f3172bc Author: Stephen MalletteAuthored: Fri Mar 9 10:17:09 2018 -0500 Committer: Stephen Mallette Committed: Mon Mar 12 11:56:16 2018 -0400 -- .../tinkerpop/gremlin/python/jsr223/JythonTranslator.java | 2 +- .../gremlin/python/jsr223/JythonTranslatorTest.java | 9 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c677a21d/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslator.java -- diff --git a/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslator.java b/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslator.java index 3d7d9fe..e043278 100644 --- a/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslator.java +++ b/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslator.java @@ -80,6 +80,6 @@ public final class JythonTranslator extends PythonTranslator { if (proxy.getConfiguration().isEmpty()) return proxy.getStrategyClass().getCanonicalName() + ".instance()"; else -return proxy.getStrategyClass().getCanonicalName() + ".create(new org.apache.commons.configuration.MapConfiguration(" + convertToString(ConfigurationConverter.getMap(proxy.getConfiguration())) + "))"; +return proxy.getStrategyClass().getCanonicalName() + ".create(org.apache.commons.configuration.MapConfiguration(" + convertToString(ConfigurationConverter.getMap(proxy.getConfiguration())) + "))"; } } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c677a21d/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslatorTest.java -- diff --git a/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslatorTest.java b/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslatorTest.java index e35898b..343819c 100644 --- a/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslatorTest.java +++ b/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslatorTest.java @@ -23,6 +23,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traverser; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; +import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy; import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.TranslationStrategy; import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy; import org.apache.tinkerpop.gremlin.structure.Vertex; @@ -33,6 +34,7 @@ import org.junit.Test; import java.util.ArrayList; import java.util.List; +import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.hasLabel; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -111,9 +113,10 @@ public class JythonTranslatorTest { // present GraphTraversalSource g = TinkerFactory.createModern().traversal(); g = g.withStrategies(new TranslationStrategy(g, JythonTranslator.of("g"))); -final List o = g.withStrategies(ReadOnlyStrategy.instance()). -V().has("name").map(Lambda.function("lambda x: type(x.get())")).toList(); +final List o = g.withStrategies(ReadOnlyStrategy.instance(), + SubgraphStrategy.build().checkAdjacentVertices(false).vertices(hasLabel("person")).create()). + V().has("name").map(Lambda.function("lambda x: type(x.get())")).toList(); -assertEquals(6, o.size()); +assertEquals(4, o.size()); } }
[9/9] tinkerpop git commit: TINKERPOP-1854 Make Lambda implementation internal
TINKERPOP-1854 Make Lambda implementation internal Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/11351a82 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/11351a82 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/11351a82 Branch: refs/heads/TINKERPOP-1854 Commit: 11351a8284c7bac6c63f06152fb882d5e9faae34 Parents: 0cdaa3a Author: Florian HockmannAuthored: Thu Mar 15 18:15:53 2018 +0100 Committer: Florian Hockmann Committed: Thu Mar 15 18:16:05 2018 +0100 -- .../src/Gremlin.Net/Process/Traversal/Lambda.cs | 45 +++- .../Process/Traversal/StringBasedLambda.cs | 42 ++ .../Structure/IO/GraphSON/GraphSONWriter.cs | 2 +- .../Structure/IO/GraphSON/LambdaSerializer.cs | 2 +- 4 files changed, 60 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/11351a82/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Lambda.cs -- diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Lambda.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Lambda.cs index 21849ef..12eb016 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Lambda.cs +++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Lambda.cs @@ -26,47 +26,34 @@ namespace Gremlin.Net.Process.Traversal /// /// Represents a lambda. /// -public class Lambda : IFunction, IBiFunction, IPredicate, IUnaryOperator, IBinaryOperator, IComparator, IConsumer, -ISupplier +public interface ILambda : IFunction, IBiFunction, IPredicate, IUnaryOperator, IBinaryOperator, IComparator, +IConsumer, ISupplier { -private const int DefaultArgument = -1; - -private Lambda(string expression, string language) -{ -LambdaExpression = expression; -Language = language; -} - -/// -/// Gets the lambda expression. -/// -public string LambdaExpression { get; } - -/// -/// Gets the language of this lambda. -/// -public string Language { get; } - -internal object Arguments => DefaultArgument; +} +/// +/// Provides methods to create lambdas. +/// +public static class Lambda +{ /// -/// Creates a new Groovy . +/// Creates a new Groovy lambda. /// /// The lambda expression. -/// The created . -public static Lambda Groovy(string expression) +/// The created lambda. +public static ILambda Groovy(string expression) { -return new Lambda(expression, "gremlin-groovy"); +return new StringBasedLambda(expression, "gremlin-groovy"); } /// -/// Creates a new Python . +/// Creates a new Python lambda. /// /// The lambda expression. -/// The created . -public static Lambda Python(string expression) +/// The created lambda. +public static ILambda Python(string expression) { -return new Lambda(expression, "gremlin-python"); +return new StringBasedLambda(expression, "gremlin-python"); } } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/11351a82/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/StringBasedLambda.cs -- diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/StringBasedLambda.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/StringBasedLambda.cs new file mode 100644 index 000..e27b474 --- /dev/null +++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/StringBasedLambda.cs @@ -0,0 +1,42 @@ +#region License + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#endregion + +namespace
[7/9] tinkerpop git commit: TINKERPOP-1922 P.Not() serialization is no longer an issue
TINKERPOP-1922 P.Not() serialization is no longer an issue Resolved on a different issue - likely TINKERPOP-1894 CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0bf9b2f7 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0bf9b2f7 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0bf9b2f7 Branch: refs/heads/TINKERPOP-1854 Commit: 0bf9b2f718f7db8344845d8fb5327ea16f1e9414 Parents: 1ea01ad Author: Stephen MalletteAuthored: Thu Mar 15 10:33:45 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 10:33:45 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bf9b2f7/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs index c3819fe..e15a492 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@ -41,19 +41,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin new Dictionary { {"g_V_hasIdXwithinXemptyXX_count", IgnoreReason.PWithinWrapsArgumentsInArray}, -{"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray}, -{ - "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0X_selectXa_bX", -IgnoreReason.PNotDeserializationProblem -}, -{ - "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20_andXltX29X_orXeqX35_name", -IgnoreReason.PNotDeserializationProblem -}, -{ - "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXd_selectXa_b_c_dX", -IgnoreReason.PNotDeserializationProblem -} +{"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray} }; private static class Keywords
[3/9] tinkerpop git commit: TINKERPOP-1895 Fixed jython based evaluations of withStrategies
TINKERPOP-1895 Fixed jython based evaluations of withStrategies Similar to TINKERPOP-1896 in that a lambda would trigger a scriptengine evaluation with jython which would fail when withStrategies() was used as the JythonTranslator was actually producing Python valid code rather than Jython valid code. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f3172bc5 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f3172bc5 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f3172bc5 Branch: refs/heads/TINKERPOP-1854 Commit: f3172bc55ef3e8f298dccfeb18c9fe6b4c27767c Parents: 5feadbd Author: Stephen MalletteAuthored: Fri Mar 9 09:38:35 2018 -0500 Committer: Stephen Mallette Committed: Mon Mar 12 11:56:16 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../gremlin/python/jsr223/JythonTranslator.java | 19 +++ .../gremlin/python/jsr223/PythonTranslator.java | 14 -- .../python/jsr223/JythonTranslatorTest.java | 13 + 4 files changed, 41 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3172bc5/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index a761003..350fce8 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -31,6 +31,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Bumped to Jackson 2.9.4. * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that enables a "ping" and auto-close for seemingly dead clients. * Fixed a bug where lambdas in `gremlin-python` would trigger a failure if steps using python-only symbols were present (such as `as_()`). +* Fixed a bug where lambdas in `gremlin-python` would trigger a failure if `withStrategies()` was evaluated. * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers exceeded the Integer limits. * Delayed setting of the request identifier until `RequestMessage` construction by the builder. * Improved error messaging for failed serialization and deserialization of request/response messages. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3172bc5/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslator.java -- diff --git a/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslator.java b/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslator.java index f8a5bc3..3d7d9fe 100644 --- a/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslator.java +++ b/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslator.java @@ -19,8 +19,17 @@ package org.apache.tinkerpop.gremlin.python.jsr223; +import org.apache.commons.configuration.Configuration; +import org.apache.commons.configuration.ConfigurationConverter; +import org.apache.commons.configuration.MapConfiguration; +import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy; +import org.apache.tinkerpop.gremlin.process.traversal.strategy.TraversalStrategyProxy; import org.apache.tinkerpop.gremlin.util.function.Lambda; +import java.lang.reflect.InvocationTargetException; +import java.util.HashMap; +import java.util.Map; + /** * @author Marko A. Rodriguez (http://markorodriguez.com) * @author Stephen Mallette (http://stephen.genoprime.com) @@ -63,4 +72,14 @@ public final class JythonTranslator extends PythonTranslator { // jython one can just pass them through. return methodName; } + +@Override +protected String resolveTraversalStrategyProxy(final TraversalStrategyProxy proxy) { +// since this is jython we don't need a traversal proxy here - we need the actual JVM version of the strategy +// since this script will be executed in Jython. +if (proxy.getConfiguration().isEmpty()) +return proxy.getStrategyClass().getCanonicalName() + ".instance()"; +else +return proxy.getStrategyClass().getCanonicalName() + ".create(new org.apache.commons.configuration.MapConfiguration(" + convertToString(ConfigurationConverter.getMap(proxy.getConfiguration())) + "))"; +} } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3172bc5/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/PythonTranslator.java -- diff --git a/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/PythonTranslator.java
[6/9] tinkerpop git commit: Merge branch 'TINKERPOP-1896' into tp32
Merge branch 'TINKERPOP-1896' into tp32 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1ea01ad2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1ea01ad2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1ea01ad2 Branch: refs/heads/TINKERPOP-1854 Commit: 1ea01ad2e0748d400cc89d92d2dbfe07dd2cb6be Parents: 5cf1cba 01ef6c1 Author: Stephen MalletteAuthored: Wed Mar 14 07:58:22 2018 -0400 Committer: Stephen Mallette Committed: Wed Mar 14 07:58:22 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../jsr223/GremlinJythonScriptEngine.java | 7 +-- .../gremlin/python/jsr223/JythonTranslator.java | 28 + .../gremlin/python/jsr223/PythonTranslator.java | 33 ++ .../python/jsr223/JythonTranslatorTest.java | 63 5 files changed, 88 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1ea01ad2/CHANGELOG.asciidoc -- diff --cc CHANGELOG.asciidoc index 97b90a5,a761003..94ee24f --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@@ -30,8 -29,8 +30,9 @@@ image::https://raw.githubusercontent.co * Added the "Kitchen Sink" test data set. * Fixed deserialization of `P.not()` for GraphSON. * Bumped to Jackson 2.9.4. +* Improved performance of `JavaTranslator` by caching reflected methods required for traversal construction. * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that enables a "ping" and auto-close for seemingly dead clients. + * Fixed a bug where lambdas in `gremlin-python` would trigger a failure if steps using python-only symbols were present (such as `as_()`). * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers exceeded the Integer limits. * Delayed setting of the request identifier until `RequestMessage` construction by the builder. * Improved error messaging for failed serialization and deserialization of request/response messages.
[5/9] tinkerpop git commit: TINKERPOP-1896 Cleaned up changelog around TINKERPOP-1898/1895
TINKERPOP-1896 Cleaned up changelog around TINKERPOP-1898/1895 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/01ef6c11 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/01ef6c11 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/01ef6c11 Branch: refs/heads/TINKERPOP-1854 Commit: 01ef6c110cc323643653c716fbb85fcf433dc418 Parents: c82d06e Author: Stephen MalletteAuthored: Mon Mar 12 12:19:18 2018 -0400 Committer: Stephen Mallette Committed: Mon Mar 12 12:19:18 2018 -0400 -- CHANGELOG.asciidoc | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/01ef6c11/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 350fce8..a761003 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -31,7 +31,6 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Bumped to Jackson 2.9.4. * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that enables a "ping" and auto-close for seemingly dead clients. * Fixed a bug where lambdas in `gremlin-python` would trigger a failure if steps using python-only symbols were present (such as `as_()`). -* Fixed a bug where lambdas in `gremlin-python` would trigger a failure if `withStrategies()` was evaluated. * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers exceeded the Integer limits. * Delayed setting of the request identifier until `RequestMessage` construction by the builder. * Improved error messaging for failed serialization and deserialization of request/response messages.
[8/9] tinkerpop git commit: TINKERPOP-1919 Add Lambda support to Gremlin.Net
TINKERPOP-1919 Add Lambda support to Gremlin.Net This adds a Lambda class that can be used to construct Groovy or Python lambdas. The Lambda class implements all interfaces that mirror Javas functional interfaces like Function. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0cdaa3a2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0cdaa3a2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0cdaa3a2 Branch: refs/heads/TINKERPOP-1854 Commit: 0cdaa3a2114670a34999aa56e0487a2e7ef998e1 Parents: 0bf9b2f Author: Florian HockmannAuthored: Wed Mar 14 18:56:47 2018 +0100 Committer: Florian Hockmann Committed: Thu Mar 15 18:16:05 2018 +0100 -- CHANGELOG.asciidoc | 1 + docs/src/reference/gremlin-variants.asciidoc| 29 ++-- .../upgrade/release-3.2.x-incubating.asciidoc | 7 ++ gremlin-dotnet/glv/generate.groovy | 4 +- .../Process/Traversal/GraphTraversalSource.cs | 52 +- .../Gremlin.Net/Process/Traversal/ISupplier.cs | 32 + .../Process/Traversal/IUnaryOperator.cs | 33 + .../src/Gremlin.Net/Process/Traversal/Lambda.cs | 72 .../Structure/IO/GraphSON/GraphSONWriter.cs | 3 +- .../Structure/IO/GraphSON/LambdaSerializer.cs | 43 .../Gherkin/CommonSteps.cs | 2 +- .../Gherkin/IgnoreException.cs | 4 -- .../TraversalEvaluation/TraversalParser.cs | 2 +- .../IO/GraphSON/GraphSONWriterTests.cs | 13 14 files changed, 282 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0cdaa3a2/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 94ee24f..8fcbe1a 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima [[release-3-2-8]] === TinkerPop 3.2.8 (Release Date: NOT OFFICIALLY RELEASED YET) +* Added a `Lambda` class to Gremlin.Net that makes it possible to use Groovy and Python lambdas with Gremlin.Net. * Enums are now represented as classes in Gremlin.Net which allows to use them as arguments in more steps. * Bumped to Groovy 2.4.14. * Added `checkAdjacentVertices` option to `SubgraphStrategy`. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0cdaa3a2/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index ace8119..bf8c8b1 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -46,7 +46,7 @@ implementation of Gremlin and serves as the foundation by which all other Gremli === The Lambda Solution Supporting link:https://en.wikipedia.org/wiki/Anonymous_function[anonymous functions] across languages is difficult as -most language do not support lambda introspection and thus, code analysis. In Gremlin-Java, Java8 lambdas can be leveraged. +most languages do not support lambda introspection and thus, code analysis. In Gremlin-Java, Java8 lambdas can be leveraged. [source,java] g.V().out("knows").map(t -> t.get().value("name") + " is the friend name") <1> @@ -281,7 +281,7 @@ re-construction machine-side. === The Lambda Solution Supporting link:https://en.wikipedia.org/wiki/Anonymous_function[anonymous functions] across languages is difficult as -most language do not support lambda introspection and thus, code analysis. In Gremlin-Python, +most languages do not support lambda introspection and thus, code analysis. In Gremlin-Python, a link:https://docs.python.org/2/reference/expressions.html#lambda[Python lambda] should be represented as a zero-arg callable that returns a string representation of a lambda. The default lambda language is `gremlin-python` and can be changed via `gremlin_python.statics.default_lambda_language`. When the lambda is represented in `Bytecode` its language is encoded @@ -343,8 +343,10 @@ var g = graph.Traversal().WithRemote(new DriverRemoteConnection(new GremlinClien When a traversal from the `GraphTraversalSource` is iterated, the traversalâs `Bytecode` is sent over the wire via the registered `IRemoteConnection`. The bytecode is used to construct the equivalent traversal at the remote traversal source. -Since Gremlin.Net currently doesn't support lambda expressions, all traversals can be translated to Gremlin-Java on the remote -location (e.g. Gremlin Server). +Moreover, typically the bytecode is analyzed to determine
[1/9] tinkerpop git commit: TINKERPOP-1898 Can't seem to fix this in a consistent way given jython evaluation [Forced Update!]
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1854 c7a82c6ed -> 11351a828 (forced update) TINKERPOP-1898 Can't seem to fix this in a consistent way given jython evaluation Jython seems to have problems with varargs that are not easily resolved. Nothing I've tried works consistently. Sometimes it works and other times not. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c82d06e0 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c82d06e0 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c82d06e0 Branch: refs/heads/TINKERPOP-1854 Commit: c82d06e05cfcc05607dd2d84c0c2d1475f0a0ddf Parents: c677a21 Author: Stephen MalletteAuthored: Mon Mar 12 11:53:57 2018 -0400 Committer: Stephen Mallette Committed: Mon Mar 12 11:56:16 2018 -0400 -- .../tinkerpop/gremlin/python/jsr223/JythonTranslatorTest.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c82d06e0/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslatorTest.java -- diff --git a/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslatorTest.java b/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslatorTest.java index 343819c..3165df3 100644 --- a/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslatorTest.java +++ b/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/jsr223/JythonTranslatorTest.java @@ -29,6 +29,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.Read import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory; import org.apache.tinkerpop.gremlin.util.function.Lambda; +import org.junit.Ignore; import org.junit.Test; import java.util.ArrayList; @@ -108,6 +109,7 @@ public class JythonTranslatorTest { } @Test +@Ignore("TINKERPOP-1898 - ultimately seems to be a problem with jython and varargs - doesn't act consistently") public void shouldTranslateToJythonWhenUsingLambdasAndStrategies() throws Exception { // the jython translation kicks in when you add a lambda so ensure that it translates when strategies are // present
[4/9] tinkerpop git commit: TINKERPOP-1896 Fixed bug in lambda processing for python
TINKERPOP-1896 Fixed bug in lambda processing for python When a lambda is in a traversal, the bytecode gets pushed to a scriptengine for evaluation. For python that means, using the JythonTranslator. Prior to this change the JythonTranslator largely relied on the PythonTranslator to convert bytecode to Jython-syntaxed Gremlin. The problem there is that in the JythonScriptEngine, the Traversal bindings are Java objects and so if translated to pure Python syntax, traversal steps like as() become as_() and thus not part of the Java API that is expected - and then errors. Not sure why this didn't come up sooner, but it really only ends up being an issue if you are using bytecode, use gremlin server, use jython in gremlin server and then submit a traversal with a lambda - so perhaps that hasn't been a common combination. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5feadbdd Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5feadbdd Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5feadbdd Branch: refs/heads/TINKERPOP-1854 Commit: 5feadbddba308a6999649dffb193cf7d31b4645c Parents: f80a542 Author: Stephen MalletteAuthored: Thu Mar 8 17:15:34 2018 -0500 Committer: Stephen Mallette Committed: Mon Mar 12 11:56:16 2018 -0400 -- CHANGELOG.asciidoc | 1 + .../jsr223/GremlinJythonScriptEngine.java | 7 +-- .../gremlin/python/jsr223/JythonTranslator.java | 9 .../gremlin/python/jsr223/PythonTranslator.java | 19 +--- .../python/jsr223/JythonTranslatorTest.java | 47 +--- 5 files changed, 44 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5feadbdd/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 66fbbb2..a761003 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -30,6 +30,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Fixed deserialization of `P.not()` for GraphSON. * Bumped to Jackson 2.9.4. * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that enables a "ping" and auto-close for seemingly dead clients. +* Fixed a bug where lambdas in `gremlin-python` would trigger a failure if steps using python-only symbols were present (such as `as_()`). * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers exceeded the Integer limits. * Delayed setting of the request identifier until `RequestMessage` construction by the builder. * Improved error messaging for failed serialization and deserialization of request/response messages. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5feadbdd/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/GremlinJythonScriptEngine.java -- diff --git a/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/GremlinJythonScriptEngine.java b/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/GremlinJythonScriptEngine.java index 10f4790..a28a58f 100644 --- a/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/GremlinJythonScriptEngine.java +++ b/gremlin-python/src/main/java/org/apache/tinkerpop/gremlin/python/jsr223/GremlinJythonScriptEngine.java @@ -41,11 +41,11 @@ import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.Map; import java.util.stream.Collectors; /** * @author Marko A. Rodriguez (http://markorodriguez.com) + * @author Stephen Mallette (http://stephen.genoprime.com) */ public class GremlinJythonScriptEngine implements GremlinScriptEngine { @@ -123,10 +123,7 @@ public class GremlinJythonScriptEngine implements GremlinScriptEngine { // extract the named traversalsource prior to that happening so that bytecode bindings can share the same // namespace as global bindings (e.g. traversalsources and graphs). if (traversalSource.equals(HIDDEN_G)) -throw new IllegalArgumentException("The traversalSource cannot have the name " + HIDDEN_G+ " - it is reserved"); - -if (bindings.containsKey(HIDDEN_G)) -throw new IllegalArgumentException("Bindings cannot include " + HIDDEN_G + " - it is reserved"); +throw new IllegalArgumentException("The traversalSource cannot have the name " + HIDDEN_G + " - it is reserved"); if (!bindings.containsKey(traversalSource)) throw new IllegalArgumentException("The bindings available to the ScriptEngine do not contain a traversalSource
tinkerpop git commit: I hate you Travis
Repository: tinkerpop Updated Branches: refs/heads/TRAVIS-TEST 8c43a96d8 -> 6bca797e6 I hate you Travis Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/6bca797e Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/6bca797e Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/6bca797e Branch: refs/heads/TRAVIS-TEST Commit: 6bca797e6f8c4eb9077006bb24badb4011ab98bb Parents: 8c43a96 Author: Daniel KuppitzAuthored: Thu Mar 15 09:59:59 2018 -0700 Committer: Daniel Kuppitz Committed: Thu Mar 15 09:59:59 2018 -0700 -- .../optimization/IncidentToAdjacentStrategy.java| 7 ++- .../process/traversal/util/DefaultTraversal.java| 12 +++- 2 files changed, 9 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6bca797e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java index 4ca2465..f6c66c8 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java @@ -111,12 +111,12 @@ public final class IncidentToAdjacentStrategy extends AbstractTraversalStrategy< newStep.addLabel(label); } TraversalHelper.replaceStep(step1, newStep, traversal); +traversal.removeStep(step2); if (step2 instanceof EdgeOtherVertexStep) { // bothE().otherV() might have been the only step sequence that required path tracking. Invalidate the // requirements to possibly end up with more optimized traversers. traversal.invalidateTraverserRequirements(); } -traversal.removeStep(step2); } public static IncidentToAdjacentStrategy instance() { @@ -153,4 +153,9 @@ public final class IncidentToAdjacentStrategy extends AbstractTraversalStrategy< public Set applyPrior() { return Collections.singleton(IdentityRemovalStrategy.class); } + +@Override +public Set applyPost() { +return Collections.singleton(PathRetractionStrategy.class); +} } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6bca797e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java index faa2819..50368d6 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java @@ -167,16 +167,10 @@ public class DefaultTraversal implements Traversal.Admin{ @Override public void invalidateTraverserRequirements() { +this.generator = null; this.requirements = null; -final TraversalParent parent = this.getParent(); -if (!(parent instanceof EmptyStep)) { -parent.asStep().getTraversal().invalidateTraverserRequirements(); -for (final Traversal.Admin localChild : parent.getLocalChildren()) { -if (localChild != this) localChild.invalidateTraverserRequirements(); -} -for (final Traversal.Admin globalChild : parent.getGlobalChildren()) { -if (globalChild != this) globalChild.invalidateTraverserRequirements(); -} +if (!(this.parent instanceof EmptyStep)) { + this.parent.asStep().getTraversal().invalidateTraverserRequirements(); } }
tinkerpop git commit: TINKERPOP-1920 Fixed P.within/without() handling for collections
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1920 [created] 065194814 TINKERPOP-1920 Fixed P.within/without() handling for collections Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/06519481 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/06519481 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/06519481 Branch: refs/heads/TINKERPOP-1920 Commit: 065194814b2eafdb82cba665309ba890d04d96dc Parents: 0bf9b2f Author: Stephen MalletteAuthored: Thu Mar 15 12:19:48 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 12:19:48 2018 -0400 -- CHANGELOG.asciidoc | 1 + gremlin-dotnet/glv/P.template | 22 +++- .../src/Gremlin.Net/Process/Traversal/P.cs | 27 ++-- .../Gherkin/GherkinTestRunner.cs| 6 + 4 files changed, 48 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/06519481/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 94ee24f..6f3cd27 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -41,6 +41,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Added `IndexedTraverserSet` which indexes on the value of a `Traverser` thus improving performance when used. * Utilized `IndexedTraverserSet` in `TraversalVertexProgram` to avoid extra iteration when doing `Vertex` lookups. * Bumped to Netty 4.0.56.Final. +* Fixed .NET GraphSON serialization of `P.Within()` and `P.without()` when passing a `Collection` as an argument. * Fixed a bug in Gremlin Console which prevented handling of `gremlin.sh` flags that had an "=" between the flag and its arguments. * Fixed bug where `SparkMessenger` was not applying the `edgeFunction` from `MessageScope`. * Fixed a bug in `ComputerAwareStep` that didn't handle `reset()` properly and thus occasionally produced some extra traversers. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/06519481/gremlin-dotnet/glv/P.template -- diff --git a/gremlin-dotnet/glv/P.template b/gremlin-dotnet/glv/P.template index ad037c1..f3fae2a 100644 --- a/gremlin-dotnet/glv/P.template +++ b/gremlin-dotnet/glv/P.template @@ -22,6 +22,12 @@ #endregion // THIS IS A GENERATED FILE - DO NOT MODIFY THIS FILE DIRECTLY - see pom.xml +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + namespace Gremlin.Net.Process.Traversal { #pragma warning disable 1591 @@ -88,9 +94,23 @@ namespace Gremlin.Net.Process.Traversal <% } %><% pmethods.findAll{ it in ["within", "without"] }.each { method -> %> public static P <%= toCSharpMethodName.call(method) %>(params object[] args) { -return new P("<%= method %>", args); +if (args.Length == 1 && args[0].GetType().GetInterfaces().Contains(typeof(ICollection))) +return new P("<%= method %>", ToGenericArray((ICollection) args[0])); +else +return new P("<%= method %>", args); } <% } %> + +private static T[] ToGenericArray(ICollection collection) +{ +if (collection == null) +{ +return new T[] { }; +} + +return new List(collection).ToArray(); +} + /// public override string ToString() { http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/06519481/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs -- diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs index e3a1e76..8777f7b 100644 --- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs +++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs @@ -22,6 +22,12 @@ #endregion // THIS IS A GENERATED FILE - DO NOT MODIFY THIS FILE DIRECTLY - see pom.xml +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + namespace Gremlin.Net.Process.Traversal { #pragma warning disable 1591 @@ -148,12 +154,29 @@ namespace Gremlin.Net.Process.Traversal public static P Within(params object[] args) { -return new P("within", args); +if (args.Length == 1 && args[0].GetType().GetInterfaces().Contains(typeof(ICollection))) +return new P("within", ToGenericArray((ICollection) args[0])); +else +
tinkerpop git commit: I hate you Travis
Repository: tinkerpop Updated Branches: refs/heads/TRAVIS-TEST [created] 8c43a96d8 I hate you Travis Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/8c43a96d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8c43a96d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8c43a96d Branch: refs/heads/TRAVIS-TEST Commit: 8c43a96d8dd1f78787a5d3902ce164507583c7ab Parents: f2f0cbd Author: Daniel KuppitzAuthored: Thu Mar 15 09:08:02 2018 -0700 Committer: Daniel Kuppitz Committed: Thu Mar 15 09:08:02 2018 -0700 -- .../gremlin/process/traversal/util/DefaultTraversal.java | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8c43a96d/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java index 3f5b366..faa2819 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java @@ -171,6 +171,12 @@ public class DefaultTraversal implements Traversal.Admin{ final TraversalParent parent = this.getParent(); if (!(parent instanceof EmptyStep)) { parent.asStep().getTraversal().invalidateTraverserRequirements(); +for (final Traversal.Admin localChild : parent.getLocalChildren()) { +if (localChild != this) localChild.invalidateTraverserRequirements(); +} +for (final Traversal.Admin globalChild : parent.getGlobalChildren()) { +if (globalChild != this) globalChild.invalidateTraverserRequirements(); +} } }
[1/2] tinkerpop git commit: Merge branch 'tp33' of https://git-wip-us.apache.org/repos/asf/tinkerpop into tp33
Repository: tinkerpop Updated Branches: refs/heads/master e80cd574c -> f2f0cbd33 Merge branch 'tp33' of https://git-wip-us.apache.org/repos/asf/tinkerpop into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4a838c0f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4a838c0f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4a838c0f Branch: refs/heads/master Commit: 4a838c0f4ec01950118e44c51674be81c515ad4c Parents: 89e722e 4274bd5 Author: Daniel KuppitzAuthored: Thu Mar 15 07:44:16 2018 -0700 Committer: Daniel Kuppitz Committed: Thu Mar 15 07:44:16 2018 -0700 -- .../Gherkin/GherkinTestRunner.cs | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) --
[1/2] tinkerpop git commit: CTR: Added comments to describe `Traversal::invalidateTraverserRequirements()`. Also added some test cases and made `IncidentToAdjacentStrategy` better by adding `invalidat
Repository: tinkerpop Updated Branches: refs/heads/tp33 4274bd5cf -> 4a838c0f4 CTR: Added comments to describe `Traversal::invalidateTraverserRequirements()`. Also added some test cases and made `IncidentToAdjacentStrategy` better by adding `invalidateTraverserRequirements()` in case the strategy replaces `bothE().otherV()` with `both()`. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/89e722e0 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/89e722e0 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/89e722e0 Branch: refs/heads/tp33 Commit: 89e722e0def599664f024c2d6dc5bb24440e2603 Parents: 0c6459d Author: Daniel KuppitzAuthored: Thu Mar 15 07:40:41 2018 -0700 Committer: Daniel Kuppitz Committed: Thu Mar 15 07:40:41 2018 -0700 -- .../gremlin/process/traversal/Traversal.java| 5 +- .../strategy/decoration/SubgraphStrategy.java | 3 + .../IncidentToAdjacentStrategy.java | 5 ++ .../traversal/util/DefaultTraversal.java| 4 ++ .../gremlin/process/ProcessComputerSuite.java | 6 +- .../gremlin/process/ProcessStandardSuite.java | 6 +- .../decoration/SubgraphStrategyProcessTest.java | 56 +-- .../IncidentToAdjacentStrategyProcessTest.java | 76 8 files changed, 151 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/89e722e0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java index 7a6ddce..8f3948c 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java @@ -427,10 +427,13 @@ public interface Traversal extends Iterator, Serializable, Cloneable, A /** * Invalidates the set of all {@link TraverserRequirement}s for this traversal. + * This method should be used by strategies, which mutate the traversal and possibly change the + * traversal's requirements. + * Implementations should reset the internal requirements cache, if it exists. */ public default void invalidateTraverserRequirements() { -}; +} /** * Call the {@link Step#reset} method on every step in the traversal. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/89e722e0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java index 7968363..ab9ceb8 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java @@ -193,6 +193,9 @@ public final class SubgraphStrategy extends AbstractTraversalStrategy(traversal, this.vertexCriterion.clone()), someVStep, traversal); +// if a both() step is replaced by bothE().filter.otherV(), the traversal relies on path information, +// which isn't necessarily a traverser requirement at this point. To be sure, that the traversal will +// track path information, the (possibly cached) traverser requirements need to be invalidated. invalidateTraverserRequirements |= addsPathRequirement; } } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/89e722e0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java index 1c96cf8..4ca2465 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java +++
[2/2] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e80cd574 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e80cd574 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e80cd574 Branch: refs/heads/master Commit: e80cd574c5cc7b203bd2ec1c9f496a819fe409aa Parents: cb322ac 89e722e Author: Daniel KuppitzAuthored: Thu Mar 15 07:43:48 2018 -0700 Committer: Daniel Kuppitz Committed: Thu Mar 15 07:43:48 2018 -0700 -- .../gremlin/process/traversal/Traversal.java| 5 +- .../strategy/decoration/SubgraphStrategy.java | 3 + .../IncidentToAdjacentStrategy.java | 5 ++ .../traversal/util/DefaultTraversal.java| 4 ++ .../gremlin/process/ProcessComputerSuite.java | 6 +- .../gremlin/process/ProcessStandardSuite.java | 6 +- .../decoration/SubgraphStrategyProcessTest.java | 56 +-- .../IncidentToAdjacentStrategyProcessTest.java | 76 8 files changed, 151 insertions(+), 10 deletions(-) --
[2/2] tinkerpop git commit: Merge branch 'tp33' of https://git-wip-us.apache.org/repos/asf/tinkerpop into tp33
Merge branch 'tp33' of https://git-wip-us.apache.org/repos/asf/tinkerpop into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4a838c0f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4a838c0f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4a838c0f Branch: refs/heads/tp33 Commit: 4a838c0f4ec01950118e44c51674be81c515ad4c Parents: 89e722e 4274bd5 Author: Daniel KuppitzAuthored: Thu Mar 15 07:44:16 2018 -0700 Committer: Daniel Kuppitz Committed: Thu Mar 15 07:44:16 2018 -0700 -- .../Gherkin/GherkinTestRunner.cs | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) --
[1/2] tinkerpop git commit: CTR: Added comments to describe `Traversal::invalidateTraverserRequirements()`. Also added some test cases and made `IncidentToAdjacentStrategy` better by adding `invalidat
Repository: tinkerpop Updated Branches: refs/heads/master cb322aca0 -> e80cd574c CTR: Added comments to describe `Traversal::invalidateTraverserRequirements()`. Also added some test cases and made `IncidentToAdjacentStrategy` better by adding `invalidateTraverserRequirements()` in case the strategy replaces `bothE().otherV()` with `both()`. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/89e722e0 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/89e722e0 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/89e722e0 Branch: refs/heads/master Commit: 89e722e0def599664f024c2d6dc5bb24440e2603 Parents: 0c6459d Author: Daniel KuppitzAuthored: Thu Mar 15 07:40:41 2018 -0700 Committer: Daniel Kuppitz Committed: Thu Mar 15 07:40:41 2018 -0700 -- .../gremlin/process/traversal/Traversal.java| 5 +- .../strategy/decoration/SubgraphStrategy.java | 3 + .../IncidentToAdjacentStrategy.java | 5 ++ .../traversal/util/DefaultTraversal.java| 4 ++ .../gremlin/process/ProcessComputerSuite.java | 6 +- .../gremlin/process/ProcessStandardSuite.java | 6 +- .../decoration/SubgraphStrategyProcessTest.java | 56 +-- .../IncidentToAdjacentStrategyProcessTest.java | 76 8 files changed, 151 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/89e722e0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java index 7a6ddce..8f3948c 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java @@ -427,10 +427,13 @@ public interface Traversal extends Iterator, Serializable, Cloneable, A /** * Invalidates the set of all {@link TraverserRequirement}s for this traversal. + * This method should be used by strategies, which mutate the traversal and possibly change the + * traversal's requirements. + * Implementations should reset the internal requirements cache, if it exists. */ public default void invalidateTraverserRequirements() { -}; +} /** * Call the {@link Step#reset} method on every step in the traversal. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/89e722e0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java index 7968363..ab9ceb8 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java @@ -193,6 +193,9 @@ public final class SubgraphStrategy extends AbstractTraversalStrategy(traversal, this.vertexCriterion.clone()), someVStep, traversal); +// if a both() step is replaced by bothE().filter.otherV(), the traversal relies on path information, +// which isn't necessarily a traverser requirement at this point. To be sure, that the traversal will +// track path information, the (possibly cached) traverser requirements need to be invalidated. invalidateTraverserRequirements |= addsPathRequirement; } } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/89e722e0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java -- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java index 1c96cf8..4ca2465 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java +++
[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4274bd5c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4274bd5c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4274bd5c Branch: refs/heads/master Commit: 4274bd5cf7028ab49356243d677ba6b23f4b911b Parents: 0c6459d 0bf9b2f Author: Stephen MalletteAuthored: Thu Mar 15 10:34:49 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 10:34:49 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4274bd5c/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs -- diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs index f5e6d3f,e15a492..2dac7c4 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@@ -40,23 -40,8 +40,11 @@@ namespace Gremlin.Net.IntegrationTest.G private static readonly IDictionary IgnoredScenarios = new Dictionary { +{ "g_V_valueMapXtrueX", IgnoreReason.TraversalTDeserializationNotSupported }, // TINKERPOP-1866 +{ "g_V_valueMapXtrue_name_ageX", IgnoreReason.TraversalTDeserializationNotSupported }, // TINKERPOP-1866 +{ "g_V_hasLabelXpersonX_filterXoutEXcreatedXX_valueMapXtrueX", IgnoreReason.TraversalTDeserializationNotSupported }, // TINKERPOP-1866 {"g_V_hasIdXwithinXemptyXX_count", IgnoreReason.PWithinWrapsArgumentsInArray}, - {"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray}, - { - "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0X_selectXa_bX", - IgnoreReason.PNotDeserializationProblem - }, - { - "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20_andXltX29X_orXeqX35_name", - IgnoreReason.PNotDeserializationProblem - }, - { - "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXd_selectXa_b_c_dX", - IgnoreReason.PNotDeserializationProblem - } + {"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray} }; private static class Keywords
tinkerpop git commit: TINKERPOP-1922 P.Not() serialization is no longer an issue
Repository: tinkerpop Updated Branches: refs/heads/tp32 1ea01ad2e -> 0bf9b2f71 TINKERPOP-1922 P.Not() serialization is no longer an issue Resolved on a different issue - likely TINKERPOP-1894 CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0bf9b2f7 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0bf9b2f7 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0bf9b2f7 Branch: refs/heads/tp32 Commit: 0bf9b2f718f7db8344845d8fb5327ea16f1e9414 Parents: 1ea01ad Author: Stephen MalletteAuthored: Thu Mar 15 10:33:45 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 10:33:45 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bf9b2f7/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs index c3819fe..e15a492 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@ -41,19 +41,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin new Dictionary { {"g_V_hasIdXwithinXemptyXX_count", IgnoreReason.PWithinWrapsArgumentsInArray}, -{"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray}, -{ - "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0X_selectXa_bX", -IgnoreReason.PNotDeserializationProblem -}, -{ - "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20_andXltX29X_orXeqX35_name", -IgnoreReason.PNotDeserializationProblem -}, -{ - "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXd_selectXa_b_c_dX", -IgnoreReason.PNotDeserializationProblem -} +{"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray} }; private static class Keywords
[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4274bd5c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4274bd5c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4274bd5c Branch: refs/heads/tp33 Commit: 4274bd5cf7028ab49356243d677ba6b23f4b911b Parents: 0c6459d 0bf9b2f Author: Stephen MalletteAuthored: Thu Mar 15 10:34:49 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 10:34:49 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4274bd5c/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs -- diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs index f5e6d3f,e15a492..2dac7c4 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@@ -40,23 -40,8 +40,11 @@@ namespace Gremlin.Net.IntegrationTest.G private static readonly IDictionary IgnoredScenarios = new Dictionary { +{ "g_V_valueMapXtrueX", IgnoreReason.TraversalTDeserializationNotSupported }, // TINKERPOP-1866 +{ "g_V_valueMapXtrue_name_ageX", IgnoreReason.TraversalTDeserializationNotSupported }, // TINKERPOP-1866 +{ "g_V_hasLabelXpersonX_filterXoutEXcreatedXX_valueMapXtrueX", IgnoreReason.TraversalTDeserializationNotSupported }, // TINKERPOP-1866 {"g_V_hasIdXwithinXemptyXX_count", IgnoreReason.PWithinWrapsArgumentsInArray}, - {"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray}, - { - "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0X_selectXa_bX", - IgnoreReason.PNotDeserializationProblem - }, - { - "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20_andXltX29X_orXeqX35_name", - IgnoreReason.PNotDeserializationProblem - }, - { - "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXd_selectXa_b_c_dX", - IgnoreReason.PNotDeserializationProblem - } + {"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray} }; private static class Keywords
[3/3] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/cb322aca Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/cb322aca Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/cb322aca Branch: refs/heads/master Commit: cb322aca01c9305d8300cd7de0cfcae843e4ef77 Parents: c0571df 4274bd5 Author: Stephen MalletteAuthored: Thu Mar 15 10:40:32 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 10:40:32 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/cb322aca/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs --
[1/3] tinkerpop git commit: TINKERPOP-1922 P.Not() serialization is no longer an issue
Repository: tinkerpop Updated Branches: refs/heads/master c0571dfd2 -> cb322aca0 TINKERPOP-1922 P.Not() serialization is no longer an issue Resolved on a different issue - likely TINKERPOP-1894 CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0bf9b2f7 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0bf9b2f7 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0bf9b2f7 Branch: refs/heads/master Commit: 0bf9b2f718f7db8344845d8fb5327ea16f1e9414 Parents: 1ea01ad Author: Stephen MalletteAuthored: Thu Mar 15 10:33:45 2018 -0400 Committer: Stephen Mallette Committed: Thu Mar 15 10:33:45 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0bf9b2f7/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs index c3819fe..e15a492 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@ -41,19 +41,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin new Dictionary { {"g_V_hasIdXwithinXemptyXX_count", IgnoreReason.PWithinWrapsArgumentsInArray}, -{"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray}, -{ - "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0X_selectXa_bX", -IgnoreReason.PNotDeserializationProblem -}, -{ - "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20_andXltX29X_orXeqX35_name", -IgnoreReason.PNotDeserializationProblem -}, -{ - "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXd_selectXa_b_c_dX", -IgnoreReason.PNotDeserializationProblem -} +{"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray} }; private static class Keywords