This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch gvalue in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 05ea46fa44966f0d271f1e18c872a43d44f02eac Author: Stephen Mallette <[email protected]> AuthorDate: Mon Oct 28 11:53:45 2024 -0400 wip --- .../traversal/dsl/graph/GraphTraversal.java | 4 - .../gremlin/test/features/map/Edge.feature | 261 ++++++++++++++++++++- .../gremlin/test/features/map/Vertex.feature | 248 +------------------- 3 files changed, 261 insertions(+), 252 deletions(-) diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java index 572c46f52b..a780f742a3 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java @@ -238,10 +238,6 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> { * Exposes administrative methods that are either internal to TinkerPop or for users with advanced needs. This * separation helps keep the Gremlin API more concise. Any {@code GraphTraversal} can get an instance of its * administrative form by way of {@link GraphTraversal#asAdmin()}. - * <p/> - * Note that step overloads allowing use of {@link GValue} objects do not construct bytecode with that object. - * Bytecode does not make use of parameterization in that fashion so it there isn't a need to really preserve that - * functionality there (doing so would require changes to serializers). */ public interface Admin<S, E> extends Traversal.Admin<S, E>, GraphTraversal<S, E> { diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Edge.feature b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Edge.feature index f3d92320d2..7d75a251af 100644 --- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Edge.feature +++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Edge.feature @@ -16,7 +16,117 @@ # under the License. @StepClassMap @StepE -Feature: Step - E() +Feature: Step - E(), inV(), outV(), bothV(), otherV() + + Scenario: g_E + Given the modern graph + And the traversal of + """ + g.E() + """ + When iterated to list + Then the result should be unordered + | result | + | e[marko-created->lop] | + | e[marko-knows->josh] | + | e[marko-knows->vadas] | + | e[peter-created->lop] | + | e[josh-created->lop] | + | e[josh-created->ripple] | + + Scenario: g_EX11X + Given the modern graph + And using the parameter eid11 defined as "e[josh-created->lop].id" + And the traversal of + """ + g.E(eid11) + """ + When iterated to list + Then the result should be unordered + | result | + | e[josh-created->lop] | + + Scenario: g_EX11AsStringX + Given the modern graph + And using the parameter eid11 defined as "e[josh-created->lop].sid" + And the traversal of + """ + g.E(eid11) + """ + When iterated to list + Then the result should be unordered + | result | + | e[josh-created->lop] | + + Scenario: g_EXe11X + Given the modern graph + And using the parameter e11 defined as "e[josh-created->lop]" + And the traversal of + """ + g.E(e11) + """ + When iterated to list + Then the result should be unordered + | result | + | e[josh-created->lop] | + + Scenario: g_EXe7_e11X + Given the modern graph + And using the parameter e7 defined as "e[marko-knows->vadas]" + And using the parameter e11 defined as "e[josh-created->lop]" + And the traversal of + """ + g.E(e7,e11) + """ + When iterated to list + Then the result should be unordered + | result | + | e[marko-knows->vadas] | + | e[josh-created->lop] | + + Scenario: g_EXlistXe7_e11XX + Given the modern graph + And using the parameter xx1 defined as "l[e[marko-knows->vadas],e[josh-created->lop]]" + And the traversal of + """ + g.E(xx1) + """ + When iterated to list + Then the result should be unordered + | result | + | e[marko-knows->vadas] | + | e[josh-created->lop] | + + Scenario: g_EXnullX + Given the modern graph + And the traversal of + """ + g.E(null) + """ + When iterated to list + Then the result should be empty + + Scenario: g_EXlistXnullXX + Given the modern graph + And using the parameter xx1 defined as "l[null]" + And the traversal of + """ + g.E(xx1) + """ + When iterated to list + Then the result should be empty + + Scenario: g_EX11_nullX + Given the modern graph + And using the parameter eid11 defined as "e[josh-created->lop].id" + And the traversal of + """ + g.E(eid11,null) + """ + When iterated to list + Then the result should be unordered + | result | + | e[josh-created->lop] | Scenario: g_V_EX11X Given the modern graph @@ -97,3 +207,152 @@ Feature: Step - E() When iterated to list Then the result should have a count of 1 And the graph should return 1 for count of "g.E().hasLabel(\"tests\")" + + Scenario: g_VX1X_outE_inV + Given the modern graph + And using the parameter vid1 defined as "v[marko].id" + And the traversal of + """ + g.V(vid1).outE().inV() + """ + When iterated to list + Then the result should be unordered + | result | + | v[vadas] | + | v[josh] | + | v[lop] | + + Scenario: g_VX2X_inE_outV + Given the modern graph + And using the parameter vid2 defined as "v[vadas].id" + And the traversal of + """ + g.V(vid2).inE().outV() + """ + When iterated to list + Then the result should be unordered + | result | + | v[marko] | + + Scenario: g_V_outE_hasXweight_1X_outV + Given the modern graph + And the traversal of + """ + g.V().outE().has("weight",1.0).outV() + """ + When iterated to list + Then the result should be unordered + | result | + | v[marko] | + | v[josh] | + + Scenario: g_VX1X_outE_otherV + Given the modern graph + And using the parameter vid1 defined as "v[marko].id" + And the traversal of + """ + g.V(vid1).outE().otherV() + """ + When iterated to list + Then the result should be unordered + | result | + | v[vadas] | + | v[josh] | + | v[lop] | + + Scenario: g_VX4X_bothE_otherV + Given the modern graph + And using the parameter vid4 defined as "v[josh].id" + And the traversal of + """ + g.V(vid4).bothE().otherV() + """ + When iterated to list + Then the result should be unordered + | result | + | v[marko] | + | v[ripple] | + | v[lop] | + + Scenario: g_VX4X_bothE_hasXweight_lt_1X_otherV + Given the modern graph + And using the parameter vid4 defined as "v[josh].id" + And the traversal of + """ + g.V(vid4).bothE().has("weight", P.lt(1.0)).otherV() + """ + When iterated to list + Then the result should be unordered + | result | + | v[lop] | + + Scenario: get_g_VX1X_outE_otherV + Given the modern graph + And using the parameter vid1 defined as "v[marko].id" + And the traversal of + """ + g.V(vid1).outE().otherV() + """ + When iterated to list + Then the result should be unordered + | result | + | v[vadas] | + | v[josh] | + | v[lop] | + + Scenario: g_VX1X_outEXknowsX_inV + Given the modern graph + And using the parameter vid1 defined as "v[marko].id" + And the traversal of + """ + g.V(vid1).outE("knows").inV() + """ + When iterated to list + Then the result should be unordered + | result | + | v[vadas] | + | v[josh] | + + Scenario: g_VX1X_outEXknows_createdX_inV + Given the modern graph + And using the parameter vid1 defined as "v[marko].id" + And the traversal of + """ + g.V(vid1).outE("knows","created").inV() + """ + When iterated to list + Then the result should be unordered + | result | + | v[vadas] | + | v[josh] | + | v[lop] | + + Scenario: g_VX1X_outEXknowsX_bothV + Given the modern graph + And using the parameter vid1 defined as "v[marko].id" + And the traversal of + """ + g.V(vid1).outE("knows").bothV() + """ + When iterated to list + Then the result should be unordered + | result | + | v[marko] | + | v[marko] | + | v[josh] | + | v[vadas] | + + Scenario: g_VX1X_outEXknowsX_bothV_name + Given the modern graph + And using the parameter vid1 defined as "v[marko].id" + And the traversal of + """ + g.V(vid1).outE("knows").bothV().values("name") + """ + When iterated to list + Then the result should be unordered + | result | + | marko | + | marko | + | josh | + | vadas | \ No newline at end of file diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Vertex.feature b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Vertex.feature index f0b3c95a93..3f8912211b 100644 --- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Vertex.feature +++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Vertex.feature @@ -16,7 +16,7 @@ # under the License. @StepClassMap @StepVertex -Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE() +Feature: Step - V(), out(), in(), both(), inE(), outE(), bothE() Scenario: g_VXnullX Given the modern graph @@ -147,116 +147,6 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE() | v[lop] | | v[ripple] | - Scenario: g_E - Given the modern graph - And the traversal of - """ - g.E() - """ - When iterated to list - Then the result should be unordered - | result | - | e[marko-created->lop] | - | e[marko-knows->josh] | - | e[marko-knows->vadas] | - | e[peter-created->lop] | - | e[josh-created->lop] | - | e[josh-created->ripple] | - - Scenario: g_EX11X - Given the modern graph - And using the parameter eid11 defined as "e[josh-created->lop].id" - And the traversal of - """ - g.E(eid11) - """ - When iterated to list - Then the result should be unordered - | result | - | e[josh-created->lop] | - - Scenario: g_EX11AsStringX - Given the modern graph - And using the parameter eid11 defined as "e[josh-created->lop].sid" - And the traversal of - """ - g.E(eid11) - """ - When iterated to list - Then the result should be unordered - | result | - | e[josh-created->lop] | - - Scenario: g_EXe11X - Given the modern graph - And using the parameter e11 defined as "e[josh-created->lop]" - And the traversal of - """ - g.E(e11) - """ - When iterated to list - Then the result should be unordered - | result | - | e[josh-created->lop] | - - Scenario: g_EXe7_e11X - Given the modern graph - And using the parameter e7 defined as "e[marko-knows->vadas]" - And using the parameter e11 defined as "e[josh-created->lop]" - And the traversal of - """ - g.E(e7,e11) - """ - When iterated to list - Then the result should be unordered - | result | - | e[marko-knows->vadas] | - | e[josh-created->lop] | - - Scenario: g_EXlistXe7_e11XX - Given the modern graph - And using the parameter xx1 defined as "l[e[marko-knows->vadas],e[josh-created->lop]]" - And the traversal of - """ - g.E(xx1) - """ - When iterated to list - Then the result should be unordered - | result | - | e[marko-knows->vadas] | - | e[josh-created->lop] | - - Scenario: g_EXnullX - Given the modern graph - And the traversal of - """ - g.E(null) - """ - When iterated to list - Then the result should be empty - - Scenario: g_EXlistXnullXX - Given the modern graph - And using the parameter xx1 defined as "l[null]" - And the traversal of - """ - g.E(xx1) - """ - When iterated to list - Then the result should be empty - - Scenario: g_EX11_nullX - Given the modern graph - And using the parameter eid11 defined as "e[josh-created->lop].id" - And the traversal of - """ - g.E(eid11,null) - """ - When iterated to list - Then the result should be unordered - | result | - | e[josh-created->lop] | - Scenario: g_VX1X_outE Given the modern graph And using the parameter vid1 defined as "v[marko].id" @@ -310,44 +200,6 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE() | e[josh-created->ripple] | | e[marko-knows->josh] | - Scenario: g_VX1X_outE_inV - Given the modern graph - And using the parameter vid1 defined as "v[marko].id" - And the traversal of - """ - g.V(vid1).both() - """ - When iterated to list - Then the result should be unordered - | result | - | v[vadas] | - | v[josh] | - | v[lop] | - - Scenario: g_VX2X_inE_outV - Given the modern graph - And using the parameter vid2 defined as "v[vadas].id" - And the traversal of - """ - g.V(vid2).inE().outV() - """ - When iterated to list - Then the result should be unordered - | result | - | v[marko] | - - Scenario: g_V_outE_hasXweight_1X_outV - Given the modern graph - And the traversal of - """ - g.V().outE().has("weight",1.0).outV() - """ - When iterated to list - Then the result should be unordered - | result | - | v[marko] | - | v[josh] | - Scenario: g_V_out_outE_inV_inE_inV_both_name Given the modern graph And the traversal of @@ -368,61 +220,6 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE() | peter | | peter | - Scenario: g_VX1X_outEXknowsX_bothV_name - Given the modern graph - And using the parameter vid1 defined as "v[marko].id" - And the traversal of - """ - g.V(vid1).outE("knows").bothV().values("name") - """ - When iterated to list - Then the result should be unordered - | result | - | marko | - | marko | - | josh | - | vadas | - - Scenario: g_VX1X_outE_otherV - Given the modern graph - And using the parameter vid1 defined as "v[marko].id" - And the traversal of - """ - g.V(vid1).outE().otherV() - """ - When iterated to list - Then the result should be unordered - | result | - | v[vadas] | - | v[josh] | - | v[lop] | - - Scenario: g_VX4X_bothE_otherV - Given the modern graph - And using the parameter vid4 defined as "v[josh].id" - And the traversal of - """ - g.V(vid4).bothE().otherV() - """ - When iterated to list - Then the result should be unordered - | result | - | v[marko] | - | v[ripple] | - | v[lop] | - - Scenario: g_VX4X_bothE_hasXweight_lt_1X_otherV - Given the modern graph - And using the parameter vid4 defined as "v[josh].id" - And the traversal of - """ - g.V(vid4).bothE().has("weight", P.lt(1.0)).otherV() - """ - When iterated to list - Then the result should be unordered - | result | - | v[lop] | - Scenario: g_VX2X_inE Given the modern graph And using the parameter vid2 defined as "v[vadas].id" @@ -435,20 +232,6 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE() | result | | e[marko-knows->vadas] | - Scenario: get_g_VX1X_outE_otherV - Given the modern graph - And using the parameter vid1 defined as "v[marko].id" - And the traversal of - """ - g.V(vid1).outE().otherV() - """ - When iterated to list - Then the result should be unordered - | result | - | v[vadas] | - | v[josh] | - | v[lop] | - Scenario: g_VX1X_outXknowsX Given the modern graph And using the parameter vid1 defined as "v[marko].id" @@ -489,33 +272,6 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE() | v[josh] | | v[lop] | - Scenario: g_VX1X_outEXknowsX_inV - Given the modern graph - And using the parameter vid1 defined as "v[marko].id" - And the traversal of - """ - g.V(vid1).outE("knows").inV() - """ - When iterated to list - Then the result should be unordered - | result | - | v[vadas] | - | v[josh] | - - Scenario: g_VX1X_outEXknows_createdX_inV - Given the modern graph - And using the parameter vid1 defined as "v[marko].id" - And the traversal of - """ - g.V(vid1).outE("knows","created").inV() - """ - When iterated to list - Then the result should be unordered - | result | - | v[vadas] | - | v[josh] | - | v[lop] | - Scenario: g_V_out_out Given the modern graph And the traversal of @@ -565,8 +321,6 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE() | v[vadas] | | v[josh] | - - # the point here is to test g.V() where an id is not present. to do this with the gherkin structure # the test establishes the modern graph, does a drop() of "lop" and then tries to query the 4 vertices # and we assert the count of 3
