You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2021/09/14 10:57:05 UTC
[tinkerpop] branch TINKERPOP-2601 updated (94dd1c7 -> 0725d41)
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a change to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.
discard 94dd1c7 TINKERPOP-2601 Fixes after rebase that brought in some null tests
discard b6a221c TINKERPOP-2601 Fixed mistype in suite definition
discard daff9ab TINKERPOP-2601 Fixed failing gherkin test configurations
discard 0defd89 TINKERPOP-2601 Introduced a limited process test suite
discard e5d0b0c TINKERPOP-2601 Remove logging for gherkin from python
discard 480cf16 TINKERPOP-2601 Added connectedComponent() to grammar
discard 09d44d3 TINKERPOP-2601 TinkerGraph no longer needs cucumber.properties
discard d618078 TINKERPOP-2601 Added further provider documentation on Gherkin tests
discard fc89901 TINKERPOP-2601 Improved support around withComputer() testing
discard 66118d0 TINKERPOP-2601 Added gherkin tests to Spark
discard b23c50c TINKERPOP-2601 Set up gherkin for HadoopGraph
discard 2877d1e TINKERPOP-2601 Added group tags to feature tests
discard 45b2b7c TINKERPOP-2601 Packaged up feature/data files into a gremlin-test zip distribution.
discard 036c07d TINKERPOP-2601 Add io() support for Gherkin tests on jvm
discard 72f9b5d TINKERPOP-2601 Documentation for Gherkin for providers
discard 6f24d53 TINKERPOP-2601 Neo4jGraph running gherkin tests
discard 348a0b7 TINKERPOP-2601 Basics in place for Gherkin test to run on JVM
add cf81782 Fixed null handling in grammar
add 3cb89c2 Merge branch '3.5-dev'
new a4cb0c4 TINKERPOP-2601 Basics in place for Gherkin test to run on JVM
new c5487f5 TINKERPOP-2601 Neo4jGraph running gherkin tests
new 42e7019 TINKERPOP-2601 Documentation for Gherkin for providers
new 8061ed8 TINKERPOP-2601 Add io() support for Gherkin tests on jvm
new 9243d1b TINKERPOP-2601 Packaged up feature/data files into a gremlin-test zip distribution.
new 9d684ca TINKERPOP-2601 Added group tags to feature tests
new c12fb99 TINKERPOP-2601 Set up gherkin for HadoopGraph
new 445765d TINKERPOP-2601 Added gherkin tests to Spark
new aaa73b0 TINKERPOP-2601 Improved support around withComputer() testing
new 2bd208a TINKERPOP-2601 Added further provider documentation on Gherkin tests
new 8a35722 TINKERPOP-2601 TinkerGraph no longer needs cucumber.properties
new d6afb71 TINKERPOP-2601 Added connectedComponent() to grammar
new d3a0aa0 TINKERPOP-2601 Remove logging for gherkin from python
new 6a48b6b TINKERPOP-2601 Introduced a limited process test suite
new e241b9e TINKERPOP-2601 Fixed failing gherkin test configurations
new f599f99 TINKERPOP-2601 Fixed mistype in suite definition
new 1bf906a TINKERPOP-2601 Fixes after rebase that brought in some null tests
new 0725d41 TINKERPOP-2601 Added tests for graphs that support null values
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (94dd1c7)
\
N -- N -- N refs/heads/TINKERPOP-2601 (0725d41)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 18 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
docs/src/dev/developer/for-committers.asciidoc | 2 ++
.../traversal/translator/DotNetTranslator.java | 12 ++++++++++-
.../Gherkin/GherkinTestRunner.cs | 18 ++++++++++++++++
.../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 3 +++
.../Gherkin/IgnoreException.cs | 7 ++++++-
.../gremlin-javascript/test/cucumber/gremlin.js | 3 +++
.../gremlin-javascript/test/cucumber/world.js | 4 ++++
.../src/main/python/radish/feature_steps.py | 7 +++++++
gremlin-python/src/main/python/radish/gremlin.py | 3 +++
gremlin-test/features/map/AddEdge.feature | 18 +++++++++++++++-
gremlin-test/features/map/AddVertex.feature | 24 ++++++++++++++++++++++
...t.java => TinkerGraphAllowNullFeatureTest.java} | 8 ++++----
.../tinkergraph/TinkerGraphFeatureTest.java | 2 +-
.../gremlin/tinkergraph/TinkerGraphWorld.java | 16 +++++++++++++++
.../io.cucumber.core.backend.ObjectFactory | 3 ++-
15 files changed, 121 insertions(+), 9 deletions(-)
copy tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/{TinkerGraphComputerFeatureTest.java => TinkerGraphAllowNullFeatureTest.java} (88%)
[tinkerpop] 17/18: TINKERPOP-2601 Fixes after rebase that brought
in some null tests
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 1bf906aaa7f0942d6f980ad0d529d31871aece90
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Mon Sep 13 15:15:33 2021 -0400
TINKERPOP-2601 Fixes after rebase that brought in some null tests
---
.../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 131 ++++++++++-----------
.../gremlin-javascript/test/cucumber/gremlin.js | 131 ++++++++++-----------
gremlin-python/src/main/python/radish/gremlin.py | 131 ++++++++++-----------
gremlin-test/features/filter/Where.feature | 1 +
gremlin-test/features/map/Mean.feature | 2 +
gremlin-test/features/map/Path.feature | 1 +
gremlin-test/features/map/Sum.feature | 2 +
.../tinkerpop/gremlin/features/StepDefinition.java | 12 +-
.../gremlin/tinkergraph/TinkerGraphWorld.java | 4 +-
9 files changed, 212 insertions(+), 203 deletions(-)
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
index b910a7e..32dc71d 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
@@ -87,7 +87,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_VX2X_optionalXinXknowsXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid2"]).Optional<object>(__.In("knows"))}},
{"g_V_hasLabelXpersonX_optionalXoutXknowsX_optionalXoutXcreatedXXX_path", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").Optional<object>(__.Out("knows").Optional<object>(__.Out("created"))).Path()}},
{"g_V_optionalXout_optionalXoutXX_path", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Optional<object>(__.Out().Optional<object>(__.Out())).Path()}},
- {"g_VX1X_optionalXaddVXdogXX_label", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh").Property("age",32).As("josh" [...]
+ {"g_VX1X_optionalXaddVXdogXX_label", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property("lang","java") [...]
{"g_V_repeatXoutX_timesX2X_emit_path", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Repeat(__.Out()).Times(2).Emit().Path()}},
{"g_V_repeatXoutX_timesX2X_repeatXinX_timesX2X_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Repeat(__.Out()).Times(2).Repeat(__.In()).Times(2).Values<object>("name")}},
{"g_V_repeatXoutE_inVX_timesX2X_path_by_name_by_label", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Repeat(__.OutE().InV()).Times(2).Path().By("name").By(T.Label)}},
@@ -139,7 +139,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_V_both_both_name_dedup", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Both().Both().Values<object>("name").Dedup()}},
{"g_V_both_both_dedup", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Both().Both().Dedup()}},
{"g_V_both_both_dedup_byXlabelX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Both().Both().Dedup().By(T.Label)}},
- {"g_V_group_byXlabelX_byXbothE_weight_dedup_foldX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group<object,object>().By(T.Label).By(__.BothE().Values<object>("weight").Dedup().Fold())}},
+ {"g_V_group_byXlabelX_byXbothE_weight_dedup_foldX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group<object,object>().By(T.Label).By(__.BothE().Values<object>("weight").Dedup().Order().By(Order.Asc).Fold())}},
{"g_V_asXaX_both_asXbX_dedupXa_bX_byXlabelX_selectXa_bX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().As("a").Both().As("b").Dedup("a","b").By(T.Label).Select<object>("a","b")}},
{"g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_dedupXa_bX_path", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().As("a").Out("created").As("b").In("created").As("c").Dedup("a","b").Path()}},
{"g_V_outE_asXeX_inV_asXvX_selectXeX_order_byXweight_ascX_selectXvX_valuesXnameX_dedup", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().OutE().As("e").InV().As("v").Select<object>("e").Order().By("weight",Order.Asc).Select<object>("v").Values<object>("name").Dedup()}},
@@ -155,7 +155,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_V_drop", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV().As("a").AddV().As("b").AddE("knows").To("a"), (g,p) =>g.V().Drop(), (g,p) =>g.V(), (g,p) =>g.E()}},
{"g_V_outE_drop", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV().As("a").AddV().As("b").AddE("knows").To("a"), (g,p) =>g.V().OutE().Drop(), (g,p) =>g.V(), (g,p) =>g.E()}},
{"g_V_properties_drop", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV().Property("name","bob").AddV().Property("name","alice"), (g,p) =>g.V().Properties<object>().Drop(), (g,p) =>g.V(), (g,p) =>g.V().Properties<object>()}},
- {"g_E_propertiesXweightX_drop", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh").Property("age",32).As("josh").Add [...]
+ {"g_E_propertiesXweightX_drop", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property("lang","java").As(" [...]
{"g_V_properties_propertiesXstartTimeX_drop", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV().Property("name","bob").Property(Cardinality.List,"location","ny","startTime",2014,"endTime",2016).Property(Cardinality.List,"location","va","startTime",2016).AddV().Property("name","alice").Property(Cardinality.List,"location","va","startTime",2014,"endTime",2016).Property(Cardinality.List,"location","ny","startTime",2016), (g,p) =>g [...]
{"g_V_filterXfalseX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Filter((IPredicate) p["pred1"])}},
{"g_V_filterXtrueX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Filter((IPredicate) p["pred1"])}},
@@ -283,7 +283,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_V_valuesXnameX_order_tailX2X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Values<object>("name").Order().Tail<object>(2)}},
{"g_V_valuesXnameX_order_tail", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Values<object>("name").Order().Tail<object>()}},
{"g_V_valuesXnameX_order_tailX7X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Values<object>("name").Order().Tail<object>(7)}},
- {"g_V_repeatXbothX_timesX3X_tailX7X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Repeat(__.Both()).Times(3).Tail<object>(7)}},
{"g_V_repeatXin_outX_timesX3X_tailX7X_count", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Repeat(__.In().Out()).Times(3).Tail<object>(7).Count()}},
{"g_V_asXaX_out_asXaX_out_asXaX_selectXaX_byXunfold_valuesXnameX_foldX_tailXlocal_1X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().As("a").Out().As("a").Out().As("a").Select<object>("a").By(__.Unfold<object>().Values<object>("name").Fold()).Tail<object>(Scope.Local,1)}},
{"g_V_asXaX_out_asXaX_out_asXaX_selectXaX_byXunfold_valuesXnameX_foldX_tailXlocalX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().As("a").Out().As("a").Out().As("a").Select<object>("a").By(__.Unfold<object>().Values<object>("name").Fold()).Tail<object>(Scope.Local)}},
@@ -317,33 +316,33 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().As("a").OutE("created").As("b").InV().As("c").In("created").As("d").Where("a",P.Lt("b").Or(P.Gt("c")).And(P.Neq("d"))).By("age").By("weight").By(__.In("created").Values<object>("age").Min<object>()).Select<object>("a","c [...]
{"g_VX1X_asXaX_out_hasXageX_whereXgtXaXX_byXageX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).As("a").Out().Has("age").Where(P.Gt("a")).By("age").Values<object>("name")}},
{"g_VX3X_asXaX_in_out_asXbX_whereXa_eqXbXX_byXageX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid3"]).As("a").In().Out().As("b").Where("a",P.Eq("b")).By("age").Values<object>("name")}},
- {"g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh").Property("age [...]
- {"g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX_propertyXweight_2X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","j [...]
- {"g_V_outE_propertyXweight_nullX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh").Property("age",32).As("josh"). [...]
- {"g_V_aggregateXxX_asXaX_selectXxX_unfold_addEXexistsWithX_toXaX_propertyXtime_nowX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Pro [...]
- {"g_V_asXaX_outXcreatedX_inXcreatedX_whereXneqXaXX_asXbX_addEXcodeveloperX_fromXaX_toXbX_propertyXyear_2009X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("pers [...]
- {"g_V_asXaX_inXcreatedX_addEXcreatedByX_fromXaX_propertyXyear_2009X_propertyXacl_publicX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4 [...]
- {"g_withSideEffectXb_bX_VXaX_addEXknowsX_toXbX_propertyXweight_0_5X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","jo [...]
+ {"g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property [...]
+ {"g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX_propertyXweight_2X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name" [...]
+ {"g_V_outE_propertyXweight_nullX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property("lang","java").A [...]
+ {"g_V_aggregateXxX_asXaX_selectXxX_unfold_addEXexistsWithX_toXaX_propertyXtime_nowX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software"). [...]
+ {"g_V_asXaX_outXcreatedX_inXcreatedX_whereXneqXaXX_asXbX_addEXcodeveloperX_fromXaX_toXbX_propertyXyear_2009X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As( [...]
+ {"g_V_asXaX_inXcreatedX_addEXcreatedByX_fromXaX_propertyXyear_2009X_propertyXacl_publicX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("softwa [...]
+ {"g_withSideEffectXb_bX_VXaX_addEXknowsX_toXbX_propertyXweight_0_5X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name", [...]
{"g_addV_asXfirstX_repeatXaddEXnextX_toXaddVX_inVX_timesX5X_addEXnextX_toXselectXfirstXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV().As("first").Repeat(__.AddE("next").To(__.AddV()).InV()).Times(5).AddE("next").To(__.Select<object>("first")), (g,p) =>g.V(), (g,p) =>g.E(), (g,p) =>g.E().HasLabel("next"), (g,p) =>g.V().Limit<object>(1).BothE(), (g,p) =>g.V().Limit<object>(1).InE(), (g,p) =>g.V().Limit<object>(1).OutE()}},
- {"g_V_hasXname_markoX_asXaX_outEXcreatedX_asXbX_inV_addEXselectXbX_labelX_toXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Propert [...]
- {"g_addEXV_outE_label_groupCount_orderXlocalX_byXvalues_descX_selectXkeysX_unfold_limitX1XX_fromXV_hasXname_vadasXX_toXV_hasXname_lopXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang"," [...]
- {"g_addEXknowsX_fromXaX_toXbX_propertyXweight_0_1X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh").Property("ag [...]
- {"g_VXaX_addEXknowsX_toXbX_propertyXweight_0_1X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh").Property("age", [...]
- {"g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("na [...]
- {"g_V_addVXanimalX_propertyXage_0X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh").Property("age",32).As("josh" [...]
- {"g_addVXpersonX_propertyXname_stephenX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh").Property("age",32).As(" [...]
- {"g_V_hasLabelXpersonX_propertyXname_nullX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh").Property("age",32).A [...]
- {"g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property( [...]
- {"get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T. [...]
- {"g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Proper [...]
- {"g_addVXanimalX_propertyXname_mateoX_propertyXname_gateoX_propertyXname_cateoX_propertyXage_5X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property [...]
- {"g_withSideEffectXa_markoX_addV_propertyXname_selectXaXX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh"). [...]
- {"g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4 [...]
- {"g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Pro [...]
- {"g_withSideEffectXa_testX_V_hasLabelXsoftwareX_propertyXtemp_selectXaXX_valueMapXname_tempX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T. [...]
- {"g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh"). [...]
- {"g_V_asXaX_hasXname_markoX_outXcreatedX_asXbX_addVXselectXaX_labelX_propertyXtest_selectXbX_labelX_valueMap_withXtokensX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop [...]
- {"g_addVXV_hasXname_markoX_propertiesXnameX_keyX_label", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh").Property [...]
+ {"g_V_hasXname_markoX_asXaX_outEXcreatedX_asXbX_inV_addEXselectXbX_labelX_toXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Prop [...]
+ {"g_addEXV_outE_label_groupCount_orderXlocalX_byXvalues_descX_selectXkeysX_unfold_limitX1XX_fromXV_hasXname_vadasXX_toXV_hasXname_lopXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","jo [...]
+ {"g_addEXknowsX_fromXaX_toXbX_propertyXweight_0_1X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Propert [...]
+ {"g_VXaX_addEXknowsX_toXbX_propertyXweight_0_1X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property(" [...]
+ {"g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property( [...]
+ {"g_V_addVXanimalX_propertyXage_0X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property("lang","java") [...]
+ {"g_addVXpersonX_propertyXname_stephenX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property("lang","j [...]
+ {"g_V_hasLabelXpersonX_propertyXname_nullX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property("lang" [...]
+ {"g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Proper [...]
+ {"get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("so [...]
+ {"g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Pro [...]
+ {"g_addVXanimalX_propertyXname_mateoX_propertyXname_gateoX_propertyXname_cateoX_propertyXage_5X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV( [...]
+ {"g_withSideEffectXa_markoX_addV_propertyXname_selectXaXX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripp [...]
+ {"g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("softwa [...]
+ {"g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh"). [...]
+ {"g_withSideEffectXa_testX_V_hasLabelXsoftwareX_propertyXtemp_selectXaXX_valueMapXname_tempX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("so [...]
+ {"g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripp [...]
+ {"g_V_asXaX_hasXname_markoX_outXcreatedX_asXbX_addVXselectXaX_labelX_propertyXtest_selectXbX_labelX_valueMap_withXtokensX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property( [...]
+ {"g_addVXV_hasXname_markoX_propertiesXnameX_keyX_label", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Pro [...]
{"g_addVXnullX_propertyXid_nullX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV((string) null).Property(T.Id,null), (g,p) =>g.V().HasLabel("vertex")}},
{"g_addV_propertyXlabel_personX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV().Property(T.Label,"person"), (g,p) =>g.V().HasLabel("person")}},
{"g_V_coalesceXoutXfooX_outXbarXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Coalesce<object>(__.Out("foo"),__.Out("bar"))}},
@@ -352,10 +351,10 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_V_coalesceXoutXlikesX_outXknowsX_inXcreatedXX_groupCount_byXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Coalesce<object>(__.Out("likes"),__.Out("knows"),__.Out("created")).GroupCount<object>().By("name")}},
{"g_V_coalesceXoutEXknowsX_outEXcreatedXX_otherV_path_byXnameX_byXlabelX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Coalesce<object>(__.OutE("knows"),__.OutE("created")).OtherV().Path().By("name").By(T.Label)}},
{"g_V_outXcreatedX_order_byXnameX_coalesceXname_constantXxXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Out("created").Order().By("name").Coalesce<object>(__.Values<object>("name"),__.Constant<object>("x"))}},
- {"g_V_connectedComponent_hasXcomponentX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().ConnectedComponent().Has("gremlin.connectedComponentVertexProgram.component")}},
- {"g_V_dedup_connectedComponent_hasXcomponentX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Dedup().ConnectedComponent().Has("gremlin.connectedComponentVertexProgram.component")}},
- {"g_V_hasLabelXsoftwareX_connectedComponent_project_byXnameX_byXcomponentX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().HasLabel("software").ConnectedComponent().Project<object>("name","component").By("name").By("gremlin.connectedComponentVertexProgram.component")}},
- {"g_V_connectedComponent_withXEDGES_bothEXknowsXX_withXPROPERTY_NAME_clusterX_project_byXnameX_byXclusterX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().HasLabel("person").ConnectedComponent().With("~tinkerpop.connectedComponent.edges",__.BothE("knows")).With("~tinkerpop.connectedComponent.propertyName","cl [...]
+ {"g_V_connectedComponent_hasXcomponentX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().ConnectedComponent().Has("gremlin.connectedComponentVertexProgram.component")}},
+ {"g_V_dedup_connectedComponent_hasXcomponentX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Dedup().ConnectedComponent().Has("gremlin.connectedComponentVertexProgram.component")}},
+ {"g_V_hasLabelXsoftwareX_connectedComponent_project_byXnameX_byXcomponentX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("software").ConnectedComponent().Project<object>("name","component").By("name").By("gremlin.connectedComponentVertexProgram.component")}},
+ {"g_V_connectedComponent_withXEDGES_bothEXknowsXX_withXPROPERTY_NAME_clusterX_project_byXnameX_byXclusterX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").ConnectedComponent().With("~tinkerpop.connectedComponent.edges",__.BothE("knows")).With("~tinkerpop.connectedComponent.propertyName","cluster").Project<object>("name","cluster").By("name").By("cluster")}},
{"g_V_constantX123X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Constant<object>(123)}},
{"g_V_constantXnullX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Constant<object>(null)}},
{"g_V_chooseXhasLabelXpersonX_valuesXnameX_constantXinhumanXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Choose<object>(__.HasLabel("person"),__.Values<object>("name"),__.Constant<object>("inhuman"))}},
@@ -378,7 +377,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_VX1X_V_valuesXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).V().Values<object>("name")}},
{"g_V_outXknowsX_V_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Out("knows").V().Values<object>("name")}},
{"g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("artist","name","Garcia").In("sungBy").As("song").V().Has("artist","name","Willie_Dixon").In("writtenBy").Where(P.Eq("song")).Values<object>("name")}},
- {"g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property(T.Id,1).Property("name","marko").Property("age",29).As("marko").AddV("person").Property(T.Id,2).Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property(T.Id,3).Property("name","lop").Property("lang","java").As("lop").AddV("person").Property(T.Id,4).Property("name","josh").Propert [...]
+ {"g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Pr [...]
{"g_V_hasLabelXsoftwareX_index_unfold", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("software").Index<object>().Unfold<object>()}},
{"g_V_hasLabelXsoftwareX_order_byXnameX_index_withXmapX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("software").Order().By("name").Index<object>().With("~tinkerpop.index.indexer",1)}},
{"g_V_hasLabelXsoftwareX_name_fold_orderXlocalX_index_unfold_order_byXtailXlocal_1XX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("software").Values<object>("name").Fold().Order(Scope.Local).Index<object>().Unfold<object>().Order().By(__.Tail<object>(Scope.Local,1))}},
@@ -484,7 +483,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_V_properties_order_byXkey_descX_key", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Properties<object>().Order().By(T.Key,Order.Desc).Key()}},
{"g_V_hasLabelXpersonX_order_byXvalueXageX_descX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").Order().By((IFunction) p["l1"],Order.Desc).Values<object>("name")}},
{"g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").Group<object,object>().By("name").By(__.OutE().Values<object>("weight").Sum<object>()).Order(Scope.Local).By(Column.Values)}},
- {"g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_descX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Map<object>(__.BothE().Values<object>("weight").Fold()).Order().By(__.Sum<object>(Scope.Local),Order.Desc)}},
+ {"g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_descX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Map<object>(__.BothE().Values<object>("weight").Order().By(Order.Asc).Fold()).Order().By(__.Sum<object>(Scope.Local),Order.Desc)}},
{"g_V_group_byXlabelX_byXname_order_byXdescX_foldX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group<object,object>().By(T.Label).By(__.Values<object>("name").Order().By(Order.Desc).Fold())}},
{"g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_descX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").Group<object,object>().By("name").By(__.OutE().Values<object>("weight").Sum<object>()).Unfold<object>().Order().By(Column.Values,Order.Desc)}},
{"g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_descX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().As("v").Map<object>(__.BothE().Values<object>("weight").Fold()).Sum<object>(Scope.Local).As("s").Select<object>("v","s").Order().By(__.Select<object>("s"),Order.Desc)}},
@@ -495,15 +494,15 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_V_orXhasLabelXpersonX_hasXsoftware_name_lopXX_order_byXageX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Or(__.HasLabel("person"),__.Has("software","name","lop")).Order().By("age")}},
{"g_VX1X_hasXlabel_personX_mapXmapXint_ageXX_orderXlocalX_byXvalues_descX_byXkeys_ascX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V((Vertex) p["v1"]).HasLabel("person").Map<object>((IFunction) p["l1"]).Order(Scope.Local).By(Column.Values,Order.Desc).By(Column.Keys,Order.Asc)}},
{"g_VX1X_elementMap_orderXlocalX_byXkeys_descXunfold", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).ElementMap<object>().Order(Scope.Local).By(Column.Keys,Order.Desc).Unfold<object>()}},
- {"g_V_pageRank_hasXpageRankX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().PageRank().Has("gremlin.pageRankVertexProgram.pageRank"), (g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().PageRank().Has("gremlin.pageRankVertexPro [...]
- {"g_V_outXcreatedX_pageRank_withXedges_bothEX_withXpropertyName_projectRankX_withXtimes_0X_valueMapXname_projectRankX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Out("created").PageRank().With("~tinkerpop.pageRank.edges",__.BothE()).With("~tinkerpop.pageRank.propertyName","projectRank").With("~tinkerpop.p [...]
- {"g_V_pageRank_order_byXpageRank_descX_byXnameX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().PageRank().Order().By("gremlin.pageRankVertexProgram.pageRank",Order.Desc).By("name").Values<object>("name")}},
- {"g_V_pageRank_order_byXpageRank_descX_name_limitX2X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().PageRank().Order().By("gremlin.pageRankVertexProgram.pageRank",Order.Desc).Values<object>("name").Limit<object>(2)}},
- {"g_V_pageRank_withXedges_outEXknowsXX_withXpropertyName_friendRankX_project_byXnameX_byXvaluesXfriendRankX_mathX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().PageRank().With("~tinkerpop.pageRank.edges",__.OutE("knows")).With("~tinkerpop.pageRank.propertyName","friendRank").Project<object>("name","friendRa [...]
- {"g_V_hasLabelXpersonX_pageRank_withXpropertyName_kpageRankX_project_byXnameX_byXvaluesXpageRankX_mathX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().HasLabel("person").PageRank().With("~tinkerpop.pageRank.propertyName","pageRank").Project<object>("name","pageRank").By("name").By(__.Values<object>("pageRank [...]
- {"g_V_pageRank_withXpropertyName_pageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX_by_byXmathX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().PageRank().With("~tinkerpop.pageRank.propertyName","pageRank").As("a").Out("knows").Values<object>("pageRank").As("b").Select<object>("a","b").By().By(__.Math("cei [...]
- {"g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_withXedges_inEXcreatedX_withXtimes_1X_withXpropertyName_priorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().HasLabel("software").Has("name","ripple").PageRank(1.0).With("~tinkerpop.pageRank.edges" [...]
- {"g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyName_pageRankX_withXedges_inEX_withXtimes_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Out("created").Group("m").By(T.Label).PageRank(1.0).With("~tinkerpop.pageRank.propertyName","pageRank").With("~ti [...]
+ {"g_V_pageRank_hasXpageRankX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().PageRank().Has("gremlin.pageRankVertexProgram.pageRank")}},
+ {"g_V_outXcreatedX_pageRank_withXedges_bothEX_withXpropertyName_projectRankX_withXtimes_0X_valueMapXname_projectRankX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Out("created").PageRank().With("~tinkerpop.pageRank.edges",__.BothE()).With("~tinkerpop.pageRank.propertyName","projectRank").With("~tinkerpop.pageRank.times",0).ValueMap<object,object>("name","projectRank")}},
+ {"g_V_pageRank_order_byXpageRank_descX_byXnameX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().PageRank().Order().By("gremlin.pageRankVertexProgram.pageRank",Order.Desc).By("name").Values<object>("name")}},
+ {"g_V_pageRank_order_byXpageRank_descX_name_limitX2X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().PageRank().Order().By("gremlin.pageRankVertexProgram.pageRank",Order.Desc).Values<object>("name").Limit<object>(2)}},
+ {"g_V_pageRank_withXedges_outEXknowsXX_withXpropertyName_friendRankX_project_byXnameX_byXvaluesXfriendRankX_mathX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().PageRank().With("~tinkerpop.pageRank.edges",__.OutE("knows")).With("~tinkerpop.pageRank.propertyName","friendRank").Project<object>("name","friendRank").By("name").By(__.Values<object>("friendRank").Math("ceil(_ * 100)"))}},
+ {"g_V_hasLabelXpersonX_pageRank_withXpropertyName_kpageRankX_project_byXnameX_byXvaluesXpageRankX_mathX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").PageRank().With("~tinkerpop.pageRank.propertyName","pageRank").Project<object>("name","pageRank").By("name").By(__.Values<object>("pageRank").Math("ceil(_ * 100)"))}},
+ {"g_V_pageRank_withXpropertyName_pageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX_by_byXmathX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().PageRank().With("~tinkerpop.pageRank.propertyName","pageRank").As("a").Out("knows").Values<object>("pageRank").As("b").Select<object>("a","b").By().By(__.Math("ceil(_ * 100)"))}},
+ {"g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_withXedges_inEXcreatedX_withXtimes_1X_withXpropertyName_priorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("software").Has("name","ripple").PageRank(1.0).With("~tinkerpop.pageRank.edges",__.InE("created")).With("~tinkerpop.pageRank.times",1).With("~tinkerpop.pageRank.propertyName","priors").In("created"). [...]
+ {"g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyName_pageRankX_withXedges_inEX_withXtimes_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Out("created").Group("m").By(T.Label).PageRank(1.0).With("~tinkerpop.pageRank.propertyName","pageRank").With("~tinkerpop.pageRank.edges",__.InE()).With("~tinkerpop.pageRank.times",1).In("created").Group("m").By("pageRank").Cap<object [...]
{"g_VX1X_name_path", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Values<object>("name").Path()}},
{"g_VX1X_out_path_byXageX_byXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Out().Path().By("age").By("name")}},
{"g_V_repeatXoutX_timesX2X_path_byXitX_byXnameX_byXlangX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Repeat(__.Out()).Times(2).Path().By().By("name").By("lang")}},
@@ -514,9 +513,9 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_VX1X_out_path_byXageX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Out().Path().By("age")}},
{"g_injectX1_null_nullX_path", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Inject<object>(1,null,null).Path()}},
{"g_injectX1_null_nullX_path_dedup", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Inject<object>(1,null,null).Path().Dedup()}},
- {"g_V_peerPressure_hasXclusterX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().PeerPressure().Has("gremlin.peerPressureVertexProgram.cluster"), (g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().PeerPressure().Has("gremlin.pee [...]
- {"g_V_peerPressure_withXpropertyName_clusterX_withXedges_outEXknowsXX_pageRankX1X_byXrankX_withXedges_outEXknowsX_withXtimes_2X_group_byXclusterX_byXrank_sumX_limitX100X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().PeerPressure().With("~tinkerpop.peerPressure.propertyName","cluster").With("~tinkerpop.peerP [...]
- {"g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withyXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Has("name","ripple").In("created").PeerPressure().With("~tinkerpop.peerPressure.edges",__.OutE()).With [...]
+ {"g_V_peerPressure_hasXclusterX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().PeerPressure().Has("gremlin.peerPressureVertexProgram.cluster")}},
+ {"g_V_peerPressure_withXpropertyName_clusterX_withXedges_outEXknowsXX_pageRankX1X_byXrankX_withXedges_outEXknowsX_withXtimes_2X_group_byXclusterX_byXrank_sumX_limitX100X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().PeerPressure().With("~tinkerpop.peerPressure.propertyName","cluster").With("~tinkerpop.peerPressure.edges",__.OutE("knows")).PageRank(1.0).With("~tinkerpop.pageRank.propertyName","rank").With("~tinkerpop.pageRank [...]
+ {"g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withyXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("name","ripple").In("created").PeerPressure().With("~tinkerpop.peerPressure.edges",__.OutE()).With("~tinkerpop.peerPressure.propertyName","cluster").Repeat(__.Union<object>(__.Identity(),__.Both())).Times(2).Dedup().Va [...]
{"g_V_hasLabelXpersonX_projectXa_bX_byXoutE_countX_byXageX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").Project<object>("a","b").By(__.OutE().Count()).By("age")}},
{"g_V_outXcreatedX_projectXa_bX_byXnameX_byXinXcreatedX_countX_order_byXselectXbX__descX_selectXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Out("created").Project<object>("a","b").By("name").By(__.In("created").Count()).Order().By(__.Select<object>("b"),Order.Desc).Select<object>("a")}},
{"g_V_valueMap_projectXxX_byXselectXnameXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().ValueMap<object,object>().Project<object>("x").By(__.Select<object>("name"))}},
@@ -588,21 +587,21 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_EX11X_propertiesXweightX_asXaX_selectXaX_byXvalueX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.E(p["eid11"]).Properties<object>("weight").As("a").Select<object>("a").By(T.Value)}},
{"g_V_asXaX_selectXaX_byXageX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().As("a").Select<object>("a").By("age")}},
{"g_withSideEffectXk_nullX_injectXxX_selectXkX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithSideEffect("k",null).Inject("x").Select<object>("k")}},
- {"g_V_shortestPath", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Identity().ShortestPath()}},
- {"g_V_both_dedup_shortestPath", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Both().Dedup().ShortestPath()}},
- {"g_V_shortestPath_edgesIncluded", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Identity().ShortestPath().With("~tinkerpop.shortestPath.includeEdges")}},
- {"g_V_shortestPath_directionXINX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Identity().ShortestPath().With("~tinkerpop.shortestPath.edges",Direction.In)}},
- {"g_V_shortestPath_edgesXoutEX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Identity().ShortestPath().With("~tinkerpop.shortestPath.edges",__.OutE())}},
- {"g_V_shortestPath_edgesIncluded_edgesXoutEX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Identity().ShortestPath().With("~tinkerpop.shortestPath.includeEdges").With("~tinkerpop.shortestPath.edges",__.OutE())}},
- {"g_V_hasXname_markoX_shortestPath", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Has("name","marko").ShortestPath()}},
- {"g_V_shortestPath_targetXhasXname_markoXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Identity().ShortestPath().With("~tinkerpop.shortestPath.target",__.Has("name","marko"))}},
- {"g_V_shortestPath_targetXvaluesXnameX_isXmarkoXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Identity().ShortestPath().With("~tinkerpop.shortestPath.target",__.Values<object>("name").Is("marko"))}},
- {"g_V_hasXname_markoX_shortestPath_targetXhasLabelXsoftwareXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Has("name","marko").ShortestPath().With("~tinkerpop.shortestPath.target",__.HasLabel("software"))}},
- {"g_V_hasXname_markoX_shortestPath_targetXhasXname_joshXX_distanceXweightX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Has("name","marko").ShortestPath().With("~tinkerpop.shortestPath.target",__.Has("name","josh")).With("~tinkerpop.shortestPath.distance","weight")}},
- {"g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Has("name","daniel").ShortestPath().With("~tinkerpop.shortestPath.target",__.Has("name","stephen")).With("~tinkerpop.shortestPath.edges",__.BothE("uses"))}},
- {"g_V_hasXsong_name_MIGHT_AS_WELLX_shortestPath_targetXhasXsong_name_MAYBE_YOU_KNOW_HOW_I_FEELXX_edgesXoutEXfollowedByXX_distanceXweightX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Has("song","name","MIGHT AS WELL").ShortestPath().With("~tinkerpop.shortestPath.target",__.Has("song","name","MAYBE YOU KNOW [...]
- {"g_V_hasXname_markoX_shortestPath_maxDistanceX1X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Has("name","marko").ShortestPath().With("~tinkerpop.shortestPath.maxDistance",1)}},
- {"g_V_hasXname_vadasX_shortestPath_distanceXweightX_maxDistanceX1_3X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramStrategy(graphComputer: "org.apache.tinkerpop.gremlin.process.computer.GraphComputer")).V().Has("name","vadas").ShortestPath().With("~tinkerpop.shortestPath.distance","weight").With("~tinkerpop.shortestPath.maxDistance",1.3)}},
+ {"g_V_shortestPath", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Identity().ShortestPath()}},
+ {"g_V_both_dedup_shortestPath", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Both().Dedup().ShortestPath()}},
+ {"g_V_shortestPath_edgesIncluded", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Identity().ShortestPath().With("~tinkerpop.shortestPath.includeEdges")}},
+ {"g_V_shortestPath_directionXINX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Identity().ShortestPath().With("~tinkerpop.shortestPath.edges",Direction.In)}},
+ {"g_V_shortestPath_edgesXoutEX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Identity().ShortestPath().With("~tinkerpop.shortestPath.edges",__.OutE())}},
+ {"g_V_shortestPath_edgesIncluded_edgesXoutEX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Identity().ShortestPath().With("~tinkerpop.shortestPath.includeEdges").With("~tinkerpop.shortestPath.edges",__.OutE())}},
+ {"g_V_hasXname_markoX_shortestPath", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("name","marko").ShortestPath()}},
+ {"g_V_shortestPath_targetXhasXname_markoXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Identity().ShortestPath().With("~tinkerpop.shortestPath.target",__.Has("name","marko"))}},
+ {"g_V_shortestPath_targetXvaluesXnameX_isXmarkoXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Identity().ShortestPath().With("~tinkerpop.shortestPath.target",__.Values<object>("name").Is("marko"))}},
+ {"g_V_hasXname_markoX_shortestPath_targetXhasLabelXsoftwareXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("name","marko").ShortestPath().With("~tinkerpop.shortestPath.target",__.HasLabel("software"))}},
+ {"g_V_hasXname_markoX_shortestPath_targetXhasXname_joshXX_distanceXweightX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("name","marko").ShortestPath().With("~tinkerpop.shortestPath.target",__.Has("name","josh")).With("~tinkerpop.shortestPath.distance","weight")}},
+ {"g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("name","daniel").ShortestPath().With("~tinkerpop.shortestPath.target",__.Has("name","stephen")).With("~tinkerpop.shortestPath.edges",__.BothE("uses"))}},
+ {"g_V_hasXsong_name_MIGHT_AS_WELLX_shortestPath_targetXhasXsong_name_MAYBE_YOU_KNOW_HOW_I_FEELXX_edgesXoutEXfollowedByXX_distanceXweightX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("song","name","MIGHT AS WELL").ShortestPath().With("~tinkerpop.shortestPath.target",__.Has("song","name","MAYBE YOU KNOW HOW I FEEL")).With("~tinkerpop.shortestPath.edges",__.OutE("followedBy")).With("~tinkerpop.shortestPath.distance","weig [...]
+ {"g_V_hasXname_markoX_shortestPath_maxDistanceX1X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("name","marko").ShortestPath().With("~tinkerpop.shortestPath.maxDistance",1)}},
+ {"g_V_hasXname_vadasX_shortestPath_distanceXweightX_maxDistanceX1_3X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("name","vadas").ShortestPath().With("~tinkerpop.shortestPath.distance","weight").With("~tinkerpop.shortestPath.maxDistance",1.3)}},
{"g_V_age_sum", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Values<object>("age").Sum<object>()}},
{"g_V_foo_sum", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Values<object>("foo").Sum<object>()}},
{"g_V_age_fold_sumXlocalX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Values<object>("age").Fold().Sum<object>(Scope.Local)}},
@@ -665,7 +664,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_VX1X_out_out_out", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Out().Out().Out()}},
{"g_VX1X_out_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Out().Values<object>("name")}},
{"g_VX1X_to_XOUT_knowsX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).To(Direction.Out,"knows")}},
- {"g_VX1_2_3_4X_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"],p["vid2"],p["vid3"],p["vid4"]).Values<object>("name")}},
+ {"g_VX1_2_3_4X_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property("lang","java").As("ripple").A [...]
{"g_V_hasLabelXpersonX_V_hasLabelXsoftwareX_name", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").V().HasLabel("software").Values<object>("name")}},
{"g_V_hasLabelXloopsX_bothEXselfX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("loops").BothE("self")}},
{"g_V_hasLabelXloopsX_bothXselfX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("loops").Both("self")}},
@@ -685,7 +684,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("lang").Group("a").By("lang").By("name").Out().Cap<object>("a")}},
{"g_V_hasXlangX_group_byXlangX_byXcountX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("lang").Group<object,object>().By("lang").By(__.Count())}},
{"g_V_repeatXout_groupXaX_byXnameX_byXcountX_timesX2X_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Repeat(__.Out().Group("a").By("name").By(__.Count())).Times(2).Cap<object>("a")}},
- {"g_V_group_byXoutE_countX_byXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group<object,object>().By(__.OutE().Count()).By("name")}},
+ {"g_V_group_byXoutE_countX_byXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Order().By("name").Group<object,object>().By(__.OutE().Count()).By("name")}},
{"g_V_groupXaX_byXlabelX_byXoutE_weight_sumX_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group("a").By(T.Label).By(__.OutE().Values<object>("weight").Sum<object>()).Cap<object>("a")}},
{"g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byXcountX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Repeat(__.Both("followedBy")).Times(2).Group<object,object>().By("songType").By(__.Count())}},
{"g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byXcountX_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Repeat(__.Both("followedBy")).Times(2).Group("a").By("songType").By(__.Count()).Cap<object>("a")}},
@@ -697,7 +696,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_V_outXfollowedByX_group_byXsongTypeX_byXbothE_group_byXlabelX_byXweight_sumXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Out("followedBy").Group<object,object>().By("songType").By(__.BothE().Group<object,object>().By(T.Label).By(__.Values<object>("weight").Sum<object>()))}},
{"g_V_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group("m").By("name").By(__.In("knows").Values<object>("name")).Cap<object>("m")}},
{"g_V_group_byXlabelX_byXbothE_groupXaX_byXlabelX_byXweight_sumX_weight_sumX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group<object,object>().By(T.Label).By(__.BothE().Group("a").By(T.Label).By(__.Values<object>("weight").Sum<object>()).Values<object>("weight").Sum<object>())}},
- {"g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithSideEffect("a",p["xx1"]).V().Group("a").By("name").By(__.OutE().Label().Fold()).Cap<object>("a")}},
+ {"g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithSideEffect("a",p["xx1"]).V().Group("a").By("name").By(__.OutE().Label().Fold()).Cap<object>("a").Unfold<object>().Group<object,object>().By(Column.Keys).By(__.Select<object>(Column.Values).Order(Scope.Local).By(Order.Asc))}},
{"g_V_hasLabelXpersonX_asXpX_outXcreatedX_group_byXnameX_byXselectXpX_valuesXageX_sumX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").As("p").Out("created").Group<object,object>().By("name").By(__.Select<object>("p").Values<object>("age").Sum<object>())}},
{"g_V_hasLabelXpersonX_asXpX_outXcreatedX_groupXaX_byXnameX_byXselectXpX_valuesXageX_sumX_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("person").As("p").Out("created").Group("a").By("name").By(__.Select<object>("p").Values<object>("age").Sum<object>()).Cap<object>("a")}},
{"g_V_group_byXlabelX_byXlabel_countX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group<object,object>().By(__.Label()).By(__.Label().Count())}},
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
index fac59be..ac659dd 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
@@ -76,7 +76,7 @@ const gremlins = {
g_VX2X_optionalXinXknowsXX: [function({g, vid2}) { return g.V(vid2).optional(__.in_("knows")) }],
g_V_hasLabelXpersonX_optionalXoutXknowsX_optionalXoutXcreatedXXX_path: [function({g}) { return g.V().hasLabel("person").optional(__.out("knows").optional(__.out("created"))).path() }],
g_V_optionalXout_optionalXoutXX_path: [function({g}) { return g.V().optional(__.out().optional(__.out())).path() }],
- g_VX1X_optionalXaddVXdogXX_label: [function({g, vid1}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("name","ripple").property( [...]
+ g_VX1X_optionalXaddVXdogXX_label: [function({g, vid1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").property("age",35 [...]
g_V_repeatXoutX_timesX2X_emit_path: [function({g}) { return g.V().repeat(__.out()).times(2).emit().path() }],
g_V_repeatXoutX_timesX2X_repeatXinX_timesX2X_name: [function({g}) { return g.V().repeat(__.out()).times(2).repeat(__.in_()).times(2).values("name") }],
g_V_repeatXoutE_inVX_timesX2X_path_by_name_by_label: [function({g}) { return g.V().repeat(__.outE().inV()).times(2).path().by("name").by(T.label) }],
@@ -128,7 +128,7 @@ const gremlins = {
g_V_both_both_name_dedup: [function({g}) { return g.V().both().both().values("name").dedup() }],
g_V_both_both_dedup: [function({g}) { return g.V().both().both().dedup() }],
g_V_both_both_dedup_byXlabelX: [function({g}) { return g.V().both().both().dedup().by(T.label) }],
- g_V_group_byXlabelX_byXbothE_weight_dedup_foldX: [function({g}) { return g.V().group().by(T.label).by(__.bothE().values("weight").dedup().fold()) }],
+ g_V_group_byXlabelX_byXbothE_weight_dedup_foldX: [function({g}) { return g.V().group().by(T.label).by(__.bothE().values("weight").dedup().order().by(Order.asc).fold()) }],
g_V_asXaX_both_asXbX_dedupXa_bX_byXlabelX_selectXa_bX: [function({g}) { return g.V().as("a").both().as("b").dedup("a","b").by(T.label).select("a","b") }],
g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_dedupXa_bX_path: [function({g}) { return g.V().as("a").out("created").as("b").in_("created").as("c").dedup("a","b").path() }],
g_V_outE_asXeX_inV_asXvX_selectXeX_order_byXweight_ascX_selectXvX_valuesXnameX_dedup: [function({g}) { return g.V().outE().as("e").inV().as("v").select("e").order().by("weight",Order.asc).select("v").values("name").dedup() }],
@@ -144,7 +144,7 @@ const gremlins = {
g_V_drop: [function({g}) { return g.addV().as("a").addV().as("b").addE("knows").to("a") }, function({g}) { return g.V().drop() }, function({g}) { return g.V() }, function({g}) { return g.E() }],
g_V_outE_drop: [function({g}) { return g.addV().as("a").addV().as("b").addE("knows").to("a") }, function({g}) { return g.V().outE().drop() }, function({g}) { return g.V() }, function({g}) { return g.E() }],
g_V_properties_drop: [function({g}) { return g.addV().property("name","bob").addV().property("name","alice") }, function({g}) { return g.V().properties().drop() }, function({g}) { return g.V() }, function({g}) { return g.V().properties() }],
- g_E_propertiesXweightX_drop: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("name","ripple").property("lang","jav [...]
+ g_E_propertiesXweightX_drop: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").property("age",35).as("peter [...]
g_V_properties_propertiesXstartTimeX_drop: [function({g}) { return g.addV().property("name","bob").property(Cardinality.list,"location","ny","startTime",2014,"endTime",2016).property(Cardinality.list,"location","va","startTime",2016).addV().property("name","alice").property(Cardinality.list,"location","va","startTime",2014,"endTime",2016).property(Cardinality.list,"location","ny","startTime",2016) }, function({g}) { return g.V().properties().properties("startTime").drop() }, function [...]
g_V_filterXfalseX: [function({g, pred1}) { return g.V().filter(pred1) }],
g_V_filterXtrueX: [function({g, pred1}) { return g.V().filter(pred1) }],
@@ -272,7 +272,6 @@ const gremlins = {
g_V_valuesXnameX_order_tailX2X: [function({g}) { return g.V().values("name").order().tail(2) }],
g_V_valuesXnameX_order_tail: [function({g}) { return g.V().values("name").order().tail() }],
g_V_valuesXnameX_order_tailX7X: [function({g}) { return g.V().values("name").order().tail(7) }],
- g_V_repeatXbothX_timesX3X_tailX7X: [function({g}) { return g.V().repeat(__.both()).times(3).tail(7) }],
g_V_repeatXin_outX_timesX3X_tailX7X_count: [function({g}) { return g.V().repeat(__.in_().out()).times(3).tail(7).count() }],
g_V_asXaX_out_asXaX_out_asXaX_selectXaX_byXunfold_valuesXnameX_foldX_tailXlocal_1X: [function({g}) { return g.V().as("a").out().as("a").out().as("a").select("a").by(__.unfold().values("name").fold()).tail(Scope.local,1) }],
g_V_asXaX_out_asXaX_out_asXaX_selectXaX_byXunfold_valuesXnameX_foldX_tailXlocalX: [function({g}) { return g.V().as("a").out().as("a").out().as("a").select("a").by(__.unfold().values("name").fold()).tail(Scope.local) }],
@@ -306,33 +305,33 @@ const gremlins = {
g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX: [function({g}) { return g.V().as("a").outE("created").as("b").inV().as("c").in_("created").as("d").where("a",P.lt("b").or(P.gt("c")).and(P.neq("d"))).by("age").by("weight").by(__.in_("created").values("age").min()).select("a","c","d").by("name") }],
g_VX1X_asXaX_out_hasXageX_whereXgtXaXX_byXageX_name: [function({g, vid1}) { return g.V(vid1).as("a").out().has("age").where(P.gt("a")).by("age").values("name") }],
g_VX3X_asXaX_in_out_asXbX_whereXa_eqXbXX_byXageX_name: [function({g, vid3}) { return g.V(vid3).as("a").in_().out().as("b").where("a",P.eq("b")).by("age").values("name") }],
- g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX: [function({g, vid1}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("name","rip [...]
- g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX_propertyXweight_2X: [function({g, vid1}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).p [...]
- g_V_outE_propertyXweight_nullX: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("name","ripple").property("lang"," [...]
- g_V_aggregateXxX_asXaX_selectXxX_unfold_addEXexistsWithX_toXaX_propertyXtime_nowX: [function({g, vid1, vid2, vid3, vid4, vid5, vid6}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).a [...]
- g_V_asXaX_outXcreatedX_inXcreatedX_whereXneqXaXX_asXbX_addEXcodeveloperX_fromXaX_toXbX_propertyXyear_2009X: [function({g, vid1, vid2, vid4, vid6}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").propert [...]
- g_V_asXaX_inXcreatedX_addEXcreatedByX_fromXaX_propertyXyear_2009X_propertyXacl_publicX: [function({g, vid1, vid2, vid3, vid4, vid5, vid6}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age", [...]
- g_withSideEffectXb_bX_VXaX_addEXknowsX_toXbX_propertyXweight_0_5X: [function({g, v6, v1}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5). [...]
+ g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX: [function({g, vid1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").pr [...]
+ g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX_propertyXweight_2X: [function({g, vid1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property [...]
+ g_V_outE_propertyXweight_nullX: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").property("age",35).as("pe [...]
+ g_V_aggregateXxX_asXaX_selectXxX_unfold_addEXexistsWithX_toXaX_propertyXtime_nowX: [function({g, vid1, vid2, vid3, vid4, vid5, vid6}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang" [...]
+ g_V_asXaX_outXcreatedX_inXcreatedX_whereXneqXaXX_asXbX_addEXcodeveloperX_fromXaX_toXbX_propertyXyear_2009X: [function({g, vid1, vid2, vid4, vid6}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").pr [...]
+ g_V_asXaX_inXcreatedX_addEXcreatedByX_fromXaX_propertyXyear_2009X_propertyXacl_publicX: [function({g, vid1, vid2, vid3, vid4, vid5, vid6}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property(" [...]
+ g_withSideEffectXb_bX_VXaX_addEXknowsX_toXbX_propertyXweight_0_5X: [function({g, v6, v1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").propert [...]
g_addV_asXfirstX_repeatXaddEXnextX_toXaddVX_inVX_timesX5X_addEXnextX_toXselectXfirstXX: [function({g}) { return g.addV().as("first").repeat(__.addE("next").to(__.addV()).inV()).times(5).addE("next").to(__.select("first")) }, function({g}) { return g.V() }, function({g}) { return g.E() }, function({g}) { return g.E().hasLabel("next") }, function({g}) { return g.V().limit(1).bothE() }, function({g}) { return g.V().limit(1).inE() }, function({g}) { return g.V().limit(1).outE() }],
- g_V_hasXname_markoX_asXaX_outEXcreatedX_asXbX_inV_addEXselectXbX_labelX_toXaX: [function({g, v1}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property( [...]
- g_addEXV_outE_label_groupCount_orderXlocalX_byXvalues_descX_selectXkeysX_unfold_limitX1XX_fromXV_hasXname_vadasXX_toXV_hasXname_lopXX: [function({g, v2}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh"). [...]
- g_addEXknowsX_fromXaX_toXbX_propertyXweight_0_1X: [function({g, v6, xx1, v1}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("na [...]
- g_VXaX_addEXknowsX_toXbX_propertyXweight_0_1X: [function({g, v6, xx1, v1}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("name" [...]
- g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX: [function({g, vid1}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.i [...]
- g_V_addVXanimalX_propertyXage_0X: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("name","ripple").property("lang" [...]
- g_addVXpersonX_propertyXname_stephenX: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("name","ripple").property(" [...]
- g_V_hasLabelXpersonX_propertyXname_nullX: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("name","ripple").propert [...]
- g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5 [...]
- get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software"). [...]
- g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.i [...]
- g_addVXanimalX_propertyXname_mateoX_propertyXname_gateoX_propertyXname_cateoX_propertyXage_5X: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software [...]
- g_withSideEffectXa_markoX_addV_propertyXname_selectXaXX_name: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("nam [...]
- g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").prop [...]
- g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("sof [...]
- g_withSideEffectXa_testX_V_hasLabelXsoftwareX_propertyXtemp_selectXaXX_valueMapXname_tempX: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software"). [...]
- g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("nam [...]
- g_V_asXaX_hasXname_markoX_outXcreatedX_asXbX_addVXselectXaX_labelX_propertyXtest_selectXbX_labelX_valueMap_withXtokensX: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32) [...]
- g_addVXV_hasXname_markoX_propertiesXnameX_keyX_label: [function({g}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("software").property(T.id,5).property("name","ripp [...]
+ g_V_hasXname_markoX_asXaX_outEXcreatedX_asXbX_inV_addEXselectXbX_labelX_toXaX: [function({g, v1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person") [...]
+ g_addEXV_outE_label_groupCount_orderXlocalX_byXvalues_descX_selectXkeysX_unfold_limitX1XX_fromXV_hasXname_vadasXX_toXV_hasXname_lopXX: [function({g, v2}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripp [...]
+ g_addEXknowsX_fromXaX_toXbX_propertyXweight_0_1X: [function({g, v6, xx1, v1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","pe [...]
+ g_VXaX_addEXknowsX_toXbX_propertyXweight_0_1X: [function({g, v6, xx1, v1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter [...]
+ g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX: [function({g, vid1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").pr [...]
+ g_V_addVXanimalX_propertyXage_0X: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").property("age",35).as(" [...]
+ g_addVXpersonX_propertyXname_stephenX: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").property("age",35) [...]
+ g_V_hasLabelXpersonX_propertyXname_nullX: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").property("age", [...]
+ g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").prope [...]
+ get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV( [...]
+ g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").pr [...]
+ g_addVXanimalX_propertyXname_mateoX_propertyXname_gateoX_propertyXname_cateoX_propertyXage_5X: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").ad [...]
+ g_withSideEffectXa_markoX_addV_propertyXname_selectXaXX_name: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","pet [...]
+ g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("per [...]
+ g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple [...]
+ g_withSideEffectXa_testX_V_hasLabelXsoftwareX_propertyXtemp_selectXaXX_valueMapXname_tempX: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV( [...]
+ g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","pet [...]
+ g_V_asXaX_hasXname_markoX_outXcreatedX_asXbX_addVXselectXaX_labelX_propertyXtest_selectXbX_labelX_valueMap_withXtokensX: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lan [...]
+ g_addVXV_hasXname_markoX_propertiesXnameX_keyX_label: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").pro [...]
g_addVXnullX_propertyXid_nullX: [function({g}) { return g.addV(null).property(T.id,null) }, function({g}) { return g.V().hasLabel("vertex") }],
g_addV_propertyXlabel_personX: [function({g}) { return g.addV().property(T.label,"person") }, function({g}) { return g.V().hasLabel("person") }],
g_V_coalesceXoutXfooX_outXbarXX: [function({g}) { return g.V().coalesce(__.out("foo"),__.out("bar")) }],
@@ -341,10 +340,10 @@ const gremlins = {
g_V_coalesceXoutXlikesX_outXknowsX_inXcreatedXX_groupCount_byXnameX: [function({g}) { return g.V().coalesce(__.out("likes"),__.out("knows"),__.out("created")).groupCount().by("name") }],
g_V_coalesceXoutEXknowsX_outEXcreatedXX_otherV_path_byXnameX_byXlabelX: [function({g}) { return g.V().coalesce(__.outE("knows"),__.outE("created")).otherV().path().by("name").by(T.label) }],
g_V_outXcreatedX_order_byXnameX_coalesceXname_constantXxXX: [function({g}) { return g.V().out("created").order().by("name").coalesce(__.values("name"),__.constant("x")) }],
- g_V_connectedComponent_hasXcomponentX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().connectedComponent().has("gremlin.connectedComponentVertexProgram.component") }],
- g_V_dedup_connectedComponent_hasXcomponentX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().dedup().connectedComponent().has("gremlin.connectedComponentVertexProgram.component") }],
- g_V_hasLabelXsoftwareX_connectedComponent_project_byXnameX_byXcomponentX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().hasLabel("software").connectedComponent().project("name","component").by("name").by("gremlin.connectedComponentVertexProgram.component") }],
- g_V_connectedComponent_withXEDGES_bothEXknowsXX_withXPROPERTY_NAME_clusterX_project_byXnameX_byXclusterX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().hasLabel("person").connectedComponent().with_("~tinkerpop.connectedComponent.edges",__.bothE("knows")).with_("~tinkerpop.connectedComponent.propertyName","cluster").project("name","cluster").by("name").by("cluster") }],
+ g_V_connectedComponent_hasXcomponentX: [function({g}) { return g.V().connectedComponent().has("gremlin.connectedComponentVertexProgram.component") }],
+ g_V_dedup_connectedComponent_hasXcomponentX: [function({g}) { return g.V().dedup().connectedComponent().has("gremlin.connectedComponentVertexProgram.component") }],
+ g_V_hasLabelXsoftwareX_connectedComponent_project_byXnameX_byXcomponentX: [function({g}) { return g.V().hasLabel("software").connectedComponent().project("name","component").by("name").by("gremlin.connectedComponentVertexProgram.component") }],
+ g_V_connectedComponent_withXEDGES_bothEXknowsXX_withXPROPERTY_NAME_clusterX_project_byXnameX_byXclusterX: [function({g}) { return g.V().hasLabel("person").connectedComponent().with_("~tinkerpop.connectedComponent.edges",__.bothE("knows")).with_("~tinkerpop.connectedComponent.propertyName","cluster").project("name","cluster").by("name").by("cluster") }],
g_V_constantX123X: [function({g}) { return g.V().constant(123) }],
g_V_constantXnullX: [function({g}) { return g.V().constant(null) }],
g_V_chooseXhasLabelXpersonX_valuesXnameX_constantXinhumanXX: [function({g}) { return g.V().choose(__.hasLabel("person"),__.values("name"),__.constant("inhuman")) }],
@@ -367,7 +366,7 @@ const gremlins = {
g_VX1X_V_valuesXnameX: [function({g, vid1}) { return g.V(vid1).V().values("name") }],
g_V_outXknowsX_V_name: [function({g}) { return g.V().out("knows").V().values("name") }],
g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name: [function({g}) { return g.V().has("artist","name","Garcia").in_("sungBy").as("song").V().has("artist","name","Willie_Dixon").in_("writtenBy").where(P.eq("song")).values("name") }],
- g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX: [function({g, xx1, vid1, vid2, vid3, vid4, vid5, vid6}) { return g.addV("person").property(T.id,1).property("name","marko").property("age",29).as("marko").addV("person").property(T.id,2).property("name","vadas").property("age",27).as("vadas").addV("software").property(T.id,3).property("name","lop").property("lang","java").as("lop").addV("person").property(T.id,4).property("name","josh").property("age",32).as("josh").addV("softwar [...]
+ g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX: [function({g, xx1, vid1, vid2, vid3, vid4, vid5, vid6}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").a [...]
g_V_hasLabelXsoftwareX_index_unfold: [function({g}) { return g.V().hasLabel("software").index().unfold() }],
g_V_hasLabelXsoftwareX_order_byXnameX_index_withXmapX: [function({g}) { return g.V().hasLabel("software").order().by("name").index().with_("~tinkerpop.index.indexer",1) }],
g_V_hasLabelXsoftwareX_name_fold_orderXlocalX_index_unfold_order_byXtailXlocal_1XX: [function({g}) { return g.V().hasLabel("software").values("name").fold().order(Scope.local).index().unfold().order().by(__.tail(Scope.local,1)) }],
@@ -473,7 +472,7 @@ const gremlins = {
g_V_properties_order_byXkey_descX_key: [function({g}) { return g.V().properties().order().by(T.key,Order.desc).key() }],
g_V_hasLabelXpersonX_order_byXvalueXageX_descX_name: [function({g, l1}) { return g.V().hasLabel("person").order().by(l1,Order.desc).values("name") }],
g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX: [function({g}) { return g.V().hasLabel("person").group().by("name").by(__.outE().values("weight").sum()).order(Scope.local).by(Column.values) }],
- g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_descX: [function({g}) { return g.V().map(__.bothE().values("weight").fold()).order().by(__.sum(Scope.local),Order.desc) }],
+ g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_descX: [function({g}) { return g.V().map(__.bothE().values("weight").order().by(Order.asc).fold()).order().by(__.sum(Scope.local),Order.desc) }],
g_V_group_byXlabelX_byXname_order_byXdescX_foldX: [function({g}) { return g.V().group().by(T.label).by(__.values("name").order().by(Order.desc).fold()) }],
g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_descX: [function({g}) { return g.V().hasLabel("person").group().by("name").by(__.outE().values("weight").sum()).unfold().order().by(Column.values,Order.desc) }],
g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_descX: [function({g}) { return g.V().as("v").map(__.bothE().values("weight").fold()).sum(Scope.local).as("s").select("v","s").order().by(__.select("s"),Order.desc) }],
@@ -484,15 +483,15 @@ const gremlins = {
g_V_orXhasLabelXpersonX_hasXsoftware_name_lopXX_order_byXageX: [function({g}) { return g.V().or(__.hasLabel("person"),__.has("software","name","lop")).order().by("age") }],
g_VX1X_hasXlabel_personX_mapXmapXint_ageXX_orderXlocalX_byXvalues_descX_byXkeys_ascX: [function({g, l1, v1}) { return g.V(v1).hasLabel("person").map(l1).order(Scope.local).by(Column.values,Order.desc).by(Column.keys,Order.asc) }],
g_VX1X_elementMap_orderXlocalX_byXkeys_descXunfold: [function({g, vid1}) { return g.V(vid1).elementMap().order(Scope.local).by(Column.keys,Order.desc).unfold() }],
- g_V_pageRank_hasXpageRankX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().pageRank().has("gremlin.pageRankVertexProgram.pageRank") }, function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().pageRank().has("gremlin.pageRankVertexProgram.pageRank") }],
- g_V_outXcreatedX_pageRank_withXedges_bothEX_withXpropertyName_projectRankX_withXtimes_0X_valueMapXname_projectRankX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().out("created").pageRank().with_("~tinkerpop.pageRank.edges",__.bothE()).with_("~tinkerpop.pageRank.propertyName","projectRank").with_("~tinkerpop.pageRank.times",0).valueMap("name","projectRank") }],
- g_V_pageRank_order_byXpageRank_descX_byXnameX_name: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank",Order.desc).by("name").values("name") }],
- g_V_pageRank_order_byXpageRank_descX_name_limitX2X: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank",Order.desc).values("name").limit(2) }],
- g_V_pageRank_withXedges_outEXknowsXX_withXpropertyName_friendRankX_project_byXnameX_byXvaluesXfriendRankX_mathX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().pageRank().with_("~tinkerpop.pageRank.edges",__.outE("knows")).with_("~tinkerpop.pageRank.propertyName","friendRank").project("name","friendRank").by("name").by(__.values("friendRank").math("ceil(_ * 100)")) }],
- g_V_hasLabelXpersonX_pageRank_withXpropertyName_kpageRankX_project_byXnameX_byXvaluesXpageRankX_mathX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().hasLabel("person").pageRank().with_("~tinkerpop.pageRank.propertyName","pageRank").project("name","pageRank").by("name").by(__.values("pageRank").math("ceil(_ * 100)")) }],
- g_V_pageRank_withXpropertyName_pageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX_by_byXmathX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().pageRank().with_("~tinkerpop.pageRank.propertyName","pageRank").as("a").out("knows").values("pageRank").as("b").select("a","b").by().by(__.math("ceil(_ * 100)")) }],
- g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_withXedges_inEXcreatedX_withXtimes_1X_withXpropertyName_priorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().hasLabel("software").has("name","ripple").pageRank(1.0).with_("~tinkerpop.pageRank.edges",__.inE("created")).with_("~tinkerpop.pageRank.times",1).with_ [...]
- g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyName_pageRankX_withXedges_inEX_withXtimes_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().out("created").group("m").by(T.label).pageRank(1.0).with_("~tinkerpop.pageRank.propertyName","pageRank").with_("~tinkerpop.pageRank.edges",__.inE()).with_("~tinkerpop.pageRank. [...]
+ g_V_pageRank_hasXpageRankX: [function({g}) { return g.V().pageRank().has("gremlin.pageRankVertexProgram.pageRank") }],
+ g_V_outXcreatedX_pageRank_withXedges_bothEX_withXpropertyName_projectRankX_withXtimes_0X_valueMapXname_projectRankX: [function({g}) { return g.V().out("created").pageRank().with_("~tinkerpop.pageRank.edges",__.bothE()).with_("~tinkerpop.pageRank.propertyName","projectRank").with_("~tinkerpop.pageRank.times",0).valueMap("name","projectRank") }],
+ g_V_pageRank_order_byXpageRank_descX_byXnameX_name: [function({g}) { return g.V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank",Order.desc).by("name").values("name") }],
+ g_V_pageRank_order_byXpageRank_descX_name_limitX2X: [function({g}) { return g.V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank",Order.desc).values("name").limit(2) }],
+ g_V_pageRank_withXedges_outEXknowsXX_withXpropertyName_friendRankX_project_byXnameX_byXvaluesXfriendRankX_mathX: [function({g}) { return g.V().pageRank().with_("~tinkerpop.pageRank.edges",__.outE("knows")).with_("~tinkerpop.pageRank.propertyName","friendRank").project("name","friendRank").by("name").by(__.values("friendRank").math("ceil(_ * 100)")) }],
+ g_V_hasLabelXpersonX_pageRank_withXpropertyName_kpageRankX_project_byXnameX_byXvaluesXpageRankX_mathX: [function({g}) { return g.V().hasLabel("person").pageRank().with_("~tinkerpop.pageRank.propertyName","pageRank").project("name","pageRank").by("name").by(__.values("pageRank").math("ceil(_ * 100)")) }],
+ g_V_pageRank_withXpropertyName_pageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX_by_byXmathX: [function({g}) { return g.V().pageRank().with_("~tinkerpop.pageRank.propertyName","pageRank").as("a").out("knows").values("pageRank").as("b").select("a","b").by().by(__.math("ceil(_ * 100)")) }],
+ g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_withXedges_inEXcreatedX_withXtimes_1X_withXpropertyName_priorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX: [function({g}) { return g.V().hasLabel("software").has("name","ripple").pageRank(1.0).with_("~tinkerpop.pageRank.edges",__.inE("created")).with_("~tinkerpop.pageRank.times",1).with_("~tinkerpop.pageRank.propertyName","priors").in_("created").union(__.both(),__.identity()).valueMap("name","priors") }],
+ g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyName_pageRankX_withXedges_inEX_withXtimes_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX: [function({g}) { return g.V().out("created").group("m").by(T.label).pageRank(1.0).with_("~tinkerpop.pageRank.propertyName","pageRank").with_("~tinkerpop.pageRank.edges",__.inE()).with_("~tinkerpop.pageRank.times",1).in_("created").group("m").by("pageRank").cap("m") }],
g_VX1X_name_path: [function({g, vid1}) { return g.V(vid1).values("name").path() }],
g_VX1X_out_path_byXageX_byXnameX: [function({g, vid1}) { return g.V(vid1).out().path().by("age").by("name") }],
g_V_repeatXoutX_timesX2X_path_byXitX_byXnameX_byXlangX: [function({g}) { return g.V().repeat(__.out()).times(2).path().by().by("name").by("lang") }],
@@ -503,9 +502,9 @@ const gremlins = {
g_VX1X_out_path_byXageX: [function({g, vid1}) { return g.V(vid1).out().path().by("age") }],
g_injectX1_null_nullX_path: [function({g}) { return g.inject(1,null,null).path() }],
g_injectX1_null_nullX_path_dedup: [function({g}) { return g.inject(1,null,null).path().dedup() }],
- g_V_peerPressure_hasXclusterX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().peerPressure().has("gremlin.peerPressureVertexProgram.cluster") }, function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().peerPressure().has("gremlin.peerPressureVertexProgram.cluster") }],
- g_V_peerPressure_withXpropertyName_clusterX_withXedges_outEXknowsXX_pageRankX1X_byXrankX_withXedges_outEXknowsX_withXtimes_2X_group_byXclusterX_byXrank_sumX_limitX100X: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().peerPressure().with_("~tinkerpop.peerPressure.propertyName","cluster").with_("~tinkerpop.peerPressure.edges",__.outE("knows")).pageRank(1.0).with_("~tinker [...]
- g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withyXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().has("name","ripple").in_("created").peerPressure().with_("~tinkerpop.peerPressure.edges",__.outE()).with_("~tinkerpop.peerPressure.propertyName","cluster").repeat(__ [...]
+ g_V_peerPressure_hasXclusterX: [function({g}) { return g.V().peerPressure().has("gremlin.peerPressureVertexProgram.cluster") }],
+ g_V_peerPressure_withXpropertyName_clusterX_withXedges_outEXknowsXX_pageRankX1X_byXrankX_withXedges_outEXknowsX_withXtimes_2X_group_byXclusterX_byXrank_sumX_limitX100X: [function({g}) { return g.V().peerPressure().with_("~tinkerpop.peerPressure.propertyName","cluster").with_("~tinkerpop.peerPressure.edges",__.outE("knows")).pageRank(1.0).with_("~tinkerpop.pageRank.propertyName","rank").with_("~tinkerpop.pageRank.edges",__.outE("knows")).with_("~tinkerpop.pageRank.times",1).group().by [...]
+ g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withyXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX: [function({g}) { return g.V().has("name","ripple").in_("created").peerPressure().with_("~tinkerpop.peerPressure.edges",__.outE()).with_("~tinkerpop.peerPressure.propertyName","cluster").repeat(__.union(__.identity(),__.both())).times(2).dedup().valueMap("name","cluster") }],
g_V_hasLabelXpersonX_projectXa_bX_byXoutE_countX_byXageX: [function({g}) { return g.V().hasLabel("person").project("a","b").by(__.outE().count()).by("age") }],
g_V_outXcreatedX_projectXa_bX_byXnameX_byXinXcreatedX_countX_order_byXselectXbX__descX_selectXaX: [function({g}) { return g.V().out("created").project("a","b").by("name").by(__.in_("created").count()).order().by(__.select("b"),Order.desc).select("a") }],
g_V_valueMap_projectXxX_byXselectXnameXX: [function({g}) { return g.V().valueMap().project("x").by(__.select("name")) }],
@@ -577,21 +576,21 @@ const gremlins = {
g_EX11X_propertiesXweightX_asXaX_selectXaX_byXvalueX: [function({g, eid11}) { return g.E(eid11).properties("weight").as("a").select("a").by(T.value) }],
g_V_asXaX_selectXaX_byXageX: [function({g}) { return g.V().as("a").select("a").by("age") }],
g_withSideEffectXk_nullX_injectXxX_selectXkX: [function({g}) { return g.withSideEffect("k",null).inject("x").select("k") }],
- g_V_shortestPath: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().identity().shortestPath() }],
- g_V_both_dedup_shortestPath: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().both().dedup().shortestPath() }],
- g_V_shortestPath_edgesIncluded: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().identity().shortestPath().with_("~tinkerpop.shortestPath.includeEdges") }],
- g_V_shortestPath_directionXINX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().identity().shortestPath().with_("~tinkerpop.shortestPath.edges",Direction.IN) }],
- g_V_shortestPath_edgesXoutEX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().identity().shortestPath().with_("~tinkerpop.shortestPath.edges",__.outE()) }],
- g_V_shortestPath_edgesIncluded_edgesXoutEX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().identity().shortestPath().with_("~tinkerpop.shortestPath.includeEdges").with_("~tinkerpop.shortestPath.edges",__.outE()) }],
- g_V_hasXname_markoX_shortestPath: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().has("name","marko").shortestPath() }],
- g_V_shortestPath_targetXhasXname_markoXX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().identity().shortestPath().with_("~tinkerpop.shortestPath.target",__.has("name","marko")) }],
- g_V_shortestPath_targetXvaluesXnameX_isXmarkoXX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().identity().shortestPath().with_("~tinkerpop.shortestPath.target",__.values("name").is("marko")) }],
- g_V_hasXname_markoX_shortestPath_targetXhasLabelXsoftwareXX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().has("name","marko").shortestPath().with_("~tinkerpop.shortestPath.target",__.hasLabel("software")) }],
- g_V_hasXname_markoX_shortestPath_targetXhasXname_joshXX_distanceXweightX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().has("name","marko").shortestPath().with_("~tinkerpop.shortestPath.target",__.has("name","josh")).with_("~tinkerpop.shortestPath.distance","weight") }],
- g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().has("name","daniel").shortestPath().with_("~tinkerpop.shortestPath.target",__.has("name","stephen")).with_("~tinkerpop.shortestPath.edges",__.bothE("uses")) }],
- g_V_hasXsong_name_MIGHT_AS_WELLX_shortestPath_targetXhasXsong_name_MAYBE_YOU_KNOW_HOW_I_FEELXX_edgesXoutEXfollowedByXX_distanceXweightX: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().has("song","name","MIGHT AS WELL").shortestPath().with_("~tinkerpop.shortestPath.target",__.has("song","name","MAYBE YOU KNOW HOW I FEEL")).with_("~tinkerpop.shortestPath.edges",__.outE(" [...]
- g_V_hasXname_markoX_shortestPath_maxDistanceX1X: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().has("name","marko").shortestPath().with_("~tinkerpop.shortestPath.maxDistance",1) }],
- g_V_hasXname_vadasX_shortestPath_distanceXweightX_maxDistanceX1_3X: [function({g}) { return g.withStrategies(new VertexProgramStrategy(new Map([["graphComputer","org.apache.tinkerpop.gremlin.process.computer.GraphComputer"]]))).V().has("name","vadas").shortestPath().with_("~tinkerpop.shortestPath.distance","weight").with_("~tinkerpop.shortestPath.maxDistance",1.3) }],
+ g_V_shortestPath: [function({g}) { return g.V().identity().shortestPath() }],
+ g_V_both_dedup_shortestPath: [function({g}) { return g.V().both().dedup().shortestPath() }],
+ g_V_shortestPath_edgesIncluded: [function({g}) { return g.V().identity().shortestPath().with_("~tinkerpop.shortestPath.includeEdges") }],
+ g_V_shortestPath_directionXINX: [function({g}) { return g.V().identity().shortestPath().with_("~tinkerpop.shortestPath.edges",Direction.IN) }],
+ g_V_shortestPath_edgesXoutEX: [function({g}) { return g.V().identity().shortestPath().with_("~tinkerpop.shortestPath.edges",__.outE()) }],
+ g_V_shortestPath_edgesIncluded_edgesXoutEX: [function({g}) { return g.V().identity().shortestPath().with_("~tinkerpop.shortestPath.includeEdges").with_("~tinkerpop.shortestPath.edges",__.outE()) }],
+ g_V_hasXname_markoX_shortestPath: [function({g}) { return g.V().has("name","marko").shortestPath() }],
+ g_V_shortestPath_targetXhasXname_markoXX: [function({g}) { return g.V().identity().shortestPath().with_("~tinkerpop.shortestPath.target",__.has("name","marko")) }],
+ g_V_shortestPath_targetXvaluesXnameX_isXmarkoXX: [function({g}) { return g.V().identity().shortestPath().with_("~tinkerpop.shortestPath.target",__.values("name").is("marko")) }],
+ g_V_hasXname_markoX_shortestPath_targetXhasLabelXsoftwareXX: [function({g}) { return g.V().has("name","marko").shortestPath().with_("~tinkerpop.shortestPath.target",__.hasLabel("software")) }],
+ g_V_hasXname_markoX_shortestPath_targetXhasXname_joshXX_distanceXweightX: [function({g}) { return g.V().has("name","marko").shortestPath().with_("~tinkerpop.shortestPath.target",__.has("name","josh")).with_("~tinkerpop.shortestPath.distance","weight") }],
+ g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX: [function({g}) { return g.V().has("name","daniel").shortestPath().with_("~tinkerpop.shortestPath.target",__.has("name","stephen")).with_("~tinkerpop.shortestPath.edges",__.bothE("uses")) }],
+ g_V_hasXsong_name_MIGHT_AS_WELLX_shortestPath_targetXhasXsong_name_MAYBE_YOU_KNOW_HOW_I_FEELXX_edgesXoutEXfollowedByXX_distanceXweightX: [function({g}) { return g.V().has("song","name","MIGHT AS WELL").shortestPath().with_("~tinkerpop.shortestPath.target",__.has("song","name","MAYBE YOU KNOW HOW I FEEL")).with_("~tinkerpop.shortestPath.edges",__.outE("followedBy")).with_("~tinkerpop.shortestPath.distance","weight") }],
+ g_V_hasXname_markoX_shortestPath_maxDistanceX1X: [function({g}) { return g.V().has("name","marko").shortestPath().with_("~tinkerpop.shortestPath.maxDistance",1) }],
+ g_V_hasXname_vadasX_shortestPath_distanceXweightX_maxDistanceX1_3X: [function({g}) { return g.V().has("name","vadas").shortestPath().with_("~tinkerpop.shortestPath.distance","weight").with_("~tinkerpop.shortestPath.maxDistance",1.3) }],
g_V_age_sum: [function({g}) { return g.V().values("age").sum() }],
g_V_foo_sum: [function({g}) { return g.V().values("foo").sum() }],
g_V_age_fold_sumXlocalX: [function({g}) { return g.V().values("age").fold().sum(Scope.local) }],
@@ -654,7 +653,7 @@ const gremlins = {
g_VX1X_out_out_out: [function({g, vid1}) { return g.V(vid1).out().out().out() }],
g_VX1X_out_name: [function({g, vid1}) { return g.V(vid1).out().values("name") }],
g_VX1X_to_XOUT_knowsX: [function({g, vid1}) { return g.V(vid1).to(Direction.OUT,"knows") }],
- g_VX1_2_3_4X_name: [function({g, vid4, vid3, vid2, vid1}) { return g.V(vid1,vid2,vid3,vid4).values("name") }],
+ g_VX1_2_3_4X_name: [function({g, vid4, vid3, vid2, vid1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").property("age" [...]
g_V_hasLabelXpersonX_V_hasLabelXsoftwareX_name: [function({g}) { return g.V().hasLabel("person").V().hasLabel("software").values("name") }],
g_V_hasLabelXloopsX_bothEXselfX: [function({g}) { return g.V().hasLabel("loops").bothE("self") }],
g_V_hasLabelXloopsX_bothXselfX: [function({g}) { return g.V().hasLabel("loops").both("self") }],
@@ -674,7 +673,7 @@ const gremlins = {
g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX: [function({g}) { return g.V().has("lang").group("a").by("lang").by("name").out().cap("a") }],
g_V_hasXlangX_group_byXlangX_byXcountX: [function({g}) { return g.V().has("lang").group().by("lang").by(__.count()) }],
g_V_repeatXout_groupXaX_byXnameX_byXcountX_timesX2X_capXaX: [function({g}) { return g.V().repeat(__.out().group("a").by("name").by(__.count())).times(2).cap("a") }],
- g_V_group_byXoutE_countX_byXnameX: [function({g}) { return g.V().group().by(__.outE().count()).by("name") }],
+ g_V_group_byXoutE_countX_byXnameX: [function({g}) { return g.V().order().by("name").group().by(__.outE().count()).by("name") }],
g_V_groupXaX_byXlabelX_byXoutE_weight_sumX_capXaX: [function({g}) { return g.V().group("a").by(T.label).by(__.outE().values("weight").sum()).cap("a") }],
g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byXcountX: [function({g}) { return g.V().repeat(__.both("followedBy")).times(2).group().by("songType").by(__.count()) }],
g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byXcountX_capXaX: [function({g}) { return g.V().repeat(__.both("followedBy")).times(2).group("a").by("songType").by(__.count()).cap("a") }],
@@ -686,7 +685,7 @@ const gremlins = {
g_V_outXfollowedByX_group_byXsongTypeX_byXbothE_group_byXlabelX_byXweight_sumXX: [function({g}) { return g.V().out("followedBy").group().by("songType").by(__.bothE().group().by(T.label).by(__.values("weight").sum())) }],
g_V_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX: [function({g}) { return g.V().group("m").by("name").by(__.in_("knows").values("name")).cap("m") }],
g_V_group_byXlabelX_byXbothE_groupXaX_byXlabelX_byXweight_sumX_weight_sumX: [function({g}) { return g.V().group().by(T.label).by(__.bothE().group("a").by(T.label).by(__.values("weight").sum()).values("weight").sum()) }],
- g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX: [function({g, xx1}) { return g.withSideEffect("a",xx1).V().group("a").by("name").by(__.outE().label().fold()).cap("a") }],
+ g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX: [function({g, xx1}) { return g.withSideEffect("a",xx1).V().group("a").by("name").by(__.outE().label().fold()).cap("a").unfold().group().by(Column.keys).by(__.select(Column.values).order(Scope.local).by(Order.asc)) }],
g_V_hasLabelXpersonX_asXpX_outXcreatedX_group_byXnameX_byXselectXpX_valuesXageX_sumX: [function({g}) { return g.V().hasLabel("person").as("p").out("created").group().by("name").by(__.select("p").values("age").sum()) }],
g_V_hasLabelXpersonX_asXpX_outXcreatedX_groupXaX_byXnameX_byXselectXpX_valuesXageX_sumX_capXaX: [function({g}) { return g.V().hasLabel("person").as("p").out("created").group("a").by("name").by(__.select("p").values("age").sum()).cap("a") }],
g_V_group_byXlabelX_byXlabel_countX: [function({g}) { return g.V().group().by(__.label()).by(__.label().count()) }],
diff --git a/gremlin-python/src/main/python/radish/gremlin.py b/gremlin-python/src/main/python/radish/gremlin.py
index 73a1c56..bc0b9d3 100644
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -61,7 +61,7 @@ world.gremlins = {
'g_VX2X_optionalXinXknowsXX': [(lambda g, vid2=None:g.V(vid2).optional(__.in_('knows')))],
'g_V_hasLabelXpersonX_optionalXoutXknowsX_optionalXoutXcreatedXXX_path': [(lambda g:g.V().hasLabel('person').optional(__.out('knows').optional(__.out('created'))).path())],
'g_V_optionalXout_optionalXoutXX_path': [(lambda g:g.V().optional(__.out().optional(__.out())).path())],
- 'g_VX1X_optionalXaddVXdogXX_label': [(lambda g, vid1=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('l [...]
+ 'g_VX1X_optionalXaddVXdogXX_label': [(lambda g, vid1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').property('age',35) [...]
'g_V_repeatXoutX_timesX2X_emit_path': [(lambda g:g.V().repeat(__.out()).times(2).emit().path())],
'g_V_repeatXoutX_timesX2X_repeatXinX_timesX2X_name': [(lambda g:g.V().repeat(__.out()).times(2).repeat(__.in_()).times(2).name)],
'g_V_repeatXoutE_inVX_timesX2X_path_by_name_by_label': [(lambda g:g.V().repeat(__.outE().inV()).times(2).path().by('name').by(T.label))],
@@ -113,7 +113,7 @@ world.gremlins = {
'g_V_both_both_name_dedup': [(lambda g:g.V().both().both().name.dedup())],
'g_V_both_both_dedup': [(lambda g:g.V().both().both().dedup())],
'g_V_both_both_dedup_byXlabelX': [(lambda g:g.V().both().both().dedup().by(T.label))],
- 'g_V_group_byXlabelX_byXbothE_weight_dedup_foldX': [(lambda g:g.V().group().by(T.label).by(__.bothE().weight.dedup().fold()))],
+ 'g_V_group_byXlabelX_byXbothE_weight_dedup_foldX': [(lambda g:g.V().group().by(T.label).by(__.bothE().weight.dedup().order().by(Order.asc).fold()))],
'g_V_asXaX_both_asXbX_dedupXa_bX_byXlabelX_selectXa_bX': [(lambda g:g.V().as_('a').both().as_('b').dedup('a','b').by(T.label).select('a','b'))],
'g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_dedupXa_bX_path': [(lambda g:g.V().as_('a').out('created').as_('b').in_('created').as_('c').dedup('a','b').path())],
'g_V_outE_asXeX_inV_asXvX_selectXeX_order_byXweight_ascX_selectXvX_valuesXnameX_dedup': [(lambda g:g.V().outE().as_('e').inV().as_('v').select('e').order().by('weight',Order.asc).select('v').name.dedup())],
@@ -129,7 +129,7 @@ world.gremlins = {
'g_V_drop': [(lambda g:g.addV().as_('a').addV().as_('b').addE('knows').to('a')), (lambda g:g.V().drop()), (lambda g:g.V()), (lambda g:g.E())],
'g_V_outE_drop': [(lambda g:g.addV().as_('a').addV().as_('b').addE('knows').to('a')), (lambda g:g.V().outE().drop()), (lambda g:g.V()), (lambda g:g.E())],
'g_V_properties_drop': [(lambda g:g.addV().property('name','bob').addV().property('name','alice')), (lambda g:g.V().properties().drop()), (lambda g:g.V()), (lambda g:g.V().properties())],
- 'g_E_propertiesXweightX_drop': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('lang','java').as_ [...]
+ 'g_E_propertiesXweightX_drop': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').property('age',35).as_('peter').ad [...]
'g_V_properties_propertiesXstartTimeX_drop': [(lambda g:g.addV().property('name','bob').property(Cardinality.list_,'location','ny','startTime',2014,'endTime',2016).property(Cardinality.list_,'location','va','startTime',2016).addV().property('name','alice').property(Cardinality.list_,'location','va','startTime',2014,'endTime',2016).property(Cardinality.list_,'location','ny','startTime',2016)), (lambda g:g.V().properties().properties('startTime').drop()), (lambda g:g.V().properties().p [...]
'g_V_filterXfalseX': [(lambda g, pred1=None:g.V().filter(pred1))],
'g_V_filterXtrueX': [(lambda g, pred1=None:g.V().filter(pred1))],
@@ -257,7 +257,6 @@ world.gremlins = {
'g_V_valuesXnameX_order_tailX2X': [(lambda g:g.V().name.order().tail(2))],
'g_V_valuesXnameX_order_tail': [(lambda g:g.V().name.order().tail())],
'g_V_valuesXnameX_order_tailX7X': [(lambda g:g.V().name.order().tail(7))],
- 'g_V_repeatXbothX_timesX3X_tailX7X': [(lambda g:g.V().repeat(__.both()).times(3).tail(7))],
'g_V_repeatXin_outX_timesX3X_tailX7X_count': [(lambda g:g.V().repeat(__.in_().out()).times(3).tail(7).count())],
'g_V_asXaX_out_asXaX_out_asXaX_selectXaX_byXunfold_valuesXnameX_foldX_tailXlocal_1X': [(lambda g:g.V().as_('a').out().as_('a').out().as_('a').select('a').by(__.unfold().name.fold()).tail(Scope.local,1))],
'g_V_asXaX_out_asXaX_out_asXaX_selectXaX_byXunfold_valuesXnameX_foldX_tailXlocalX': [(lambda g:g.V().as_('a').out().as_('a').out().as_('a').select('a').by(__.unfold().name.fold()).tail(Scope.local))],
@@ -291,33 +290,33 @@ world.gremlins = {
'g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX': [(lambda g:g.V().as_('a').outE('created').as_('b').inV().as_('c').in_('created').as_('d').where('a',P.lt('b').or_(P.gt('c')).and_(P.neq('d'))).by('age').by('weight').by(__.in_('created').age.min()).select('a','c','d').by('name'))],
'g_VX1X_asXaX_out_hasXageX_whereXgtXaXX_byXageX_name': [(lambda g, vid1=None:g.V(vid1).as_('a').out().has('age').where(P.gt('a')).by('age').name)],
'g_VX3X_asXaX_in_out_asXbX_whereXa_eqXbXX_byXageX_name': [(lambda g, vid3=None:g.V(vid3).as_('a').in_().out().as_('b').where('a',P.eq('b')).by('age').name)],
- 'g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX': [(lambda g, vid1=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','rippl [...]
- 'g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX_propertyXweight_2X': [(lambda g, vid1=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).pro [...]
- 'g_V_outE_propertyXweight_nullX': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('lang','java'). [...]
- 'g_V_aggregateXxX_asXaX_selectXxX_unfold_addEXexistsWithX_toXaX_propertyXtime_nowX': [(lambda g, vid1=None,vid2=None,vid3=None,vid4=None,vid5=None,vid6=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').pro [...]
- 'g_V_asXaX_outXcreatedX_inXcreatedX_whereXneqXaXX_asXbX_addEXcodeveloperX_fromXaX_toXbX_propertyXyear_2009X': [(lambda g, vid1=None,vid2=None,vid4=None,vid6=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh' [...]
- 'g_V_asXaX_inXcreatedX_addEXcreatedByX_fromXaX_propertyXyear_2009X_propertyXacl_publicX': [(lambda g, vid1=None,vid2=None,vid3=None,vid4=None,vid5=None,vid6=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh' [...]
- 'g_withSideEffectXb_bX_VXaX_addEXknowsX_toXbX_propertyXweight_0_5X': [(lambda g, v6=None,v1=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5 [...]
+ 'g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX': [(lambda g, vid1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').pro [...]
+ 'g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX_propertyXweight_2X': [(lambda g, vid1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property( [...]
+ 'g_V_outE_propertyXweight_nullX': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').property('age',35).as_('peter') [...]
+ 'g_V_aggregateXxX_asXaX_selectXxX_unfold_addEXexistsWithX_toXaX_propertyXtime_nowX': [(lambda g, vid1=None,vid2=None,vid3=None,vid4=None,vid5=None,vid6=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple [...]
+ 'g_V_asXaX_outXcreatedX_inXcreatedX_whereXneqXaXX_asXbX_addEXcodeveloperX_fromXaX_toXbX_propertyXyear_2009X': [(lambda g, vid1=None,vid2=None,vid4=None,vid6=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','r [...]
+ 'g_V_asXaX_inXcreatedX_addEXcreatedByX_fromXaX_propertyXyear_2009X_propertyXacl_publicX': [(lambda g, vid1=None,vid2=None,vid3=None,vid4=None,vid5=None,vid6=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','r [...]
+ 'g_withSideEffectXb_bX_VXaX_addEXknowsX_toXbX_propertyXweight_0_5X': [(lambda g, v6=None,v1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').prop [...]
'g_addV_asXfirstX_repeatXaddEXnextX_toXaddVX_inVX_timesX5X_addEXnextX_toXselectXfirstXX': [(lambda g:g.addV().as_('first').repeat(__.addE('next').to(__.addV()).inV()).times(5).addE('next').to(__.select('first'))), (lambda g:g.V()), (lambda g:g.E()), (lambda g:g.E().hasLabel('next')), (lambda g:g.V()[0:1].bothE()), (lambda g:g.V()[0:1].inE()), (lambda g:g.V()[0:1].outE())],
- 'g_V_hasXname_markoX_asXaX_outEXcreatedX_asXbX_inV_addEXselectXbX_labelX_toXaX': [(lambda g, v1=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T. [...]
- 'g_addEXV_outE_label_groupCount_orderXlocalX_byXvalues_descX_selectXkeysX_unfold_limitX1XX_fromXV_hasXname_vadasXX_toXV_hasXname_lopXX': [(lambda g, v2=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').pro [...]
- 'g_addEXknowsX_fromXaX_toXbX_propertyXweight_0_1X': [(lambda g, v6=None,xx1=None,v1=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).proper [...]
- 'g_VXaX_addEXknowsX_toXbX_propertyXweight_0_1X': [(lambda g, v6=None,xx1=None,v1=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property( [...]
- 'g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX': [(lambda g, vid1=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id, [...]
- 'g_V_addVXanimalX_propertyXage_0X': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('lang','java' [...]
- 'g_addVXpersonX_propertyXname_stephenX': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('lang',' [...]
- 'g_V_hasLabelXpersonX_propertyXname_nullX': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').property('lang [...]
- 'g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).prope [...]
- 'get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').propert [...]
- 'g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).pr [...]
- 'g_addVXanimalX_propertyXname_mateoX_propertyXname_gateoX_propertyXname_cateoX_propertyXage_5X': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').prop [...]
- 'g_withSideEffectXa_markoX_addV_propertyXname_selectXaXX_name': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','rip [...]
- 'g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T. [...]
- 'g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software') [...]
- 'g_withSideEffectXa_testX_V_hasLabelXsoftwareX_propertyXtemp_selectXaXX_valueMapXname_tempX': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').propert [...]
- 'g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','rip [...]
- 'g_V_asXaX_hasXname_markoX_outXcreatedX_asXbX_addVXselectXaX_labelX_propertyXtest_selectXbX_labelX_valueMap_withXtokensX': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('jo [...]
- 'g_addVXV_hasXname_markoX_propertiesXnameX_keyX_label': [(lambda g:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_('josh').addV('software').property(T.id,5).property('name','ripple').pr [...]
+ 'g_V_hasXname_markoX_asXaX_outEXcreatedX_asXbX_inV_addEXselectXbX_labelX_toXaX': [(lambda g, v1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person'). [...]
+ 'g_addEXV_outE_label_groupCount_orderXlocalX_byXvalues_descX_selectXkeysX_unfold_limitX1XX_fromXV_hasXname_vadasXX_toXV_hasXname_lopXX': [(lambda g, v2=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple [...]
+ 'g_addEXknowsX_fromXaX_toXbX_propertyXweight_0_1X': [(lambda g, v6=None,xx1=None,v1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('na [...]
+ 'g_VXaX_addEXknowsX_toXbX_propertyXweight_0_1X': [(lambda g, v6=None,xx1=None,v1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name' [...]
+ 'g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX': [(lambda g, vid1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').pro [...]
+ 'g_V_addVXanimalX_propertyXage_0X': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').property('age',35).as_('peter [...]
+ 'g_addVXpersonX_propertyXname_stephenX': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').property('age',35).as_(' [...]
+ 'g_V_hasLabelXpersonX_propertyXname_nullX': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').property('age',35).as [...]
+ 'g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('n [...]
+ 'get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('perso [...]
+ 'g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property [...]
+ 'g_addVXanimalX_propertyXname_mateoX_propertyXname_gateoX_propertyXname_cateoX_propertyXage_5X': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('pe [...]
+ 'g_withSideEffectXa_markoX_addV_propertyXname_selectXaXX_name': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').p [...]
+ 'g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person'). [...]
+ 'g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').add [...]
+ 'g_withSideEffectXa_testX_V_hasLabelXsoftwareX_propertyXtemp_selectXaXX_valueMapXname_tempX': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('perso [...]
+ 'g_withSideEffectXa_nameX_addV_propertyXselectXaX_markoX_name': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').p [...]
+ 'g_V_asXaX_hasXname_markoX_outXcreatedX_asXbX_addVXselectXaX_labelX_propertyXtest_selectXbX_labelX_valueMap_withXtokensX': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','jav [...]
+ 'g_addVXV_hasXname_markoX_propertiesXnameX_keyX_label': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').property( [...]
'g_addVXnullX_propertyXid_nullX': [(lambda g:g.addV(None).property(T.id,None)), (lambda g:g.V().hasLabel('vertex'))],
'g_addV_propertyXlabel_personX': [(lambda g:g.addV().property(T.label,'person')), (lambda g:g.V().hasLabel('person'))],
'g_V_coalesceXoutXfooX_outXbarXX': [(lambda g:g.V().coalesce(__.out('foo'),__.out('bar')))],
@@ -326,10 +325,10 @@ world.gremlins = {
'g_V_coalesceXoutXlikesX_outXknowsX_inXcreatedXX_groupCount_byXnameX': [(lambda g:g.V().coalesce(__.out('likes'),__.out('knows'),__.out('created')).groupCount().by('name'))],
'g_V_coalesceXoutEXknowsX_outEXcreatedXX_otherV_path_byXnameX_byXlabelX': [(lambda g:g.V().coalesce(__.outE('knows'),__.outE('created')).otherV().path().by('name').by(T.label))],
'g_V_outXcreatedX_order_byXnameX_coalesceXname_constantXxXX': [(lambda g:g.V().out('created').order().by('name').coalesce(__.name,__.constant('x')))],
- 'g_V_connectedComponent_hasXcomponentX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().connectedComponent().has('gremlin.connectedComponentVertexProgram.component'))],
- 'g_V_dedup_connectedComponent_hasXcomponentX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().dedup().connectedComponent().has('gremlin.connectedComponentVertexProgram.component'))],
- 'g_V_hasLabelXsoftwareX_connectedComponent_project_byXnameX_byXcomponentX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().hasLabel('software').connectedComponent().project('name','component').by('name').by('gremlin.connectedComponentVertexProgram.component'))],
- 'g_V_connectedComponent_withXEDGES_bothEXknowsXX_withXPROPERTY_NAME_clusterX_project_byXnameX_byXclusterX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().hasLabel('person').connectedComponent().with_('~tinkerpop.connectedComponent.edges',__.bothE('knows')).with_('~tinkerpop [...]
+ 'g_V_connectedComponent_hasXcomponentX': [(lambda g:g.V().connectedComponent().has('gremlin.connectedComponentVertexProgram.component'))],
+ 'g_V_dedup_connectedComponent_hasXcomponentX': [(lambda g:g.V().dedup().connectedComponent().has('gremlin.connectedComponentVertexProgram.component'))],
+ 'g_V_hasLabelXsoftwareX_connectedComponent_project_byXnameX_byXcomponentX': [(lambda g:g.V().hasLabel('software').connectedComponent().project('name','component').by('name').by('gremlin.connectedComponentVertexProgram.component'))],
+ 'g_V_connectedComponent_withXEDGES_bothEXknowsXX_withXPROPERTY_NAME_clusterX_project_byXnameX_byXclusterX': [(lambda g:g.V().hasLabel('person').connectedComponent().with_('~tinkerpop.connectedComponent.edges',__.bothE('knows')).with_('~tinkerpop.connectedComponent.propertyName','cluster').project('name','cluster').by('name').by('cluster'))],
'g_V_constantX123X': [(lambda g:g.V().constant(123))],
'g_V_constantXnullX': [(lambda g:g.V().constant(None))],
'g_V_chooseXhasLabelXpersonX_valuesXnameX_constantXinhumanXX': [(lambda g:g.V().choose(__.hasLabel('person'),__.name,__.constant('inhuman')))],
@@ -352,7 +351,7 @@ world.gremlins = {
'g_VX1X_V_valuesXnameX': [(lambda g, vid1=None:g.V(vid1).V().name)],
'g_V_outXknowsX_V_name': [(lambda g:g.V().out('knows').V().name)],
'g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name': [(lambda g:g.V().has('artist','name','Garcia').in_('sungBy').as_('song').V().has('artist','name','Willie_Dixon').in_('writtenBy').where(P.eq('song')).name)],
- 'g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX': [(lambda g, xx1=None,vid1=None,vid2=None,vid3=None,vid4=None,vid5=None,vid6=None:g.addV('person').property(T.id,1).property('name','marko').property('age',29).as_('marko').addV('person').property(T.id,2).property('name','vadas').property('age',27).as_('vadas').addV('software').property(T.id,3).property('name','lop').property('lang','java').as_('lop').addV('person').property(T.id,4).property('name','josh').property('age',32).as_ [...]
+ 'g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX': [(lambda g, xx1=None,vid1=None,vid2=None,vid3=None,vid4=None,vid5=None,vid6=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang', [...]
'g_V_hasLabelXsoftwareX_index_unfold': [(lambda g:g.V().hasLabel('software').index().unfold())],
'g_V_hasLabelXsoftwareX_order_byXnameX_index_withXmapX': [(lambda g:g.V().hasLabel('software').order().by('name').index().with_('~tinkerpop.index.indexer',1))],
'g_V_hasLabelXsoftwareX_name_fold_orderXlocalX_index_unfold_order_byXtailXlocal_1XX': [(lambda g:g.V().hasLabel('software').name.fold().order(Scope.local).index().unfold().order().by(__.tail(Scope.local,1)))],
@@ -458,7 +457,7 @@ world.gremlins = {
'g_V_properties_order_byXkey_descX_key': [(lambda g:g.V().properties().order().by(T.key,Order.desc).key())],
'g_V_hasLabelXpersonX_order_byXvalueXageX_descX_name': [(lambda g, l1=None:g.V().hasLabel('person').order().by(l1,Order.desc).name)],
'g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX': [(lambda g:g.V().hasLabel('person').group().by('name').by(__.outE().weight.sum()).order(Scope.local).by(Column.values))],
- 'g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_descX': [(lambda g:g.V().map(__.bothE().weight.fold()).order().by(__.sum(Scope.local),Order.desc))],
+ 'g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_descX': [(lambda g:g.V().map(__.bothE().weight.order().by(Order.asc).fold()).order().by(__.sum(Scope.local),Order.desc))],
'g_V_group_byXlabelX_byXname_order_byXdescX_foldX': [(lambda g:g.V().group().by(T.label).by(__.name.order().by(Order.desc).fold()))],
'g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_descX': [(lambda g:g.V().hasLabel('person').group().by('name').by(__.outE().weight.sum()).unfold().order().by(Column.values,Order.desc))],
'g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_descX': [(lambda g:g.V().as_('v').map(__.bothE().weight.fold()).sum(Scope.local).as_('s').select('v','s').order().by(__.select('s'),Order.desc))],
@@ -469,15 +468,15 @@ world.gremlins = {
'g_V_orXhasLabelXpersonX_hasXsoftware_name_lopXX_order_byXageX': [(lambda g:g.V().or_(__.hasLabel('person'),__.has('software','name','lop')).order().by('age'))],
'g_VX1X_hasXlabel_personX_mapXmapXint_ageXX_orderXlocalX_byXvalues_descX_byXkeys_ascX': [(lambda g, l1=None,v1=None:g.V(v1).hasLabel('person').map(l1).order(Scope.local).by(Column.values,Order.desc).by(Column.keys,Order.asc))],
'g_VX1X_elementMap_orderXlocalX_byXkeys_descXunfold': [(lambda g, vid1=None:g.V(vid1).elementMap().order(Scope.local).by(Column.keys,Order.desc).unfold())],
- 'g_V_pageRank_hasXpageRankX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().pageRank().has('gremlin.pageRankVertexProgram.pageRank')), (lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.Grap [...]
- 'g_V_outXcreatedX_pageRank_withXedges_bothEX_withXpropertyName_projectRankX_withXtimes_0X_valueMapXname_projectRankX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().out('created').pageRank().with_('~tinkerpop.pageRank.edges',__.bothE()).with_('~tinkerpop.pageRank.propertyNa [...]
- 'g_V_pageRank_order_byXpageRank_descX_byXnameX_name': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().pageRank().order().by('gremlin.pageRankVertexProgram.pageRank',Order.desc).by('name').name)],
- 'g_V_pageRank_order_byXpageRank_descX_name_limitX2X': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().pageRank().order().by('gremlin.pageRankVertexProgram.pageRank',Order.desc).name[0:2])],
- 'g_V_pageRank_withXedges_outEXknowsXX_withXpropertyName_friendRankX_project_byXnameX_byXvaluesXfriendRankX_mathX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().pageRank().with_('~tinkerpop.pageRank.edges',__.outE('knows')).with_('~tinkerpop.pageRank.propertyName','friendRa [...]
- 'g_V_hasLabelXpersonX_pageRank_withXpropertyName_kpageRankX_project_byXnameX_byXvaluesXpageRankX_mathX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().hasLabel('person').pageRank().with_('~tinkerpop.pageRank.propertyName','pageRank').project('name','pageRank').by('name').by [...]
- 'g_V_pageRank_withXpropertyName_pageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX_by_byXmathX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().pageRank().with_('~tinkerpop.pageRank.propertyName','pageRank').as_('a').out('knows').values('pageRank').as_('b').select('a','b' [...]
- 'g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_withXedges_inEXcreatedX_withXtimes_1X_withXpropertyName_priorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().hasLabel('software').has('name','ripple').pageRank(fl [...]
- 'g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyName_pageRankX_withXedges_inEX_withXtimes_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().out('created').group('m').by(T.label).pageRank(float(1.0)).with_('~tinkerpop.p [...]
+ 'g_V_pageRank_hasXpageRankX': [(lambda g:g.V().pageRank().has('gremlin.pageRankVertexProgram.pageRank'))],
+ 'g_V_outXcreatedX_pageRank_withXedges_bothEX_withXpropertyName_projectRankX_withXtimes_0X_valueMapXname_projectRankX': [(lambda g:g.V().out('created').pageRank().with_('~tinkerpop.pageRank.edges',__.bothE()).with_('~tinkerpop.pageRank.propertyName','projectRank').with_('~tinkerpop.pageRank.times',0).valueMap('name','projectRank'))],
+ 'g_V_pageRank_order_byXpageRank_descX_byXnameX_name': [(lambda g:g.V().pageRank().order().by('gremlin.pageRankVertexProgram.pageRank',Order.desc).by('name').name)],
+ 'g_V_pageRank_order_byXpageRank_descX_name_limitX2X': [(lambda g:g.V().pageRank().order().by('gremlin.pageRankVertexProgram.pageRank',Order.desc).name[0:2])],
+ 'g_V_pageRank_withXedges_outEXknowsXX_withXpropertyName_friendRankX_project_byXnameX_byXvaluesXfriendRankX_mathX': [(lambda g:g.V().pageRank().with_('~tinkerpop.pageRank.edges',__.outE('knows')).with_('~tinkerpop.pageRank.propertyName','friendRank').project('name','friendRank').by('name').by(__.friendRank.math('ceil(_ * 100)')))],
+ 'g_V_hasLabelXpersonX_pageRank_withXpropertyName_kpageRankX_project_byXnameX_byXvaluesXpageRankX_mathX': [(lambda g:g.V().hasLabel('person').pageRank().with_('~tinkerpop.pageRank.propertyName','pageRank').project('name','pageRank').by('name').by(__.values('pageRank').math('ceil(_ * 100)')))],
+ 'g_V_pageRank_withXpropertyName_pageRankX_asXaX_outXknowsX_pageRank_asXbX_selectXa_bX_by_byXmathX': [(lambda g:g.V().pageRank().with_('~tinkerpop.pageRank.propertyName','pageRank').as_('a').out('knows').values('pageRank').as_('b').select('a','b').by().by(__.math('ceil(_ * 100)')))],
+ 'g_V_hasLabelXsoftwareX_hasXname_rippleX_pageRankX1X_withXedges_inEXcreatedX_withXtimes_1X_withXpropertyName_priorsX_inXcreatedX_unionXboth__identityX_valueMapXname_priorsX': [(lambda g:g.V().hasLabel('software').has('name','ripple').pageRank(float(1.0)).with_('~tinkerpop.pageRank.edges',__.inE('created')).with_('~tinkerpop.pageRank.times',1).with_('~tinkerpop.pageRank.propertyName','priors').in_('created').union(__.both(),__.identity()).valueMap('name','priors'))],
+ 'g_V_outXcreatedX_groupXmX_byXlabelX_pageRankX1X_withXpropertyName_pageRankX_withXedges_inEX_withXtimes_1X_inXcreatedX_groupXmX_byXpageRankX_capXmX': [(lambda g:g.V().out('created').group('m').by(T.label).pageRank(float(1.0)).with_('~tinkerpop.pageRank.propertyName','pageRank').with_('~tinkerpop.pageRank.edges',__.inE()).with_('~tinkerpop.pageRank.times',1).in_('created').group('m').by('pageRank').cap('m'))],
'g_VX1X_name_path': [(lambda g, vid1=None:g.V(vid1).name.path())],
'g_VX1X_out_path_byXageX_byXnameX': [(lambda g, vid1=None:g.V(vid1).out().path().by('age').by('name'))],
'g_V_repeatXoutX_timesX2X_path_byXitX_byXnameX_byXlangX': [(lambda g:g.V().repeat(__.out()).times(2).path().by().by('name').by('lang'))],
@@ -488,9 +487,9 @@ world.gremlins = {
'g_VX1X_out_path_byXageX': [(lambda g, vid1=None:g.V(vid1).out().path().by('age'))],
'g_injectX1_null_nullX_path': [(lambda g:g.inject(1,None,None).path())],
'g_injectX1_null_nullX_path_dedup': [(lambda g:g.inject(1,None,None).path().dedup())],
- 'g_V_peerPressure_hasXclusterX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().peerPressure().has('gremlin.peerPressureVertexProgram.cluster')), (lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.com [...]
- 'g_V_peerPressure_withXpropertyName_clusterX_withXedges_outEXknowsXX_pageRankX1X_byXrankX_withXedges_outEXknowsX_withXtimes_2X_group_byXclusterX_byXrank_sumX_limitX100X': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().peerPressure().with_('~tinkerpop.peerPressure.propertyNam [...]
- 'g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withyXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','ripple').in_('created').peerPressure().with_('~tinkerpo [...]
+ 'g_V_peerPressure_hasXclusterX': [(lambda g:g.V().peerPressure().has('gremlin.peerPressureVertexProgram.cluster'))],
+ 'g_V_peerPressure_withXpropertyName_clusterX_withXedges_outEXknowsXX_pageRankX1X_byXrankX_withXedges_outEXknowsX_withXtimes_2X_group_byXclusterX_byXrank_sumX_limitX100X': [(lambda g:g.V().peerPressure().with_('~tinkerpop.peerPressure.propertyName','cluster').with_('~tinkerpop.peerPressure.edges',__.outE('knows')).pageRank(float(1.0)).with_('~tinkerpop.pageRank.propertyName','rank').with_('~tinkerpop.pageRank.edges',__.outE('knows')).with_('~tinkerpop.pageRank.times',1).group().by('cl [...]
+ 'g_V_hasXname_rippleX_inXcreatedX_peerPressure_withXedges_outEX_withyXpropertyName_clusterX_repeatXunionXidentity__bothX_timesX2X_dedup_valueMapXname_clusterX': [(lambda g:g.V().has('name','ripple').in_('created').peerPressure().with_('~tinkerpop.peerPressure.edges',__.outE()).with_('~tinkerpop.peerPressure.propertyName','cluster').repeat(__.union(__.identity(),__.both())).times(2).dedup().valueMap('name','cluster'))],
'g_V_hasLabelXpersonX_projectXa_bX_byXoutE_countX_byXageX': [(lambda g:g.V().hasLabel('person').project('a','b').by(__.outE().count()).by('age'))],
'g_V_outXcreatedX_projectXa_bX_byXnameX_byXinXcreatedX_countX_order_byXselectXbX__descX_selectXaX': [(lambda g:g.V().out('created').project('a','b').by('name').by(__.in_('created').count()).order().by(__.select('b'),Order.desc).select('a'))],
'g_V_valueMap_projectXxX_byXselectXnameXX': [(lambda g:g.V().valueMap().project('x').by(__.select('name')))],
@@ -562,21 +561,21 @@ world.gremlins = {
'g_EX11X_propertiesXweightX_asXaX_selectXaX_byXvalueX': [(lambda g, eid11=None:g.E(eid11).properties('weight').as_('a').select('a').by(T.value))],
'g_V_asXaX_selectXaX_byXageX': [(lambda g:g.V().as_('a').select('a').by('age'))],
'g_withSideEffectXk_nullX_injectXxX_selectXkX': [(lambda g:g.withSideEffect('k',None).inject('x').select('k'))],
- 'g_V_shortestPath': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath())],
- 'g_V_both_dedup_shortestPath': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().both().dedup().shortestPath())],
- 'g_V_shortestPath_edgesIncluded': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.includeEdges'))],
- 'g_V_shortestPath_directionXINX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.edges',Direction.IN))],
- 'g_V_shortestPath_edgesXoutEX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.edges',__.outE()))],
- 'g_V_shortestPath_edgesIncluded_edgesXoutEX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.includeEdges').with_('~tinkerpop.shortestPath.edges',__.outE()))],
- 'g_V_hasXname_markoX_shortestPath': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','marko').shortestPath())],
- 'g_V_shortestPath_targetXhasXname_markoXX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.target',__.has('name','marko')))],
- 'g_V_shortestPath_targetXvaluesXnameX_isXmarkoXX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().identity().shortestPath().with_('~tinkerpop.shortestPath.target',__.name.is_('marko')))],
- 'g_V_hasXname_markoX_shortestPath_targetXhasLabelXsoftwareXX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','marko').shortestPath().with_('~tinkerpop.shortestPath.target',__.hasLabel('software')))],
- 'g_V_hasXname_markoX_shortestPath_targetXhasXname_joshXX_distanceXweightX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','marko').shortestPath().with_('~tinkerpop.shortestPath.target',__.has('name','josh')).with_('~tinkerpop.shortestPath.distance','weight'))],
- 'g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','daniel').shortestPath().with_('~tinkerpop.shortestPath.target',__.has('name','stephen')).with_('~tinkerpop.shortestPath.edges',__.both [...]
- 'g_V_hasXsong_name_MIGHT_AS_WELLX_shortestPath_targetXhasXsong_name_MAYBE_YOU_KNOW_HOW_I_FEELXX_edgesXoutEXfollowedByXX_distanceXweightX': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('song','name','MIGHT AS WELL').shortestPath().with_('~tinkerpop.shortestPath.target', [...]
- 'g_V_hasXname_markoX_shortestPath_maxDistanceX1X': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','marko').shortestPath().with_('~tinkerpop.shortestPath.maxDistance',1))],
- 'g_V_hasXname_vadasX_shortestPath_distanceXweightX_maxDistanceX1_3X': [(lambda g:g.withStrategies(*[TraversalStrategy('VertexProgramStrategy',{'graphComputer':'org.apache.tinkerpop.gremlin.process.computer.GraphComputer'}, 'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy')]).V().has('name','vadas').shortestPath().with_('~tinkerpop.shortestPath.distance','weight').with_('~tinkerpop.shortestPath.maxDistance',float(1.3)))],
+ 'g_V_shortestPath': [(lambda g:g.V().identity().shortestPath())],
+ 'g_V_both_dedup_shortestPath': [(lambda g:g.V().both().dedup().shortestPath())],
+ 'g_V_shortestPath_edgesIncluded': [(lambda g:g.V().identity().shortestPath().with_('~tinkerpop.shortestPath.includeEdges'))],
+ 'g_V_shortestPath_directionXINX': [(lambda g:g.V().identity().shortestPath().with_('~tinkerpop.shortestPath.edges',Direction.IN))],
+ 'g_V_shortestPath_edgesXoutEX': [(lambda g:g.V().identity().shortestPath().with_('~tinkerpop.shortestPath.edges',__.outE()))],
+ 'g_V_shortestPath_edgesIncluded_edgesXoutEX': [(lambda g:g.V().identity().shortestPath().with_('~tinkerpop.shortestPath.includeEdges').with_('~tinkerpop.shortestPath.edges',__.outE()))],
+ 'g_V_hasXname_markoX_shortestPath': [(lambda g:g.V().has('name','marko').shortestPath())],
+ 'g_V_shortestPath_targetXhasXname_markoXX': [(lambda g:g.V().identity().shortestPath().with_('~tinkerpop.shortestPath.target',__.has('name','marko')))],
+ 'g_V_shortestPath_targetXvaluesXnameX_isXmarkoXX': [(lambda g:g.V().identity().shortestPath().with_('~tinkerpop.shortestPath.target',__.name.is_('marko')))],
+ 'g_V_hasXname_markoX_shortestPath_targetXhasLabelXsoftwareXX': [(lambda g:g.V().has('name','marko').shortestPath().with_('~tinkerpop.shortestPath.target',__.hasLabel('software')))],
+ 'g_V_hasXname_markoX_shortestPath_targetXhasXname_joshXX_distanceXweightX': [(lambda g:g.V().has('name','marko').shortestPath().with_('~tinkerpop.shortestPath.target',__.has('name','josh')).with_('~tinkerpop.shortestPath.distance','weight'))],
+ 'g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX': [(lambda g:g.V().has('name','daniel').shortestPath().with_('~tinkerpop.shortestPath.target',__.has('name','stephen')).with_('~tinkerpop.shortestPath.edges',__.bothE('uses')))],
+ 'g_V_hasXsong_name_MIGHT_AS_WELLX_shortestPath_targetXhasXsong_name_MAYBE_YOU_KNOW_HOW_I_FEELXX_edgesXoutEXfollowedByXX_distanceXweightX': [(lambda g:g.V().has('song','name','MIGHT AS WELL').shortestPath().with_('~tinkerpop.shortestPath.target',__.has('song','name','MAYBE YOU KNOW HOW I FEEL')).with_('~tinkerpop.shortestPath.edges',__.outE('followedBy')).with_('~tinkerpop.shortestPath.distance','weight'))],
+ 'g_V_hasXname_markoX_shortestPath_maxDistanceX1X': [(lambda g:g.V().has('name','marko').shortestPath().with_('~tinkerpop.shortestPath.maxDistance',1))],
+ 'g_V_hasXname_vadasX_shortestPath_distanceXweightX_maxDistanceX1_3X': [(lambda g:g.V().has('name','vadas').shortestPath().with_('~tinkerpop.shortestPath.distance','weight').with_('~tinkerpop.shortestPath.maxDistance',float(1.3)))],
'g_V_age_sum': [(lambda g:g.V().age.sum())],
'g_V_foo_sum': [(lambda g:g.V().foo.sum())],
'g_V_age_fold_sumXlocalX': [(lambda g:g.V().age.fold().sum(Scope.local))],
@@ -639,7 +638,7 @@ world.gremlins = {
'g_VX1X_out_out_out': [(lambda g, vid1=None:g.V(vid1).out().out().out())],
'g_VX1X_out_name': [(lambda g, vid1=None:g.V(vid1).out().name)],
'g_VX1X_to_XOUT_knowsX': [(lambda g, vid1=None:g.V(vid1).to(Direction.OUT,'knows'))],
- 'g_VX1_2_3_4X_name': [(lambda g, vid4=None,vid3=None,vid2=None,vid1=None:g.V(vid1,vid2,vid3,vid4).name)],
+ 'g_VX1_2_3_4X_name': [(lambda g, vid4=None,vid3=None,vid2=None,vid1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').pro [...]
'g_V_hasLabelXpersonX_V_hasLabelXsoftwareX_name': [(lambda g:g.V().hasLabel('person').V().hasLabel('software').name)],
'g_V_hasLabelXloopsX_bothEXselfX': [(lambda g:g.V().hasLabel('loops').bothE('self'))],
'g_V_hasLabelXloopsX_bothXselfX': [(lambda g:g.V().hasLabel('loops').both('self'))],
@@ -659,7 +658,7 @@ world.gremlins = {
'g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX': [(lambda g:g.V().has('lang').group('a').by('lang').by('name').out().cap('a'))],
'g_V_hasXlangX_group_byXlangX_byXcountX': [(lambda g:g.V().has('lang').group().by('lang').by(__.count()))],
'g_V_repeatXout_groupXaX_byXnameX_byXcountX_timesX2X_capXaX': [(lambda g:g.V().repeat(__.out().group('a').by('name').by(__.count())).times(2).cap('a'))],
- 'g_V_group_byXoutE_countX_byXnameX': [(lambda g:g.V().group().by(__.outE().count()).by('name'))],
+ 'g_V_group_byXoutE_countX_byXnameX': [(lambda g:g.V().order().by('name').group().by(__.outE().count()).by('name'))],
'g_V_groupXaX_byXlabelX_byXoutE_weight_sumX_capXaX': [(lambda g:g.V().group('a').by(T.label).by(__.outE().weight.sum()).cap('a'))],
'g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byXcountX': [(lambda g:g.V().repeat(__.both('followedBy')).times(2).group().by('songType').by(__.count()))],
'g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byXcountX_capXaX': [(lambda g:g.V().repeat(__.both('followedBy')).times(2).group('a').by('songType').by(__.count()).cap('a'))],
@@ -671,7 +670,7 @@ world.gremlins = {
'g_V_outXfollowedByX_group_byXsongTypeX_byXbothE_group_byXlabelX_byXweight_sumXX': [(lambda g:g.V().out('followedBy').group().by('songType').by(__.bothE().group().by(T.label).by(__.weight.sum())))],
'g_V_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX': [(lambda g:g.V().group('m').by('name').by(__.in_('knows').name).cap('m'))],
'g_V_group_byXlabelX_byXbothE_groupXaX_byXlabelX_byXweight_sumX_weight_sumX': [(lambda g:g.V().group().by(T.label).by(__.bothE().group('a').by(T.label).by(__.weight.sum()).weight.sum()))],
- 'g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX': [(lambda g, xx1=None:g.withSideEffect('a',xx1).V().group('a').by('name').by(__.outE().label().fold()).cap('a'))],
+ 'g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX': [(lambda g, xx1=None:g.withSideEffect('a',xx1).V().group('a').by('name').by(__.outE().label().fold()).cap('a').unfold().group().by(Column.keys).by(__.select(Column.values).order(Scope.local).by(Order.asc)))],
'g_V_hasLabelXpersonX_asXpX_outXcreatedX_group_byXnameX_byXselectXpX_valuesXageX_sumX': [(lambda g:g.V().hasLabel('person').as_('p').out('created').group().by('name').by(__.select('p').age.sum()))],
'g_V_hasLabelXpersonX_asXpX_outXcreatedX_groupXaX_byXnameX_byXselectXpX_valuesXageX_sumX_capXaX': [(lambda g:g.V().hasLabel('person').as_('p').out('created').group('a').by('name').by(__.select('p').age.sum()).cap('a'))],
'g_V_group_byXlabelX_byXlabel_countX': [(lambda g:g.V().group().by(__.label()).by(__.label().count()))],
diff --git a/gremlin-test/features/filter/Where.feature b/gremlin-test/features/filter/Where.feature
index 27e0e46..156d124 100644
--- a/gremlin-test/features/filter/Where.feature
+++ b/gremlin-test/features/filter/Where.feature
@@ -334,6 +334,7 @@ Feature: Step - where()
| josh |
# comparison of null "age" values in where()
+ @GraphComputerVerificationReferenceOnly
Scenario: g_VX3X_asXaX_in_out_asXbX_whereXa_eqXbXX_byXageX_name
Given the modern graph
And using the parameter vid3 defined as "v[lop].id"
diff --git a/gremlin-test/features/map/Mean.feature b/gremlin-test/features/map/Mean.feature
index 97352d6..cb1b2de 100644
--- a/gremlin-test/features/map/Mean.feature
+++ b/gremlin-test/features/map/Mean.feature
@@ -117,6 +117,7 @@ Feature: Step - mean()
| result |
| null |
+ @GraphComputerVerificationInjectionNotSupported
Scenario: g_injectXnull_10_20_nullX_mean
Given the modern graph
And using the parameter xx1 defined as "d[10].i"
@@ -130,6 +131,7 @@ Feature: Step - mean()
| result |
| d[15].d |
+ @GraphComputerVerificationInjectionNotSupported
Scenario: g_injectXlistXnull_10_20_nullXX_meanXlocalX
Given the modern graph
And using the parameter xx1 defined as "l[null,d[10].i,d[20].i,null]"
diff --git a/gremlin-test/features/map/Path.feature b/gremlin-test/features/map/Path.feature
index c31d1dc..e4e9f2e 100644
--- a/gremlin-test/features/map/Path.feature
+++ b/gremlin-test/features/map/Path.feature
@@ -109,6 +109,7 @@ Feature: Step - path()
| p[josh,ripple] |
| p[josh,lop] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_VX1X_out_path_byXageX
Given the modern graph
And using the parameter vid1 defined as "v[marko].id"
diff --git a/gremlin-test/features/map/Sum.feature b/gremlin-test/features/map/Sum.feature
index 97165b8..44e59f7 100644
--- a/gremlin-test/features/map/Sum.feature
+++ b/gremlin-test/features/map/Sum.feature
@@ -117,6 +117,7 @@ Feature: Step - sum()
| result |
| null |
+ @GraphComputerVerificationInjectionNotSupported
Scenario: g_injectXnull_10_5_nullX_sum
Given the modern graph
And using the parameter xx1 defined as "d[10].i"
@@ -130,6 +131,7 @@ Feature: Step - sum()
| result |
| d[15].l |
+ @GraphComputerVerificationInjectionNotSupported
Scenario: g_injectXlistXnull_10_5_nullXX_sumXlocalX
Given the modern graph
And using the parameter xx1 defined as "l[null,d[10].i,d[5].i,null]"
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
index ebf04fc..67b25ed 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
@@ -127,6 +127,7 @@ public final class StepDefinition {
add(Pair.with(Pattern.compile("s\\[(.*)\\]"), s -> {
throw new AssumptionViolatedException("This test uses a Set as a parameter which is not supported by gremlin-language");
}));
+ add(Pair.with(Pattern.compile("(null)"), s -> "null"));
}};
private List<Pair<Pattern, Function<String,Object>>> objectMatcherConverters = new ArrayList<Pair<Pattern, Function<String,Object>>>() {{
@@ -147,6 +148,8 @@ public final class StepDefinition {
return Stream.of(items).map(String::trim).map(x -> convertToObject(x)).collect(Collectors.toList());
}));
+ add(Pair.with(Pattern.compile("(null)"), s -> null));
+
add(Pair.with(Pattern.compile("p\\[(.*)\\]"), s -> {
throw new AssumptionViolatedException("This test uses a Path as a parameter which is not supported by gremlin-language");
}));
@@ -176,8 +179,6 @@ public final class StepDefinition {
add(Pair.with(Pattern.compile("s\\[(.*)\\]"), s -> {
throw new AssumptionViolatedException("This test uses a Set as a parameter which is not supported by gremlin-language");
}));
-
- add(Pair.with(Pattern.compile("(null)"), s -> null));
}};
@Inject
@@ -228,6 +229,8 @@ public final class StepDefinition {
@Given("the traversal of")
public void theTraversalOf(final String docString) {
+ if (docString.equals("g.inject(10,20,null,20,10,10).groupCount(\"x\").dedup().as(\"y\").project(\"a\",\"b\").by().by(__.select(\"x\").select(__.select(\"y\")))"))
+ System.out.println("CMON");
final String gremlin = tryUpdateDataFilePath(docString);
traversal = parseGremlin(applyParameters(gremlin));
}
@@ -343,7 +346,6 @@ public final class StepDefinition {
final Matcher matcher = pattern.matcher(pvalue);
if (matcher.find()) {
final Function<String,String> converter = matcherConverter.getValue1();
-
// when there are no groups there is a direct match
return converter.apply(matcher.groupCount() == 0 ? "" : matcher.group(1));
}
@@ -360,7 +362,9 @@ public final class StepDefinition {
// we may get some json stuff if it's a m[]
if (pvalue instanceof JsonNode) {
final JsonNode n = (JsonNode) pvalue;
- if (n.isArray()) {
+ if (n.isNull()) {
+ v = null;
+ } else if (n.isArray()) {
v = IteratorUtils.stream(n.elements()).map(this::convertToObject).collect(Collectors.toList());
} else if (n.isObject()) {
final Map<Object,Object> m = new HashMap<>(n.size());
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
index f5992f4..a08b62f 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
@@ -90,6 +90,7 @@ public class TinkerGraphWorld implements World {
private static final List<String> TAGS_TO_IGNORE = Arrays.asList(
"@StepDrop",
+ "@StepInject",
"@StepV",
"@GraphComputerVerificationOneBulk",
"@GraphComputerVerificationMidVNotSupported",
@@ -105,7 +106,8 @@ public class TinkerGraphWorld implements World {
"g_V_order_byXoutE_count_descX",
"g_V_both_both_dedup_byXoutE_countX_name",
"g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_descX",
- "g_V_hasLabelXsoftwareX_order_byXnameX_index_withXmapX");
+ "g_V_hasLabelXsoftwareX_order_byXnameX_index_withXmapX",
+ "g_V_order_byXname_descX_barrier_dedup_age_name");
@Override
public void beforeEachScenario(final Scenario scenario) {
[tinkerpop] 01/18: TINKERPOP-2601 Basics in place for Gherkin test
to run on JVM
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit a4cb0c4ea5dfb4a2b8b3657fe81032881f29a0b7
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Mon Feb 8 10:05:24 2021 -0500
TINKERPOP-2601 Basics in place for Gherkin test to run on JVM
Fully working pattern for gherkin tests running on TinkerGraph and using gremlin-language to parse to a Traversal object.
---
gremlin-core/pom.xml | 9 -
.../language/grammar/TraversalMethodVisitor.java | 12 +-
gremlin-javascript/build/generate.groovy | 2 +-
gremlin-language/pom.xml | 14 +-
.../language/corpus}/DocumentationReader.java | 4 +-
.../gremlin/language/corpus/FeatureReader.java | 135 +++++++
.../language/corpus/DocumentationReaderTest.java | 13 +-
.../language/corpus}/FeatureReaderTest.java | 23 +-
.../gremlin/language/grammar/FeatureReader.java | 95 -----
.../language/grammar/ReferenceGrammarTest.java | 37 +-
gremlin-python/build/generate.groovy | 2 +-
gremlin-test/features/map/Map.feature | 1 +
gremlin-test/features/map/Vertex.feature | 18 +-
gremlin-test/pom.xml | 21 +
.../tinkerpop/gremlin/features/FeatureReader.java | 79 ----
.../tinkerpop/gremlin/features/StepDefinition.java | 433 +++++++++++++++++++++
.../apache/tinkerpop/gremlin/features/World.java | 57 +++
pom.xml | 1 +
tinkergraph-gremlin/pom.xml | 6 +
.../tinkergraph/TinkerGraphFeatureTest.java | 89 +++++
.../src/test/resources/cucumber.properties | 1 +
21 files changed, 830 insertions(+), 222 deletions(-)
diff --git a/gremlin-core/pom.xml b/gremlin-core/pom.xml
index 6c10b85..cef750b 100644
--- a/gremlin-core/pom.xml
+++ b/gremlin-core/pom.xml
@@ -52,20 +52,11 @@ limitations under the License.
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-text</artifactId>
- </dependency>
- <dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>
<dependency>
- <groupId>org.javatuples</groupId>
- <artifactId>javatuples</artifactId>
- <version>${java.tuples.version}</version>
- </dependency>
- <dependency>
<groupId>com.carrotsearch</groupId>
<artifactId>hppc</artifactId>
<version>0.7.1</version>
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java
index 9b67447..598dd45 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java
@@ -940,7 +940,7 @@ public class TraversalMethodVisitor extends TraversalRootVisitor<GraphTraversal>
*/
@Override
public GraphTraversal visitTraversalMethod_option_Object_Traversal(final GremlinParser.TraversalMethod_option_Object_TraversalContext ctx) {
- return graphTraversal.option(GenericLiteralVisitor.getInstance().visitGenericLiteral(ctx.genericLiteral()),
+ return graphTraversal.option(new GenericLiteralVisitor(antlr).visitGenericLiteral(ctx.genericLiteral()),
antlr.tvisitor.visitNestedTraversal(ctx.nestedTraversal()));
}
@@ -1118,8 +1118,8 @@ public class TraversalMethodVisitor extends TraversalRootVisitor<GraphTraversal>
*/
@Override
public GraphTraversal visitTraversalMethod_property_Object_Object_Object(final GremlinParser.TraversalMethod_property_Object_Object_ObjectContext ctx) {
- return graphTraversal.property(GenericLiteralVisitor.getInstance().visitGenericLiteral(ctx.genericLiteral(0)),
- GenericLiteralVisitor.getInstance().visitGenericLiteral(ctx.genericLiteral(1)),
+ return graphTraversal.property(new GenericLiteralVisitor(antlr).visitGenericLiteral(ctx.genericLiteral(0)),
+ new GenericLiteralVisitor(antlr).visitGenericLiteral(ctx.genericLiteral(1)),
GenericLiteralVisitor.getGenericLiteralList(ctx.genericLiteralList()));
}
@@ -1504,6 +1504,12 @@ public class TraversalMethodVisitor extends TraversalRootVisitor<GraphTraversal>
return graphTraversal.math(GenericLiteralVisitor.getStringLiteral(ctx.stringLiteral()));
}
+ @Override
+ public Traversal visitTraversalMethod_option_Predicate_Traversal(final GremlinParser.TraversalMethod_option_Predicate_TraversalContext ctx) {
+ return graphTraversal.option(TraversalPredicateVisitor.getInstance().visitTraversalPredicate(ctx.traversalPredicate()),
+ antlr.tvisitor.visitNestedTraversal(ctx.nestedTraversal()));
+ }
+
public GraphTraversal[] getNestedTraversalList(final GremlinParser.NestedTraversalListContext ctx) {
return ctx.nestedTraversalExpr().nestedTraversal()
.stream()
diff --git a/gremlin-javascript/build/generate.groovy b/gremlin-javascript/build/generate.groovy
index c82b14d..09bd9e7 100644
--- a/gremlin-javascript/build/generate.groovy
+++ b/gremlin-javascript/build/generate.groovy
@@ -42,7 +42,7 @@ gremlinGroovyScriptEngine = new GremlinGroovyScriptEngine(new GroovyCustomizer()
}
})
translator = JavascriptTranslator.of('g')
-g = traversal().withGraph(EmptyGraph.instance())
+g = traversal().withEmbedded(EmptyGraph.instance())
bindings = new SimpleBindings()
bindings.put('g', g)
diff --git a/gremlin-language/pom.xml b/gremlin-language/pom.xml
index aff53a3..a48e6ed 100644
--- a/gremlin-language/pom.xml
+++ b/gremlin-language/pom.xml
@@ -32,6 +32,15 @@ limitations under the License.
<artifactId>antlr4</artifactId>
<version>${antlr4.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.javatuples</groupId>
+ <artifactId>javatuples</artifactId>
+ <version>${java.tuples.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-text</artifactId>
+ </dependency>
<!-- TESTING -->
<dependency>
<groupId>junit</groupId>
@@ -43,11 +52,6 @@ limitations under the License.
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-text</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<properties>
diff --git a/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/DocumentationReader.java b/gremlin-language/src/main/java/org/apache/tinkerpop/gremlin/language/corpus/DocumentationReader.java
similarity index 98%
rename from gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/DocumentationReader.java
rename to gremlin-language/src/main/java/org/apache/tinkerpop/gremlin/language/corpus/DocumentationReader.java
index 93bbccd..b657cae 100644
--- a/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/DocumentationReader.java
+++ b/gremlin-language/src/main/java/org/apache/tinkerpop/gremlin/language/corpus/DocumentationReader.java
@@ -16,9 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tinkerpop.gremlin.language.grammar;
-
-import org.apache.commons.text.StringEscapeUtils;
+package org.apache.tinkerpop.gremlin.language.corpus;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
diff --git a/gremlin-language/src/main/java/org/apache/tinkerpop/gremlin/language/corpus/FeatureReader.java b/gremlin-language/src/main/java/org/apache/tinkerpop/gremlin/language/corpus/FeatureReader.java
new file mode 100644
index 0000000..07457bd
--- /dev/null
+++ b/gremlin-language/src/main/java/org/apache/tinkerpop/gremlin/language/corpus/FeatureReader.java
@@ -0,0 +1,135 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.language.corpus;
+
+import org.apache.commons.text.StringEscapeUtils;
+import org.javatuples.Pair;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.BiFunction;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Reads the Gherkin feature files of {@code gremlin-test} and extracts Gremlin examples.
+ */
+public class FeatureReader {
+
+ private static final Pattern generalParameterPattern = Pattern.compile("And using the parameter (.+) (defined as|of) (.*)");
+
+ /**
+ * Parses Gremlin to a {@code Map} structure of the test name as the key with a {@code List} of Gremlin strings
+ * for the value.
+ * @param projectRoot the root directory of the TinkerPop project source code
+ */
+ public static Map<String, List<String>> parse(final String projectRoot) throws IOException {
+ return parse(projectRoot, Collections.emptyList());
+ }
+
+ /**
+ * Parses Gremlin to a {@code Map} structure of the test name as the key with a {@code List} of Gremlin strings
+ * for the value.
+ * @param projectRoot the root directory of the TinkerPop project source code
+ * @param parameterMatchers list of pattern/functions that will transform a parameter from its Gherkin form to
+ * another format triggering that new formatted string to be inserted into the Gremlin
+ * itself
+ */
+ public static Map<String, List<String>> parse(final String projectRoot,
+ final List<Pair<Pattern, BiFunction<String, String, String>>> parameterMatchers) throws IOException {
+ final Map<String, List<String>> gremlins = new LinkedHashMap<>();
+ Files.find(Paths.get(projectRoot, "gremlin-test", "features"),
+ Integer.MAX_VALUE,
+ (filePath, fileAttr) -> fileAttr.isRegularFile() && filePath.toString().endsWith(".feature")).
+ sorted().
+ forEach(f -> {
+ String currentGremlin = "";
+ boolean openTriples = false;
+ boolean skipIgnored = false;
+ String scenarioName = "";
+ Map<String,String> parameters = new HashMap<>();
+
+ try {
+ final List<String> lines = Files.readAllLines(f, StandardCharsets.UTF_8);
+ for (String line : lines) {
+ String cleanLine = line.trim();
+ if (cleanLine.startsWith("Scenario:")) {
+ scenarioName = cleanLine.split(":")[1].trim();
+ skipIgnored = false;
+ parameters.clear();
+ } else if (!parameterMatchers.isEmpty() && cleanLine.startsWith("And using the parameter")) {
+ final Matcher m = generalParameterPattern.matcher(cleanLine);
+ if (m.matches()) {
+ parameters.put(m.group(1), matchAndTransform(m.group(1), StringEscapeUtils.unescapeJava(m.group(3)), parameterMatchers));
+ } else {
+ throw new IllegalStateException(String.format("Could not read parameters at: %s", cleanLine));
+ }
+ } else if (cleanLine.startsWith("Then nothing should happen because")) {
+ skipIgnored = true;
+ } else if (cleanLine.startsWith("And the graph should return")) {
+ gremlins.computeIfAbsent(scenarioName, k -> new ArrayList<>()).add(applyParametersToGremlin(StringEscapeUtils.unescapeJava(cleanLine.substring(cleanLine.indexOf("\"") + 1, cleanLine.lastIndexOf("\""))), parameters));
+ } else if (cleanLine.startsWith("\"\"\"")) {
+ openTriples = !openTriples;
+ if (!skipIgnored && !openTriples) {
+ currentGremlin = applyParametersToGremlin(currentGremlin, parameters);
+ gremlins.computeIfAbsent(scenarioName, k -> new ArrayList<>()).add(currentGremlin);
+ currentGremlin = "";
+ }
+ } else if (openTriples && !skipIgnored) {
+ currentGremlin += cleanLine;
+ }
+ }
+ } catch (IOException ioe) {
+ throw new RuntimeException(ioe);
+ }
+ });
+
+ return gremlins;
+ }
+
+ private static String applyParametersToGremlin(String currentGremlin, Map<String, String> parameters) {
+ for (Map.Entry<String,String> kv : parameters.entrySet()) {
+ currentGremlin = currentGremlin.replace(kv.getKey(), kv.getValue());
+ }
+ return currentGremlin;
+ }
+
+ private static String matchAndTransform(final String k, final String v,
+ final List<Pair<Pattern, BiFunction<String, String, String>>> parameterMatchers) {
+ for (Pair<Pattern,BiFunction<String,String,String>> matcherConverter : parameterMatchers) {
+ final Pattern pattern = matcherConverter.getValue0();
+ final Matcher matcher = pattern.matcher(v);
+ if (matcher.find()) {
+ final BiFunction<String,String,String> converter = matcherConverter.getValue1();
+ // when there are no groups there is a direct match
+ return converter.apply(k, matcher.groupCount() == 0 ? "" : matcher.group(1));
+ }
+ }
+
+ throw new IllegalStateException(String.format("Could not match the parameter [%s] pattern of %s", k, v));
+ }
+}
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/features/FeatureReaderTest.java b/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/corpus/DocumentationReaderTest.java
similarity index 80%
copy from gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/features/FeatureReaderTest.java
copy to gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/corpus/DocumentationReaderTest.java
index 8d67347..ab131c4 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/features/FeatureReaderTest.java
+++ b/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/corpus/DocumentationReaderTest.java
@@ -16,27 +16,24 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tinkerpop.gremlin.features;
+package org.apache.tinkerpop.gremlin.language.corpus;
import org.junit.Test;
import java.io.IOException;
-import java.util.List;
-import java.util.Map;
+import java.util.Set;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.number.OrderingComparison.greaterThan;
import static org.junit.Assert.assertEquals;
-public class FeatureReaderTest {
+public class DocumentationReaderTest {
@Test
public void shouldParseInSameOrder() throws IOException {
final String projectRoot = "../";
- final Map<String,List<String>> gremlins = FeatureReader.parse(projectRoot);
+ final Set<String> gremlins = DocumentationReader.parse(projectRoot);
assertThat(gremlins.size(), greaterThan(0));
- assertEquals(gremlins,
- FeatureReader.parse(projectRoot));
-
+ assertEquals(gremlins, DocumentationReader.parse(projectRoot));
}
}
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/features/FeatureReaderTest.java b/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/corpus/FeatureReaderTest.java
similarity index 57%
rename from gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/features/FeatureReaderTest.java
rename to gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/corpus/FeatureReaderTest.java
index 8d67347..6639ea8 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/features/FeatureReaderTest.java
+++ b/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/corpus/FeatureReaderTest.java
@@ -16,15 +16,21 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tinkerpop.gremlin.features;
+package org.apache.tinkerpop.gremlin.language.corpus;
+import org.javatuples.Pair;
import org.junit.Test;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import java.util.Map;
+import java.util.function.BiFunction;
+import java.util.regex.Pattern;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.number.OrderingComparison.greaterThan;
import static org.junit.Assert.assertEquals;
@@ -35,8 +41,19 @@ public class FeatureReaderTest {
final String projectRoot = "../";
final Map<String,List<String>> gremlins = FeatureReader.parse(projectRoot);
assertThat(gremlins.size(), greaterThan(0));
- assertEquals(gremlins,
- FeatureReader.parse(projectRoot));
+ assertEquals(gremlins, FeatureReader.parse(projectRoot));
+ }
+
+ @Test
+ public void shouldParseAndEmbed() throws IOException {
+ final String replaceToken = "****replaced****";
+ final List<Pair<Pattern, BiFunction<String, String, String>>> parameterMatchers = new ArrayList<>();
+ parameterMatchers.add(Pair.with(Pattern.compile("(.*)"), (k, v) -> replaceToken));
+ final String projectRoot = "../";
+ final Map<String,List<String>> gremlins = FeatureReader.parse(projectRoot, parameterMatchers);
+ // at least one of these things must have the "replaced" token
+ assertThat(gremlins.values().stream().
+ flatMap(Collection::stream).anyMatch(gremlin -> gremlin.contains(replaceToken)), is(true));
}
}
diff --git a/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/FeatureReader.java b/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/FeatureReader.java
deleted file mode 100644
index 6006c7b..0000000
--- a/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/FeatureReader.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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.
- */
-package org.apache.tinkerpop.gremlin.language.grammar;
-
-import org.apache.commons.text.StringEscapeUtils;
-
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Reads the feature files and extracts Gremlin to help build the parsing test corpus.
- */
-public class FeatureReader {
-
- public static Set<String> parse(final String projectRoot) throws IOException {
- final Set<String> gremlins = new LinkedHashSet<>();
- Files.find(Paths.get(projectRoot, "gremlin-test", "features"),
- Integer.MAX_VALUE,
- (filePath, fileAttr) -> fileAttr.isRegularFile() && filePath.toString().endsWith(".feature")).
- sorted().
- forEach(f -> {
- String currentGremlin = "";
- boolean openTriples = false;
- boolean skipIgnored = false;
-
- try {
- final List<String> lines = Files.readAllLines(f, StandardCharsets.UTF_8);
- for (String line : lines) {
- String cleanLine = line.trim();
- if (cleanLine.startsWith("Then nothing should happen because")) {
- skipIgnored = true;
- } else if (cleanLine.startsWith("And the graph should return")) {
- gremlins.add(replaceVariables(
- StringEscapeUtils.unescapeJava(
- cleanLine.substring(cleanLine.indexOf("\"") + 1, cleanLine.lastIndexOf("\"")))));
- } else if (cleanLine.startsWith("\"\"\"")) {
- openTriples = !openTriples;
- if (!skipIgnored && !openTriples) {
- gremlins.add(replaceVariables(currentGremlin));
- currentGremlin = "";
- }
- } else if (openTriples && !skipIgnored) {
- currentGremlin += cleanLine;
- }
- }
- } catch (IOException ioe) {
- throw new RuntimeException(ioe);
- }
- });
-
- return gremlins;
- }
-
- /**
- * Variables can't be parsed by the grammar so they must be replaced with something concrete.
- */
- private static String replaceVariables(final String gremlin) {
- return gremlin.replace("xx1", "\"1\"").
- replace("xx2", "\"2\"").
- replace("xx3", "\"3\"").
- replace("vid1", "1").
- replace("vid2", "2").
- replace("vid3", "3").
- replace("vid4", "4").
- replace("vid5", "5").
- replace("vid6", "6").
- replace("eid7", "7").
- replace("eid8", "8").
- replace("eid9", "9").
- replace("eid10", "10").
- replace("eid11", "11").
- replace("eid12", "12");
- }
-}
diff --git a/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/ReferenceGrammarTest.java b/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/ReferenceGrammarTest.java
index 2246fd3..f1f2e4f 100644
--- a/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/ReferenceGrammarTest.java
+++ b/gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/ReferenceGrammarTest.java
@@ -18,14 +18,23 @@
*/
package org.apache.tinkerpop.gremlin.language.grammar;
+import org.apache.tinkerpop.gremlin.language.corpus.DocumentationReader;
+import org.apache.tinkerpop.gremlin.language.corpus.FeatureReader;
+import org.javatuples.Pair;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.LinkedHashSet;
+import java.util.List;
import java.util.Set;
+import java.util.function.BiFunction;
import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
import static org.hamcrest.Matchers.is;
import static org.junit.Assume.assumeThat;
@@ -40,10 +49,31 @@ public class ReferenceGrammarTest extends AbstractGrammarTest {
private static final Pattern vertexPattern = Pattern.compile(".*v\\d.*");
private static final Pattern edgePattern = Pattern.compile(".*e\\d.*");
+ private static final List<Pair<Pattern, BiFunction<String,String,String>>> stringMatcherConverters = new ArrayList<Pair<Pattern, BiFunction<String,String,String>>>() {{
+ add(Pair.with(Pattern.compile("l\\[\\]"), (k,v) -> "[]"));
+ add(Pair.with(Pattern.compile("l\\[(.*)\\]"), (k,v) -> {
+ final String[] items = v.split(",");
+ final String listItems = Stream.of(items).map(String::trim).map(x -> String.format("\"%s\"", x)).collect(Collectors.joining(","));
+ return String.format("[%s]", listItems);
+ }));
+ add(Pair.with(Pattern.compile("v\\[(.+)\\]"), (k,v) -> "\"1\""));
+ add(Pair.with(Pattern.compile("e\\[(.+)\\]"), (k,v) -> "\"1\""));
+ add(Pair.with(Pattern.compile("d\\[(.*)\\]\\.?.*"), (k,v) -> v));
+ add(Pair.with(Pattern.compile("m\\[(.*)\\]"), (k,v) -> v.replace('{','[').replace('}', ']')));
+ add(Pair.with(Pattern.compile("t\\[(.*)\\]"), (k,v) -> String.format("T.%s", v)));
+ add(Pair.with(Pattern.compile("D\\[(.*)\\]"), (k,v) -> String.format("Direction.%s", v)));
+
+ // the grammar doesn't support all the Gremlin we have in the gherkin set, so try to coerce it into
+ // something that can be parsed so that we get maximum exercise over the parser itself.
+ add(Pair.with(Pattern.compile("c\\[(.*)\\]"), (k,v) -> k.equals("c1") || k.equals("c2") ? "Order.desc" : "__.identity()")); // closure -> Comparator || Traversal
+ add(Pair.with(Pattern.compile("s\\[\\]"), (k,v) -> "[]")); // set -> list
+ add(Pair.with(Pattern.compile("s\\[(.*)\\]"), (k,v) -> "[]")); // set -> list
+ }};
+
@Parameterized.Parameters(name = "{0}")
public static Iterable<String> queries() throws IOException {
final Set<String> gremlins = new LinkedHashSet<>(DocumentationReader.parse("../"));
- gremlins.addAll(FeatureReader.parse("../"));
+ gremlins.addAll(FeatureReader.parse("../", stringMatcherConverters).values().stream().flatMap(Collection::stream).collect(Collectors.toList()));
return gremlins;
}
@@ -52,11 +82,6 @@ public class ReferenceGrammarTest extends AbstractGrammarTest {
@Test
public void test_parse() {
- assumeThat("Lambdas are not supported", query.contains("l1"), is(false));
- assumeThat("Lambdas are not supported", query.contains("l2"), is(false));
- assumeThat("Lambdas are not supported", query.contains("pred1"), is(false));
- assumeThat("Lambdas are not supported", query.contains("c1"), is(false));
- assumeThat("Lambdas are not supported", query.contains("c2"), is(false));
assumeThat("Lambdas are not supported", query.contains("Lambda.function("), is(false));
// start of a closure
assumeThat("Lambdas are not supported", query.contains("{"), is(false));
diff --git a/gremlin-python/build/generate.groovy b/gremlin-python/build/generate.groovy
index bac3d1b..701d47b 100644
--- a/gremlin-python/build/generate.groovy
+++ b/gremlin-python/build/generate.groovy
@@ -42,7 +42,7 @@ gremlinGroovyScriptEngine = new GremlinGroovyScriptEngine(new GroovyCustomizer()
}
})
translator = PythonTranslator.of('g')
-g = traversal().withGraph(EmptyGraph.instance())
+g = traversal().withEmbedded(EmptyGraph.instance())
bindings = new SimpleBindings()
bindings.put('g', g)
diff --git a/gremlin-test/features/map/Map.feature b/gremlin-test/features/map/Map.feature
index d9acfed..58f5d37 100644
--- a/gremlin-test/features/map/Map.feature
+++ b/gremlin-test/features/map/Map.feature
@@ -61,6 +61,7 @@ Feature: Step - map()
| d[5].i |
| d[4].i |
+ @RemoteOnly
Scenario: g_VX1X_out_mapXlambdaXnameXX_mapXlambdaXlengthXX
Given the modern graph
And using the parameter vid1 defined as "v[marko].id"
diff --git a/gremlin-test/features/map/Vertex.feature b/gremlin-test/features/map/Vertex.feature
index 62ac798..d1715d1 100644
--- a/gremlin-test/features/map/Vertex.feature
+++ b/gremlin-test/features/map/Vertex.feature
@@ -135,7 +135,7 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
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
@@ -147,7 +147,7 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
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
@@ -159,7 +159,7 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
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
@@ -172,7 +172,7 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
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
@@ -185,7 +185,7 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
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
@@ -198,7 +198,7 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
Given the modern graph
And using the parameter vid1 defined as "v[marko].id"
And the traversal of
- """
+ """
g.V(vid1).outE()
"""
When iterated to list
@@ -212,7 +212,7 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
Given the modern graph
And using the parameter vid2 defined as "v[vadas].id"
And the traversal of
- """
+ """
g.V(vid2).inE()
"""
When iterated to list
@@ -224,7 +224,7 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
Given the modern graph
And using the parameter vid4 defined as "v[josh].id"
And the traversal of
- """
+ """
g.V(vid4).bothE("created")
"""
When iterated to list
@@ -237,7 +237,7 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
Given the modern graph
And using the parameter vid4 defined as "v[josh].id"
And the traversal of
- """
+ """
g.V(vid4).bothE()
"""
When iterated to list
diff --git a/gremlin-test/pom.xml b/gremlin-test/pom.xml
index 343159c..0ae28f7 100644
--- a/gremlin-test/pom.xml
+++ b/gremlin-test/pom.xml
@@ -48,6 +48,27 @@ limitations under the License.
<artifactId>hamcrest</artifactId>
</dependency>
<dependency>
+ <groupId>io.cucumber</groupId>
+ <artifactId>cucumber-java</artifactId>
+ <version>6.11.0</version>
+ </dependency>
+ <dependency>
+ <groupId>io.cucumber</groupId>
+ <artifactId>cucumber-junit</artifactId>
+ <version>6.11.0</version>
+ </dependency>
+ <dependency>
+ <groupId>io.cucumber</groupId>
+ <artifactId>cucumber-guice</artifactId>
+ <version>6.11.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>4.2.3</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<optional>true</optional>
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/FeatureReader.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/FeatureReader.java
deleted file mode 100644
index 763cb0e..0000000
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/FeatureReader.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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.
- */
-package org.apache.tinkerpop.gremlin.features;
-
-import org.apache.commons.text.StringEscapeUtils;
-
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Reads the feature files and extracts Gremlin to a {@code Map} structure of the test name as the key with a
- * {@code List} of Gremlin strings for the value.
- */
-public class FeatureReader {
-
- public static Map<String, List<String>> parse(final String projectRoot) throws IOException {
- final Map<String, List<String>> gremlins = new LinkedHashMap<>();
- Files.find(Paths.get(projectRoot, "gremlin-test", "features"),
- Integer.MAX_VALUE,
- (filePath, fileAttr) -> fileAttr.isRegularFile() && filePath.toString().endsWith(".feature")).
- sorted().
- forEach(f -> {
- String currentGremlin = "";
- boolean openTriples = false;
- boolean skipIgnored = false;
- String scenarioName = "";
-
- try {
- final List<String> lines = Files.readAllLines(f, StandardCharsets.UTF_8);
- for (String line : lines) {
- String cleanLine = line.trim();
- if (cleanLine.startsWith("Scenario:")) {
- scenarioName = cleanLine.split(":")[1].trim();
- skipIgnored = false;
- } else if (cleanLine.startsWith("Then nothing should happen because")) {
- skipIgnored = true;
- } else if (cleanLine.startsWith("And the graph should return")) {
- gremlins.computeIfAbsent(scenarioName, k -> new ArrayList<>()).add(StringEscapeUtils.unescapeJava(cleanLine.substring(cleanLine.indexOf("\"") + 1, cleanLine.lastIndexOf("\""))));
- } else if (cleanLine.startsWith("\"\"\"")) {
- openTriples = !openTriples;
- if (!skipIgnored && !openTriples) {
- gremlins.computeIfAbsent(scenarioName, k -> new ArrayList<>()).add(currentGremlin);
- currentGremlin = "";
- }
- } else if (openTriples && !skipIgnored) {
- currentGremlin += cleanLine;
- }
- }
- } catch (IOException ioe) {
- throw new RuntimeException(ioe);
- }
- });
-
- return gremlins;
- }
-}
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
new file mode 100644
index 0000000..e1023ab
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
@@ -0,0 +1,433 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.features;
+
+import com.google.inject.Inject;
+import io.cucumber.datatable.DataTable;
+import io.cucumber.guice.ScenarioScoped;
+import io.cucumber.java.After;
+import io.cucumber.java.Before;
+import io.cucumber.java.Scenario;
+import io.cucumber.java.en.Given;
+import io.cucumber.java.en.Then;
+import io.cucumber.java.en.When;
+import org.antlr.v4.runtime.CharStreams;
+import org.antlr.v4.runtime.CommonTokenStream;
+import org.apache.tinkerpop.gremlin.language.grammar.GremlinAntlrToJava;
+import org.apache.tinkerpop.gremlin.language.grammar.GremlinLexer;
+import org.apache.tinkerpop.gremlin.language.grammar.GremlinParser;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+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.structure.Direction;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.T;
+import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
+import org.apache.tinkerpop.shaded.jackson.databind.JsonNode;
+import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
+import org.javatuples.Pair;
+import org.javatuples.Triplet;
+import org.junit.AssumptionViolatedException;
+
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.inV;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.collection.IsIn.in;
+import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
+import static org.hamcrest.collection.IsIterableContainingInOrder.contains;
+import static org.hamcrest.core.Every.everyItem;
+import static org.hamcrest.core.IsInstanceOf.instanceOf;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.function.Function;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+@ScenarioScoped
+public final class StepDefinition {
+
+ private static final ObjectMapper mapper = new ObjectMapper();
+
+ private final World world;
+ private GraphTraversalSource g;
+ private final Map<String, String> stringParameters = new HashMap<>();
+ private Traversal traversal;
+ private Object result;
+ private static Pattern edgeTriplet = Pattern.compile("(.+)-(.+)->(.+)");
+ private List<Pair<Pattern, Function<String,String>>> stringMatcherConverters = new ArrayList<Pair<Pattern, Function<String,String>>>() {{
+ // expects json so that should port to the Gremlin script form - replace curly json braces with square ones
+ // for Gremlin sake.
+ add(Pair.with(Pattern.compile("m\\[(.*)\\]"), s -> s.replace('{','[').replace('}', ']')));
+
+ add(Pair.with(Pattern.compile("l\\[\\]"), s -> "[]"));
+ add(Pair.with(Pattern.compile("l\\[(.*)\\]"), s -> {
+ final String[] items = s.split(",");
+ final String listItems = Stream.of(items).map(String::trim).map(x -> convertToString(x)).collect(Collectors.joining(","));
+ return String.format("[%s]", listItems);
+ }));
+ add(Pair.with(Pattern.compile("d\\[(.*)\\]\\.i"), s -> s));
+ add(Pair.with(Pattern.compile("d\\[(.*)\\]\\.l"), s -> s + "l"));
+ add(Pair.with(Pattern.compile("d\\[(.*)\\]\\.f"), s -> s + "f"));
+ add(Pair.with(Pattern.compile("d\\[(.*)\\]\\.d"), s -> s + "d"));
+ add(Pair.with(Pattern.compile("d\\[(.*)\\]\\.m"), s -> String.format("new BigDecimal(%s)", s)));
+
+ add(Pair.with(Pattern.compile("v\\[(.+)\\]\\.id"), s -> g.V().has("name", s).id().next().toString()));
+ add(Pair.with(Pattern.compile("v\\[(.+)\\]\\.sid"), s -> g.V().has("name", s).id().next().toString()));
+ add(Pair.with(Pattern.compile("e\\[(.+)\\]\\.id"), s -> getEdgeIdString(g, s)));
+ add(Pair.with(Pattern.compile("e\\[(.+)\\]\\.sid"), s -> getEdgeIdString(g, s)));
+
+ add(Pair.with(Pattern.compile("t\\[(.*)\\]"), s -> String.format("T.%s", s)));
+ add(Pair.with(Pattern.compile("D\\[(.*)\\]"), s -> String.format("Direction.%s", s)));
+
+ // the following force ignore conditions as they cannot be parsed by the grammar at this time. the grammar will
+ // need to be modified to handle them or perhaps these tests stay relegated to the JVM in some way for certain
+ // cases like the lambda item which likely won't make it to the grammar as it's raw groovy.
+ add(Pair.with(Pattern.compile("c\\[(.*)\\]"), s -> {
+ throw new AssumptionViolatedException("This test uses a lambda as a parameter which is not supported by gremlin-language");
+ }));
+ add(Pair.with(Pattern.compile("v\\[(.+)\\]"), s -> {
+ throw new AssumptionViolatedException("This test uses a Vertex as a parameter which is not supported by gremlin-language");
+ }));
+ add(Pair.with(Pattern.compile("e\\[(.+)\\]"), s -> {
+ throw new AssumptionViolatedException("This test uses a Edge as a parameter which is not supported by gremlin-language");
+ }));
+ add(Pair.with(Pattern.compile("p\\[(.*)\\]"), s -> {
+ throw new AssumptionViolatedException("This test uses a Path as a parameter which is not supported by gremlin-language");
+ }));
+ add(Pair.with(Pattern.compile("s\\[\\]"), s -> {
+ throw new AssumptionViolatedException("This test uses a empty Set as a parameter which is not supported by gremlin-language");
+ }));
+ add(Pair.with(Pattern.compile("s\\[(.*)\\]"), s -> {
+ throw new AssumptionViolatedException("This test uses a Set as a parameter which is not supported by gremlin-language");
+ }));
+ }};
+
+ private List<Pair<Pattern, Function<String,Object>>> objectMatcherConverters = new ArrayList<Pair<Pattern, Function<String,Object>>>() {{
+ // expects json so that should port to the Gremlin script form - replace curly json braces with square ones
+ // for Gremlin sake.
+ add(Pair.with(Pattern.compile("m\\[(.*)\\]"), s -> {
+ try {
+ // read tree from JSON - can't parse right to Map as each m[] level needs to be managed individually
+ return convertToObject(mapper.readTree(s));
+ } catch (Exception ex) {
+ throw new IllegalStateException(String.format("Can't parse JSON to map for %s", s), ex);
+ }
+ }));
+
+ add(Pair.with(Pattern.compile("l\\[\\]"), s -> Collections.emptyList()));
+ add(Pair.with(Pattern.compile("l\\[(.*)\\]"), s -> {
+ final String[] items = s.split(",");
+ return Stream.of(items).map(String::trim).map(x -> convertToObject(x)).collect(Collectors.toList());
+ }));
+
+ add(Pair.with(Pattern.compile("p\\[(.*)\\]"), s -> {
+ throw new AssumptionViolatedException("This test uses a Path as a parameter which is not supported by gremlin-language");
+ }));
+
+ add(Pair.with(Pattern.compile("d\\[(.*)\\]\\.i"), Integer::parseInt));
+ add(Pair.with(Pattern.compile("d\\[(.*)\\]\\.l"), Long::parseLong));
+ add(Pair.with(Pattern.compile("d\\[(.*)\\]\\.f"), Float::parseFloat));
+ add(Pair.with(Pattern.compile("d\\[(.*)\\]\\.d"), Double::parseDouble));
+ add(Pair.with(Pattern.compile("d\\[(.*)\\]\\.m"), BigDecimal::new));
+
+ add(Pair.with(Pattern.compile("v\\[(.+)\\]\\.id"), s -> g.V().has("name", s).id().next()));
+ add(Pair.with(Pattern.compile("v\\[(.+)\\]\\.sid"), s -> g.V().has("name", s).id().next().toString()));
+ add(Pair.with(Pattern.compile("v\\[(.+)\\]"), s -> g.V().has("name", s).next()));
+ add(Pair.with(Pattern.compile("e\\[(.+)\\]\\.id"), s -> getEdgeId(g, s)));
+ add(Pair.with(Pattern.compile("e\\[(.+)\\]\\.sid"), s -> getEdgeIdString(g, s)));
+ add(Pair.with(Pattern.compile("e\\[(.+)\\]"), s -> getEdge(g, s)));
+
+ add(Pair.with(Pattern.compile("t\\[(.*)\\]"), T::valueOf));
+ add(Pair.with(Pattern.compile("D\\[(.*)\\]"), Direction::valueOf));
+
+ add(Pair.with(Pattern.compile("c\\[(.*)\\]"), s -> {
+ throw new AssumptionViolatedException("This test uses a lambda as a parameter which is not supported by gremlin-language");
+ }));
+ add(Pair.with(Pattern.compile("s\\[\\]"), s -> {
+ throw new AssumptionViolatedException("This test uses a empty Set as a parameter which is not supported by gremlin-language");
+ }));
+ add(Pair.with(Pattern.compile("s\\[(.*)\\]"), s -> {
+ throw new AssumptionViolatedException("This test uses a Set as a parameter which is not supported by gremlin-language");
+ }));
+
+ add(Pair.with(Pattern.compile("(null)"), s -> null));
+ }};
+
+ @Inject
+ public StepDefinition(final World world) {
+ this.world = Objects.requireNonNull(world, "world must not be null");
+ }
+
+ @Before
+ public void beforeEachScenario(final Scenario scenario) throws Exception {
+ world.beforeEachScenario(scenario);
+ stringParameters.clear();
+ if (traversal != null) {
+ traversal.close();
+ traversal = null;
+ }
+
+ if (result != null) result = null;
+ }
+
+ @After
+ public void afterEachScenario() throws Exception {
+ world.afterEachScenario();
+ }
+
+ @Given("the {word} graph")
+ public void givenTheXGraph(final String graphName) {
+ if (graphName.equals("empty"))
+ this.g = world.getGraphTraversalSource(null);
+ else
+ this.g = world.getGraphTraversalSource(GraphData.valueOf(graphName.toUpperCase()));
+ }
+
+ @Given("the graph initializer of")
+ public void theGraphInitializerOf(final String gremlin) {
+ parseGremlin(gremlin).iterate();
+ }
+
+ @Given("using the parameter {word} defined as {string}")
+ public void usingTheParameterXDefinedAsX(final String key, final String value) {
+ stringParameters.put(key, convertToString(value));
+ }
+
+ @Given("using the parameter {word} of P.{word}\\({string})")
+ public void usingTheParameterXOfPX(final String key, final String pval, final String string) {
+ stringParameters.put(key, String.format("P.%s(%s)", pval, convertToString(string)));
+ }
+
+ @Given("the traversal of")
+ public void theTraversalOf(final String docString) {
+ traversal = parseGremlin(applyParameters(docString));
+ }
+
+ @When("iterated to list")
+ public void iteratedToList() {
+ result = traversal.toList();
+ }
+
+ @When("iterated next")
+ public void iteratedNext() {
+ result = traversal.next();
+ }
+
+ @Then("the result should be unordered")
+ public void theResultShouldBeUnordered(final DataTable dataTable) {
+ final List<Object> actual = translateResultsToActual();
+
+ // account for header in dataTable size
+ assertEquals(dataTable.height() - 1, actual.size());
+
+ // skip the header in the dataTable
+ final Object[] expected = dataTable.asList().stream().skip(1).map(this::convertToObject).toArray();
+ assertThat(actual, containsInAnyOrder(expected));
+ }
+
+ @Then("the result should be ordered")
+ public void theResultShouldBeOrdered(final DataTable dataTable) {
+ final List<Object> actual = translateResultsToActual();
+
+ // account for header in dataTable size
+ assertEquals(dataTable.height() - 1, actual.size());
+
+ // skip the header in the dataTable
+ final Object[] expected = dataTable.asList().stream().skip(1).map(this::convertToObject).toArray();
+ assertThat(actual, contains(expected));
+ }
+
+ @Then("the result should be of")
+ public void theResultShouldBeOf(final DataTable dataTable) {
+ final List<Object> actual = translateResultsToActual();
+
+ // skip the header in the dataTable
+ final Object[] expected = dataTable.asList().stream().skip(1).map(this::convertToObject).toArray();
+ assertThat(actual, everyItem(in(expected)));
+ }
+
+ @Then("the result should have a count of {int}")
+ public void theResultShouldHaveACountOf(final Integer val) {
+ if (result instanceof Iterable)
+ assertEquals(val.intValue(), IteratorUtils.count((Iterable) result));
+ else if (result instanceof Map)
+ assertEquals(val.intValue(), ((Map) result).size());
+ else
+ fail(String.format("Missing an assert for this type", result.getClass()));
+ }
+
+ @Then("the graph should return {int} for count of {string}")
+ public void theGraphShouldReturnForCountOf(final Integer count, final String gremlin) {
+ assertEquals(count.longValue(), ((GraphTraversal) parseGremlin(applyParameters(gremlin))).count().next());
+ }
+
+ @Then("the result should be empty")
+ public void theResultShouldBeEmpty() {
+ assertThat(result, instanceOf(Collection.class));
+ assertEquals(0, IteratorUtils.count((Collection) result));
+ }
+
+ //////////////////////////////////////////////
+
+ @Given("an unsupported test")
+ public void anUnsupportedTest() {
+ // placeholder text - no operation needed because it should be followed by nothingShouldHappenBecause()
+ }
+
+ @Then("nothing should happen because")
+ public void nothingShouldHappenBecause(final String message) {
+ throw new AssumptionViolatedException(String.format("This test is not supported by Gherkin because: %s", message));
+ }
+
+ //////////////////////////////////////////////
+
+ private Traversal parseGremlin(final String script) {
+ if (script.contains(".withComputer("))
+ throw new AssumptionViolatedException("withComputer() syntax is not supported by gremlin-language at this time");
+
+ // TODO: fix io() data pathing stuff to bind it better to the graph
+ if (script.startsWith("g.io(\"")) {
+ throw new AssumptionViolatedException("io() syntax");
+ }
+
+ final GremlinLexer lexer = new GremlinLexer(CharStreams.fromString(script));
+ final GremlinParser parser = new GremlinParser(new CommonTokenStream(lexer));
+ final GremlinParser.QueryContext ctx = parser.query();
+ return (Traversal) new GremlinAntlrToJava(g.getGraph()).visitQuery(ctx);
+ }
+
+ private List<Object> translateResultsToActual() {
+ final List<Object> r = result instanceof List ? (List<Object>) result : IteratorUtils.asList(result);
+
+ // gotta convert Map.Entry to individual Map coz that how we assert those for GLVs - dah
+ final List<Object> actual = r.stream().map(o -> {
+ if (o instanceof Map.Entry) {
+ return new HashMap() {{
+ put(((Entry<?, ?>) o).getKey(), ((Entry<?, ?>) o).getValue());
+ }};
+ } else {
+ return o;
+ }
+ }).collect(Collectors.toList());
+ return actual;
+ }
+
+ private String convertToString(final String pvalue) {
+ return convertToString(null, pvalue);
+ }
+
+ private String convertToString(final String pkey, final String pvalue) {
+ for (Pair<Pattern,Function<String,String>> matcherConverter : stringMatcherConverters) {
+ final Pattern pattern = matcherConverter.getValue0();
+ final Matcher matcher = pattern.matcher(pvalue);
+ if (matcher.find()) {
+ final Function<String,String> converter = matcherConverter.getValue1();
+
+ // when there are no groups there is a direct match
+ return converter.apply(matcher.groupCount() == 0 ? "" : matcher.group(1));
+ }
+ }
+
+ // this should be a raw string if it didn't match anything - suppose it could be a syntax error in the
+ // test too, but i guess the test would fail so perhaps ok to just assume it's raw string value that
+ // didn't need a transform by default
+ return String.format("\"%s\"", pvalue);
+ }
+
+ private Object convertToObject(final Object pvalue) {
+ final Object v;
+ // we may get some json stuff if it's a m[]
+ if (pvalue instanceof JsonNode) {
+ final JsonNode n = (JsonNode) pvalue;
+ if (n.isArray()) {
+ v = IteratorUtils.stream(n.elements()).map(this::convertToObject).collect(Collectors.toList());
+ } else if (n.isObject()) {
+ final Map<Object,Object> m = new HashMap<>(n.size());
+ n.fields().forEachRemaining(e -> m.put(convertToObject(e.getKey()), convertToObject(e.getValue())));
+ v = m;
+ } else if (n.isNumber()) {
+ v = n.numberValue();
+ } else if (n.isBoolean()) {
+ v = n.booleanValue();
+ } else {
+ v = n.textValue();
+ }
+ } else {
+ v = pvalue;
+ }
+
+ // if the object is already of a type then no need to push it through the matchers.
+ if (!(v instanceof String)) return v;
+
+ for (Pair<Pattern,Function<String,Object>> matcherConverter : objectMatcherConverters) {
+ final Pattern pattern = matcherConverter.getValue0();
+ final Matcher matcher = pattern.matcher((String) v);
+ if (matcher.find()) {
+ final Function<String,Object> converter = matcherConverter.getValue1();
+ return converter.apply(matcher.group(1));
+ }
+ }
+
+ // this should be a raw string if it didn't match anything - suppose it could be a syntax error in the
+ // test too, but i guess the test would fail so perhaps ok to just assume it's raw string value that
+ // didn't need a transform by default
+ return String.format("%s", v);
+ }
+
+ private static Triplet<String,String,String> getEdgeTriplet(final String e) {
+ final Matcher m = edgeTriplet.matcher(e);
+ if (m.matches()) {
+ return Triplet.with(m.group(1), m.group(2), m.group(3));
+ }
+
+ throw new IllegalStateException(String.format("Invalid edge identifier: %s", e));
+ }
+
+ private static Edge getEdge(final GraphTraversalSource g, final String e) {
+ final Triplet<String,String,String> t = getEdgeTriplet(e);
+ return g.V().has("name", t.getValue0()).outE(t.getValue1()).where(inV().has("name", t.getValue2())).next();
+ }
+
+ private static Object getEdgeId(final GraphTraversalSource g, final String e) {
+ return getEdge(g, e).id();
+ }
+
+ private static String getEdgeIdString(final GraphTraversalSource g, final String e) {
+ return getEdgeId(g, e).toString();
+ }
+
+ private String applyParameters(final String docString) {
+ String replaced = docString;
+ for (Map.Entry<String, String> kv : stringParameters.entrySet()) {
+ replaced = replaced.replace(kv.getKey(), kv.getValue());
+ }
+ return replaced;
+ }
+}
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/World.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/World.java
new file mode 100644
index 0000000..99fac71
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/World.java
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.features;
+
+import io.cucumber.java.Scenario;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
+
+/**
+ * This interface provides the context the test suite needs in order to execute the Gherkin tests. It is implemented
+ * by graph providers who wish to test their graph systems against the TinkerPop test suite. It is paired with a
+ * test that uses the Cucumber test runner (i.e. {@code @RunWith(Cucumber.class)}) and requires a dependency injection
+ * package (e.g. {@code guice}) to push an instance into the Cucumber execution.
+ */
+public interface World {
+
+ /**
+ * Gets a {@link GraphTraversalSource} that is backed by the specified {@link GraphData}. For {@code null}, the
+ * returned source should be an empty graph with no data in it. Tests do not mutate the standard graphs. Only tests
+ * that use an empty graph will change its state.
+ */
+ public GraphTraversalSource getGraphTraversalSource(final GraphData graphData);
+
+ /**
+ * Called before each individual test is executed which provides an opportunity to do some setup. For example,
+ * if there is a specific test that can't be supported it can be ignored by checking for the name with
+ * {@code scenario.getName()} and then throwing an {@code AssumptionViolationException}.
+ * @param scenario
+ */
+ public default void beforeEachScenario(final Scenario scenario) {
+ // do nothing
+ }
+
+ /**
+ * Called after each individual test is executed allowing for cleanup of any open resources.
+ */
+ public default void afterEachScenario() {
+ // do nothing
+ }
+}
diff --git a/pom.xml b/pom.xml
index efe897d..8460bf9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -405,6 +405,7 @@ limitations under the License.
<exclude>**/goal.txt</exclude>
<exclude>**/src/main/resources/META-INF/services/**</exclude>
<exclude>**/src/test/resources/META-INF/services/**</exclude>
+ <exclude>**/src/test/resources/cucumber.properties</exclude>
<exclude>**/src/test/resources/incorrect-traversals.txt</exclude>
<exclude>**/src/test/resources/org/apache/tinkerpop/gremlin/console/groovy/plugin/script-customizer-*.groovy</exclude>
<exclude>**/src/test/resources/org/apache/tinkerpop/gremlin/jsr223/script-customizer-*.groovy</exclude>
diff --git a/tinkergraph-gremlin/pom.xml b/tinkergraph-gremlin/pom.xml
index 3f31389..ea943b3 100644
--- a/tinkergraph-gremlin/pom.xml
+++ b/tinkergraph-gremlin/pom.xml
@@ -36,6 +36,12 @@ limitations under the License.
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>4.2.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
new file mode 100644
index 0000000..51896ea
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.tinkergraph;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Stage;
+import io.cucumber.guice.CucumberModules;
+import io.cucumber.guice.GuiceFactory;
+import io.cucumber.guice.InjectorSource;
+import io.cucumber.java.Scenario;
+import io.cucumber.junit.Cucumber;
+import io.cucumber.junit.CucumberOptions;
+import org.apache.tinkerpop.gremlin.features.World;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.AssumptionViolatedException;
+import org.junit.runner.RunWith;
+
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
+
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ tags = "not @RemoteOnly",
+ glue = { "org.apache.tinkerpop.gremlin.features" },
+ objectFactory = GuiceFactory.class,
+ features = { "../gremlin-test/features" },
+ plugin = {"pretty", "junit:target/cucumber.xml"})
+public class TinkerGraphFeatureTest {
+
+ public static final class ServiceModule extends AbstractModule {
+ @Override
+ protected void configure() {
+ bind(World.class).to(TinkerGraphWorld.class);
+ }
+ }
+
+ public static class TinkerGraphWorld implements World {
+ private static final TinkerGraph modern = TinkerFactory.createModern();
+ private static final TinkerGraph classic = TinkerFactory.createClassic();
+ private static final TinkerGraph crew = TinkerFactory.createTheCrew();
+ private static final TinkerGraph sink = TinkerFactory.createKitchenSink();
+ private static final TinkerGraph grateful = TinkerFactory.createGratefulDead();
+
+ @Override
+ public GraphTraversalSource getGraphTraversalSource(final GraphData graphData) {
+ if (null == graphData)
+ return TinkerGraph.open().traversal();
+ else if (graphData == GraphData.CLASSIC)
+ return classic.traversal();
+ else if (graphData == GraphData.CREW)
+ return crew.traversal();
+ else if (graphData == GraphData.MODERN)
+ return modern.traversal();
+ else if (graphData == GraphData.SINK)
+ return sink.traversal();
+ else if (graphData == GraphData.GRATEFUL)
+ return grateful.traversal();
+ else
+ throw new UnsupportedOperationException("GraphData not supported: " + graphData.name());
+ }
+ }
+
+ public static final class WorldInjectorSource implements InjectorSource {
+ @Override
+ public Injector getInjector() {
+ return Guice.createInjector(Stage.PRODUCTION, CucumberModules.createScenarioModule(), new ServiceModule());
+ }
+ }
+
+}
diff --git a/tinkergraph-gremlin/src/test/resources/cucumber.properties b/tinkergraph-gremlin/src/test/resources/cucumber.properties
new file mode 100644
index 0000000..159b8c8
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/resources/cucumber.properties
@@ -0,0 +1 @@
+guice.injector-source=org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphFeatureTest$WorldInjectorSource
\ No newline at end of file
[tinkerpop] 07/18: TINKERPOP-2601 Set up gherkin for HadoopGraph
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit c12fb997c43adacb6cb2eb7a5d8df36abf5a6129
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Aug 18 10:50:39 2021 -0400
TINKERPOP-2601 Set up gherkin for HadoopGraph
---
.../gremlin/AbstractFileGraphProvider.java | 70 +--------
.../TestFiles.java} | 29 +---
hadoop-gremlin/pom.xml | 12 ++
.../gremlin/hadoop/structure/HadoopGraph.java | 5 -
.../gremlin/hadoop/HadoopGraphFeatureTest.java | 168 +++++++++++++++++++++
.../structure/io/RecordReaderWriterTest.java | 3 +-
.../io/script/ScriptRecordReaderWriterTest.java | 5 +-
.../src/test/resources/cucumber.properties | 1 +
.../spark/process/computer/LocalPropertyTest.java | 3 +-
.../optimization/SparkInterceptorStrategyTest.java | 5 +-
.../SparkSingleIterationStrategyTest.java | 3 +-
.../gremlin/spark/structure/SparkTest.java | 3 +-
.../gremlin/spark/structure/io/OutputRDDTest.java | 3 +-
.../io/PersistedInputOutputRDDIntegrateTest.java | 11 +-
14 files changed, 212 insertions(+), 109 deletions(-)
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractFileGraphProvider.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractFileGraphProvider.java
index cedbf38..499822f 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractFileGraphProvider.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractFileGraphProvider.java
@@ -19,16 +19,9 @@
package org.apache.tinkerpop.gremlin;
import org.apache.commons.configuration2.Configuration;
+import org.apache.tinkerpop.gremlin.features.TestFiles;
import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.structure.io.Storage;
-import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONResourceAccess;
-import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoResourceAccess;
-import org.apache.tinkerpop.gremlin.structure.io.script.ScriptResourceAccess;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
import java.util.Random;
/**
@@ -43,51 +36,6 @@ public abstract class AbstractFileGraphProvider extends AbstractGraphProvider {
protected boolean graphSONInput = false;
- public static Map<String, String> PATHS = new HashMap<>();
- static {
- try {
- final List<String> kryoResources = Arrays.asList(
- "tinkerpop-modern-v3d0.kryo",
- "grateful-dead-v3d0.kryo",
- "tinkerpop-classic-v3d0.kryo",
- "tinkerpop-crew-v3d0.kryo",
- "tinkerpop-sink-v3d0.kryo");
- for (final String fileName : kryoResources) {
- PATHS.put(fileName,
- Storage.toPath(TestHelper.generateTempFileFromResource(GryoResourceAccess.class, fileName, "")));
- }
-
- final List<String> graphsonResources = Arrays.asList(
- "tinkerpop-modern-typed-v2d0.json",
- "tinkerpop-modern-v3d0.json",
- "grateful-dead-typed-v2d0.json",
- "grateful-dead-v3d0.json",
- "tinkerpop-classic-typed-v2d0.json",
- "tinkerpop-classic-v3d0.json",
- "tinkerpop-crew-typed-v2d0.json",
- "tinkerpop-crew-v3d0.json",
- "tinkerpop-sink-v3d0.json");
- for (final String fileName : graphsonResources) {
- PATHS.put(fileName,
- Storage.toPath(TestHelper.generateTempFileFromResource(GraphSONResourceAccess.class, fileName, "")));
- }
-
- final List<String> scriptResources = Arrays.asList(
- "tinkerpop-classic.txt",
- "script-input.groovy",
- "script-output.groovy",
- "grateful-dead.txt",
- "script-input-grateful-dead.groovy",
- "script-output-grateful-dead.groovy");
- for (final String fileName : scriptResources) {
- PATHS.put(fileName,
- Storage.toPath(TestHelper.generateTempFileFromResource(ScriptResourceAccess.class, fileName, "")));
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
@Override
public void clear(final Graph graph, final Configuration configuration) throws Exception {
if (graph != null)
@@ -95,20 +43,6 @@ public abstract class AbstractFileGraphProvider extends AbstractGraphProvider {
}
protected String getInputLocation(final Graph g, final LoadGraphWith.GraphData graphData) {
- final String type = this.graphSONInput ? "-v3d0.json" : "-v3d0.kryo";
-
- if (graphData.equals(LoadGraphWith.GraphData.GRATEFUL))
- return PATHS.get("grateful-dead" + type);
- else if (graphData.equals(LoadGraphWith.GraphData.MODERN))
- return PATHS.get("tinkerpop-modern" + type);
- else if (graphData.equals(LoadGraphWith.GraphData.CLASSIC))
- return PATHS.get("tinkerpop-classic" + type);
- else if (graphData.equals(LoadGraphWith.GraphData.CREW))
- return PATHS.get("tinkerpop-crew" + type);
- else if (graphData.equals(LoadGraphWith.GraphData.SINK))
- return PATHS.get("tinkerpop-sink" + type);
- else
- throw new RuntimeException("Could not load graph with " + graphData);
+ return TestFiles.getInputLocation(graphData, graphSONInput);
}
-
}
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractFileGraphProvider.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/TestFiles.java
similarity index 81%
copy from gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractFileGraphProvider.java
copy to gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/TestFiles.java
index cedbf38..c923452 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractFileGraphProvider.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/TestFiles.java
@@ -16,10 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tinkerpop.gremlin;
+package org.apache.tinkerpop.gremlin.features;
-import org.apache.commons.configuration2.Configuration;
-import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.TestHelper;
import org.apache.tinkerpop.gremlin.structure.io.Storage;
import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONResourceAccess;
import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoResourceAccess;
@@ -31,19 +31,10 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
-/**
- * A base {@link GraphProvider} that is typically for use with Hadoop-based graphs as it enables access to the various
- * resource data files that are used in the tests.
- *
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public abstract class AbstractFileGraphProvider extends AbstractGraphProvider {
-
+public class TestFiles {
protected static final Random RANDOM = TestHelper.RANDOM;
- protected boolean graphSONInput = false;
-
- public static Map<String, String> PATHS = new HashMap<>();
+ public static final Map<String, String> PATHS = new HashMap<>();
static {
try {
final List<String> kryoResources = Arrays.asList(
@@ -88,14 +79,8 @@ public abstract class AbstractFileGraphProvider extends AbstractGraphProvider {
}
}
- @Override
- public void clear(final Graph graph, final Configuration configuration) throws Exception {
- if (graph != null)
- graph.close();
- }
-
- protected String getInputLocation(final Graph g, final LoadGraphWith.GraphData graphData) {
- final String type = this.graphSONInput ? "-v3d0.json" : "-v3d0.kryo";
+ public static String getInputLocation(final LoadGraphWith.GraphData graphData, final boolean useGraphSON) {
+ final String type = useGraphSON ? "-v3d0.json" : "-v3d0.kryo";
if (graphData.equals(LoadGraphWith.GraphData.GRATEFUL))
return PATHS.get("grateful-dead" + type);
diff --git a/hadoop-gremlin/pom.xml b/hadoop-gremlin/pom.xml
index 19fa70e..64bb79e 100644
--- a/hadoop-gremlin/pom.xml
+++ b/hadoop-gremlin/pom.xml
@@ -148,6 +148,18 @@ limitations under the License.
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>4.2.3</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java
index 5a2578b..a36722a 100644
--- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java
+++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java
@@ -144,11 +144,6 @@ import java.util.stream.StreamSupport;
reason = "Hadoop-Gremlin is OLAP-oriented and for OLTP operations, linear-scan joins are required. This particular tests takes many minutes to execute.",
computers = {"ALL"})
@Graph.OptOut(
- test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchTest$GreedyMatchTraversals",
- method = "g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count",
- reason = "Hadoop-Gremlin is OLAP-oriented and for OLTP operations, linear-scan joins are required. This particular tests takes many minutes to execute.",
- computers = {"ALL"})
-@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.ReadTest$Traversals",
method = "g_io_readXxmlX",
reason = "Hadoop-Gremlin does not support reads/writes with GraphML.")
diff --git a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
new file mode 100644
index 0000000..e43b00b
--- /dev/null
+++ b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
@@ -0,0 +1,168 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.hadoop;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Stage;
+import io.cucumber.guice.CucumberModules;
+import io.cucumber.guice.GuiceFactory;
+import io.cucumber.guice.InjectorSource;
+import io.cucumber.java.Scenario;
+import io.cucumber.junit.Cucumber;
+import io.cucumber.junit.CucumberOptions;
+import org.apache.commons.configuration2.MapConfiguration;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.features.TestFiles;
+import org.apache.tinkerpop.gremlin.features.World;
+import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
+import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat;
+import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoOutputFormat;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.javatuples.Pair;
+import org.junit.AssumptionViolatedException;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
+
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ tags = "not @RemoteOnly and not @MultiMetaProperties",
+ glue = { "org.apache.tinkerpop.gremlin.features" },
+ objectFactory = GuiceFactory.class,
+ features = { "../gremlin-test/features" },
+ plugin = {"pretty", "junit:target/cucumber.xml"})
+public class HadoopGraphFeatureTest {
+ private static final Logger logger = LoggerFactory.getLogger(HadoopGraphFeatureTest.class);
+
+ private static final String skipReasonLength = "Hadoop-Gremlin is OLAP-oriented and for OLTP operations, linear-scan joins are required. This particular tests takes many minutes to execute.";
+
+ private static final List<Pair<String, String>> skip = new ArrayList<Pair<String,String>>() {{
+ add(Pair.with("g_V_both_both_count", skipReasonLength));
+ add(Pair.with("g_V_repeatXoutX_timesX3X_count", skipReasonLength));
+ add(Pair.with("g_V_repeatXoutX_timesX8X_count", skipReasonLength));
+ add(Pair.with("g_V_repeatXoutX_timesX5X_asXaX_outXwrittenByX_asXbX_selectXa_bX_count", skipReasonLength));
+ add(Pair.with("g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_dX_whereXc_sungBy_dX_whereXd_hasXname_GarciaXX", skipReasonLength));
+ add(Pair.with("g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_d__c_sungBy_d__d_hasXname_GarciaXX", skipReasonLength));
+ add(Pair.with("g_V_matchXa_0sungBy_b__a_0sungBy_c__b_writtenBy_d__c_writtenBy_e__d_hasXname_George_HarisonX__e_hasXname_Bob_MarleyXX", skipReasonLength));
+ add(Pair.with("g_V_matchXa_hasXname_GarciaX__a_0writtenBy_b__a_0sungBy_bX", skipReasonLength));
+ add(Pair.with("g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX", skipReasonLength));
+ add(Pair.with("g_V_outXfollowedByX_group_byXsongTypeX_byXbothE_group_byXlabelX_byXweight_sumXX", skipReasonLength));
+ add(Pair.with("g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byXcountX", skipReasonLength));
+ add(Pair.with("g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byXcountX_capXaX", skipReasonLength));
+ add(Pair.with("g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count", skipReasonLength));
+ }};
+
+ public static final class ServiceModule extends AbstractModule {
+ @Override
+ protected void configure() {
+ bind(World.class).to(HadoopGraphWorld.class);
+ }
+ }
+
+ public static class HadoopGraphWorld implements World {
+
+ private static final HadoopGraph modern = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.MODERN)));
+ private static final HadoopGraph classic = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.CLASSIC)));
+ private static final HadoopGraph crew = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.CREW)));
+ private static final HadoopGraph sink = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.SINK)));
+ private static final HadoopGraph grateful = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.GRATEFUL)));
+ private static final HadoopGraph empty = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(null)));
+
+ static {
+ readIntoGraph(modern, GraphData.MODERN);
+ readIntoGraph(classic, GraphData.CLASSIC);
+ readIntoGraph(crew, GraphData.CREW);
+ readIntoGraph(sink, GraphData.SINK);
+ readIntoGraph(grateful, GraphData.GRATEFUL);
+ }
+
+ @Override
+ public GraphTraversalSource getGraphTraversalSource(final GraphData graphData) {
+ if (null == graphData)
+ throw new AssumptionViolatedException("HadoopGraph does not support graph mutations");
+ else if (graphData == GraphData.CLASSIC)
+ return classic.traversal();
+ else if (graphData == GraphData.CREW)
+ return crew.traversal();
+ else if (graphData == GraphData.MODERN)
+ return modern.traversal();
+ else if (graphData == GraphData.SINK)
+ return sink.traversal();
+ else if (graphData == GraphData.GRATEFUL)
+ return grateful.traversal();
+ else
+ throw new UnsupportedOperationException("GraphData not supported: " + graphData.name());
+ }
+
+ @Override
+ public void beforeEachScenario(final Scenario scenario) {
+ final Optional<Pair<String,String>> skipped = skip.stream().
+ filter(s -> s.getValue0().equals(scenario.getName())).findFirst();
+ if (skipped.isPresent())
+ throw new AssumptionViolatedException(skipped.get().getValue1());
+
+ cleanEmpty();
+ }
+
+ private void cleanEmpty() {
+ final GraphTraversalSource g = empty.traversal();
+ g.V().drop().iterate();
+ }
+
+ private static void readIntoGraph(final Graph graph, final GraphData graphData) {
+ ((HadoopGraph) graph).configuration().setInputLocation(TestFiles.getInputLocation(graphData, false));
+ }
+
+ private static String getWorkingDirectory() {
+ return TestHelper.makeTestDataDirectory(HadoopGraphFeatureTest.class, "graph-provider-data");
+ }
+
+ private static Map<String, Object> getBaseConfiguration(final GraphData graphData) {
+ return new HashMap<String, Object>() {{
+ put(Graph.GRAPH, HadoopGraph.class.getName());
+ put(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
+ put(Constants.GREMLIN_HADOOP_GRAPH_WRITER, GryoOutputFormat.class.getCanonicalName());
+ put(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, getWorkingDirectory());
+ put(Constants.GREMLIN_HADOOP_JARS_IN_DISTRIBUTED_CACHE, false);
+ }};
+ }
+ }
+
+ public static final class WorldInjectorSource implements InjectorSource {
+ @Override
+ public Injector getInjector() {
+ return Guice.createInjector(Stage.PRODUCTION, CucumberModules.createScenarioModule(), new ServiceModule());
+ }
+ }
+
+}
diff --git a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/RecordReaderWriterTest.java b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/RecordReaderWriterTest.java
index ae93e37..48a6755 100644
--- a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/RecordReaderWriterTest.java
+++ b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/RecordReaderWriterTest.java
@@ -33,6 +33,7 @@ import org.apache.hadoop.mapreduce.lib.input.FileSplit;
import org.apache.hadoop.mapreduce.task.TaskAttemptContextImpl;
import org.apache.hadoop.util.ReflectionUtils;
import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.features.TestFiles;
import org.apache.tinkerpop.gremlin.hadoop.HadoopGraphProvider;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Vertex;
@@ -70,7 +71,7 @@ public abstract class RecordReaderWriterTest {
@Test
public void shouldSplitFileAndWriteProperSplits() throws Exception {
for (int numberOfSplits = 1; numberOfSplits < 10; numberOfSplits++) {
- final File testFile = new File(HadoopGraphProvider.PATHS.get(getInputFilename()));
+ final File testFile = new File(TestFiles.PATHS.get(getInputFilename()));
logger.info("Testing: {}", testFile + " (splits {}", numberOfSplits + ")");
final List<FileSplit> splits = generateFileSplits(testFile, numberOfSplits);
final Class<? extends InputFormat<NullWritable, VertexWritable>> inputFormatClass = getInputFormat();
diff --git a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReaderWriterTest.java b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReaderWriterTest.java
index bb0d783..554b20e 100644
--- a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReaderWriterTest.java
+++ b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReaderWriterTest.java
@@ -22,6 +22,7 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.InputFormat;
import org.apache.hadoop.mapreduce.OutputFormat;
+import org.apache.tinkerpop.gremlin.features.TestFiles;
import org.apache.tinkerpop.gremlin.hadoop.HadoopGraphProvider;
import org.apache.tinkerpop.gremlin.hadoop.structure.io.RecordReaderWriterTest;
import org.apache.tinkerpop.gremlin.hadoop.structure.io.VertexWritable;
@@ -36,8 +37,8 @@ public class ScriptRecordReaderWriterTest extends RecordReaderWriterTest {
@Override
protected Configuration configure(final File outputDirectory) {
final Configuration configuration = super.configure(outputDirectory);
- configuration.set(ScriptRecordReader.SCRIPT_FILE, HadoopGraphProvider.PATHS.get("script-input-grateful-dead.groovy"));
- configuration.set(ScriptRecordWriter.SCRIPT_FILE, HadoopGraphProvider.PATHS.get("script-output-grateful-dead.groovy"));
+ configuration.set(ScriptRecordReader.SCRIPT_FILE, TestFiles.PATHS.get("script-input-grateful-dead.groovy"));
+ configuration.set(ScriptRecordWriter.SCRIPT_FILE, TestFiles.PATHS.get("script-output-grateful-dead.groovy"));
return configuration;
}
diff --git a/hadoop-gremlin/src/test/resources/cucumber.properties b/hadoop-gremlin/src/test/resources/cucumber.properties
new file mode 100644
index 0000000..66a963b
--- /dev/null
+++ b/hadoop-gremlin/src/test/resources/cucumber.properties
@@ -0,0 +1 @@
+guice.injector-source=org.apache.tinkerpop.gremlin.hadoop.HadoopGraphFeatureTest$WorldInjectorSource
\ No newline at end of file
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/LocalPropertyTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/LocalPropertyTest.java
index 829c405..f26d6b0 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/LocalPropertyTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/LocalPropertyTest.java
@@ -26,6 +26,7 @@ import org.apache.spark.SparkContext;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.api.java.JavaSparkStatusTracker;
import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.features.TestFiles;
import org.apache.tinkerpop.gremlin.hadoop.Constants;
import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat;
@@ -56,7 +57,7 @@ public class LocalPropertyTest extends AbstractSparkTest {
configuration.setProperty("spark.master", "local[4]");
configuration.setProperty("spark.serializer", GryoSerializer.class.getCanonicalName());
configuration.setProperty(Graph.GRAPH, HadoopGraph.class.getName());
- configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, TestFiles.PATHS.get("tinkerpop-modern-v3d0.kryo"));
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, PersistedOutputRDD.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, rddName);
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkInterceptorStrategyTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkInterceptorStrategyTest.java
index b1d58a6..869963c 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkInterceptorStrategyTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkInterceptorStrategyTest.java
@@ -21,6 +21,7 @@ package org.apache.tinkerpop.gremlin.spark.process.computer.traversal.strategy.o
import org.apache.commons.configuration2.Configuration;
import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.features.TestFiles;
import org.apache.tinkerpop.gremlin.hadoop.Constants;
import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat;
import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.TraversalVertexProgramStep;
@@ -60,7 +61,7 @@ public class SparkInterceptorStrategyTest extends AbstractSparkTest {
@Test
public void shouldHandleSideEffectsCorrectly() throws Exception {
final Configuration configuration = getBaseConfiguration();
- configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, TestFiles.PATHS.get("tinkerpop-modern-v3d0.kryo"));
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, PersistedOutputRDD.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, TestHelper.makeTestDataDirectory(SparkSingleIterationStrategyTest.class, UUID.randomUUID().toString()));
@@ -88,7 +89,7 @@ public class SparkInterceptorStrategyTest extends AbstractSparkTest {
@Test
public void shouldSuccessfullyEvaluateInterceptedTraversals() throws Exception {
final Configuration configuration = getBaseConfiguration();
- configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, TestFiles.PATHS.get("tinkerpop-modern-v3d0.kryo"));
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, PersistedOutputRDD.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, TestHelper.makeTestDataDirectory(SparkSingleIterationStrategyTest.class, UUID.randomUUID().toString()));
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkSingleIterationStrategyTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkSingleIterationStrategyTest.java
index 6202f33..cbd8cd4 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkSingleIterationStrategyTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/traversal/strategy/optimization/SparkSingleIterationStrategyTest.java
@@ -21,6 +21,7 @@ package org.apache.tinkerpop.gremlin.spark.process.computer.traversal.strategy.o
import org.apache.commons.configuration2.Configuration;
import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.features.TestFiles;
import org.apache.tinkerpop.gremlin.hadoop.Constants;
import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat;
import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.TraversalVertexProgramStep;
@@ -76,7 +77,7 @@ public class SparkSingleIterationStrategyTest extends AbstractSparkTest {
public void shouldSuccessfullyEvaluateSingleIterationTraversals() throws Exception {
final String outputLocation = TestHelper.makeTestDataDirectory(SparkSingleIterationStrategyTest.class, UUID.randomUUID().toString());
Configuration configuration = getBaseConfiguration();
- configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, TestFiles.PATHS.get("tinkerpop-modern-v3d0.kryo"));
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, PersistedOutputRDD.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, outputLocation);
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/SparkTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/SparkTest.java
index 5aa78a4..17ef288 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/SparkTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/SparkTest.java
@@ -23,6 +23,7 @@ import org.apache.commons.configuration2.BaseConfiguration;
import org.apache.commons.configuration2.Configuration;
import org.apache.spark.rdd.RDD;
import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.features.TestFiles;
import org.apache.tinkerpop.gremlin.hadoop.Constants;
import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat;
@@ -59,7 +60,7 @@ public class SparkTest extends AbstractSparkTest {
configuration.setProperty("spark.serializer", GryoSerializer.class.getCanonicalName());
configuration.setProperty(Graph.GRAPH, HadoopGraph.class.getName());
- configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, TestFiles.PATHS.get("tinkerpop-modern-v3d0.kryo"));
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, PersistedOutputRDD.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_JARS_IN_DISTRIBUTED_CACHE, false);
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/OutputRDDTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/OutputRDDTest.java
index 7042a6c..b675615 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/OutputRDDTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/OutputRDDTest.java
@@ -21,6 +21,7 @@ package org.apache.tinkerpop.gremlin.spark.structure.io;
import org.apache.commons.configuration2.BaseConfiguration;
import org.apache.commons.configuration2.Configuration;
import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.features.TestFiles;
import org.apache.tinkerpop.gremlin.hadoop.Constants;
import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat;
@@ -46,7 +47,7 @@ public class OutputRDDTest extends AbstractSparkTest {
configuration.setProperty("spark.master", "local[4]");
configuration.setProperty("spark.serializer", GryoSerializer.class.getCanonicalName());
configuration.setProperty(Graph.GRAPH, HadoopGraph.class.getName());
- configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, TestFiles.PATHS.get("tinkerpop-modern-v3d0.kryo"));
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, ExampleOutputRDD.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, TestHelper.makeTestDataDirectory(this.getClass(), "shouldWriteToArbitraryRDD"));
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedInputOutputRDDIntegrateTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedInputOutputRDDIntegrateTest.java
index f26efbc..ded8698 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedInputOutputRDDIntegrateTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/PersistedInputOutputRDDIntegrateTest.java
@@ -22,6 +22,7 @@ package org.apache.tinkerpop.gremlin.spark.structure.io;
import org.apache.commons.configuration2.Configuration;
import org.apache.spark.storage.StorageLevel;
import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.features.TestFiles;
import org.apache.tinkerpop.gremlin.hadoop.Constants;
import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat;
import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoOutputFormat;
@@ -56,7 +57,7 @@ public class PersistedInputOutputRDDIntegrateTest extends AbstractSparkTest {
Spark.create("local[4]");
final String rddName = TestHelper.makeTestDataDirectory(PersistedInputOutputRDDIntegrateTest.class, UUID.randomUUID().toString());
final Configuration configuration = super.getBaseConfiguration();
- configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, TestFiles.PATHS.get("tinkerpop-modern-v3d0.kryo"));
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, GryoOutputFormat.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, rddName);
@@ -84,7 +85,7 @@ public class PersistedInputOutputRDDIntegrateTest extends AbstractSparkTest {
counter++;
final String rddName = TestHelper.makeTestDataDirectory(PersistedInputOutputRDDIntegrateTest.class, UUID.randomUUID().toString());
final Configuration configuration = super.getBaseConfiguration();
- configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, TestFiles.PATHS.get("tinkerpop-modern-v3d0.kryo"));
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, PersistedOutputRDD.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_SPARK_PERSIST_STORAGE_LEVEL, storageLevel);
@@ -112,7 +113,7 @@ public class PersistedInputOutputRDDIntegrateTest extends AbstractSparkTest {
Spark.create("local[4]");
final String rddName = TestHelper.makeTestDataDirectory(PersistedInputOutputRDDIntegrateTest.class, UUID.randomUUID().toString());
final Configuration configuration = super.getBaseConfiguration();
- configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, TestFiles.PATHS.get("tinkerpop-modern-v3d0.kryo"));
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, PersistedOutputRDD.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, rddName);
@@ -138,7 +139,7 @@ public class PersistedInputOutputRDDIntegrateTest extends AbstractSparkTest {
final String rddName = TestHelper.makeTestDataDirectory(PersistedInputOutputRDDIntegrateTest.class, UUID.randomUUID().toString());
final String rddName2 = TestHelper.makeTestDataDirectory(PersistedInputOutputRDDIntegrateTest.class, UUID.randomUUID().toString());
final Configuration configuration = super.getBaseConfiguration();
- configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, TestFiles.PATHS.get("tinkerpop-modern-v3d0.kryo"));
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, PersistedOutputRDD.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, rddName);
@@ -211,7 +212,7 @@ public class PersistedInputOutputRDDIntegrateTest extends AbstractSparkTest {
final String rddName2 = TestHelper.makeTestDataDirectory(PersistedInputOutputRDDIntegrateTest.class, "testComplexChain", "graphRDD2");
final Configuration configuration = super.getBaseConfiguration();
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, GryoInputFormat.class.getCanonicalName());
- configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, SparkHadoopGraphProvider.PATHS.get("tinkerpop-modern-v3d0.kryo"));
+ configuration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, TestFiles.PATHS.get("tinkerpop-modern-v3d0.kryo"));
configuration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER, PersistedOutputRDD.class.getCanonicalName());
configuration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, rddName);
configuration.setProperty(Constants.GREMLIN_SPARK_PERSIST_CONTEXT, true);
[tinkerpop] 14/18: TINKERPOP-2601 Introduced a limited process test
suite
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 6a48b6badbfad30ec68fd6e5db510c3bfe0d4fc8
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Sep 9 08:37:28 2021 -0400
TINKERPOP-2601 Introduced a limited process test suite
This new suite removes the duplication between gherkin and the jvm-only suite. Fixed Neo4j test runs which were failing due to GraphComputer inclusion.
---
docs/src/dev/provider/index.asciidoc | 9 +
.../apache/tinkerpop/gremlin/structure/Graph.java | 2 +
.../process/ProcessLimitedComputerSuite.java | 235 +++++++++++++++++++++
.../process/ProcessLimitedStandardSuite.java | 229 ++++++++++++++++++++
.../gremlin/hadoop/structure/HadoopGraph.java | 2 +
...t.java => HadoopGraphFeatureIntegrateTest.java} | 4 +-
.../HadoopGraphProcessStandardIntegrateTest.java | 4 +-
.../gremlin/neo4j/structure/Neo4jGraph.java | 1 +
.../gremlin/neo4j/Neo4jGraphFeatureTest.java | 7 +-
.../process/Neo4jGraphProcessStandardTest.java | 4 +-
...st.java => SparkGraphFeatureIntegrateTest.java} | 4 +-
.../gremlin/tinkergraph/structure/TinkerGraph.java | 2 +
.../process/TinkerGraphProcessStandardTest.java | 4 +-
13 files changed, 496 insertions(+), 11 deletions(-)
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 91e40d8..8992db1 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -891,6 +891,15 @@ means it will be important to include a `io.cucumber.core.backend.ObjectFactory`
entry that registers the custom implementation. Please see the TinkerGraph test code for further information on this
approach.
+If implementing the Gherkin tests, providers can choose to opt-in to the slimmed down version of the normal JVM process
+test suite to help alleviate test duplication between the two frameworks:
+
+[source,java]
+----
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_STANDARD)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_COMPUTER)
+----
+
=== Accessibility via GremlinPlugin
image:gremlin-plugin.png[width=100,float=left] The applications distributed with TinkerPop do not distribute with
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
index a8131c1..42af032 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
@@ -1246,6 +1246,8 @@ public interface Graph extends AutoCloseable, Host {
public static String SUITE_STRUCTURE_INTEGRATE = "org.apache.tinkerpop.gremlin.structure.StructureIntegrateSuite";
public static String SUITE_PROCESS_COMPUTER = "org.apache.tinkerpop.gremlin.process.ProcessComputerSuite";
public static String SUITE_PROCESS_STANDARD = "org.apache.tinkerpop.gremlin.process.ProcessStandardSuite";
+ public static String SUITE_PROCESS_LIMITED_COMPUTER = "org.apache.tinkerpop.gremlin.process.ProcessLimitedComputerSuite";
+ public static String SUITE_PROCESS_LIMITED_STANDARD = "org.apache.tinkerpop.gremlin.process.ProcessLimitedStandardSuite";
/**
* The test suite class to opt in to.
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedComputerSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedComputerSuite.java
new file mode 100644
index 0000000..ee77c91
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedComputerSuite.java
@@ -0,0 +1,235 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.process;
+
+import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
+import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
+import org.apache.tinkerpop.gremlin.process.computer.GraphComputerTest;
+import org.apache.tinkerpop.gremlin.process.computer.clone.CloneVertexProgramTest;
+import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgramTest;
+import org.apache.tinkerpop.gremlin.process.computer.search.path.ShortestPathVertexProgramTest;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionComputerTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.ComplexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.ChooseTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.OptionalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.UnionTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.AndTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CoinTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CyclicPathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DedupTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.OrTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.RangeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.SampleTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.SimplePathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TailTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.CoalesceTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ConnectedComponentTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ConstantTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ElementMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.FoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.LoopsTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MaxTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MeanTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MinTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PageRankTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PeerPressureTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProfileTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProgramTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ReadTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ShortestPathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.SumTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.UnfoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ValueMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.WriteTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ExplainTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SackTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectCapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.StoreTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.TreeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.TranslationStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.EarlyLimitStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.StructureStandardSuite;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * The {@code ProcessLimitedComputerSuite} is a set of tests that providers may implement in addition to the standard Gherkin
+ * feature tests. The {@link ProcessComputerSuite} contains all the tests in Gherkin and is therefore duplicative of
+ * that test set but also includes a number of tests that have not been (or cannot be) converted to Gherkin for various
+ * reasons.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class ProcessLimitedComputerSuite extends AbstractGremlinSuite {
+
+ /**
+ * This list of tests in the suite that will be executed as part of this suite.
+ */
+ private static final Class<?>[] allTests = new Class<?>[]{
+ GraphComputerTest.class,
+ MatchTest.CountMatchTraversals.class,
+ MatchTest.GreedyMatchTraversals.class,
+ ProfileTest.Traversals.class,
+ ProgramTest.Traversals.class,
+ WriteTest.Traversals.class,
+ ExplainTest.Traversals.class,
+ SideEffectTest.Traversals.class,
+ SubgraphTest.Traversals.class,
+ TreeTest.Traversals.class,
+
+ // compliance
+ ComplexTest.Traversals.class,
+ TraversalInterruptionComputerTest.class,
+
+ // algorithms
+ PageRankVertexProgramTest.class,
+ ShortestPathVertexProgramTest.class,
+ CloneVertexProgramTest.class,
+
+ // creations
+ TranslationStrategyProcessTest.class,
+
+ // decorations
+ ReadOnlyStrategyProcessTest.class,
+ SeedStrategyProcessTest.class,
+ SubgraphStrategyProcessTest.class,
+
+ // optimizations
+ IncidentToAdjacentStrategyProcessTest.class,
+ EarlyLimitStrategyProcessTest.class
+ };
+
+ /**
+ * A list of the minimum set of base tests that Gremlin flavors should implement to be compliant with Gremlin.
+ */
+ private static final Class<?>[] testsToEnforce = new Class<?>[]{
+ // branch
+ BranchTest.class,
+ ChooseTest.class,
+ OptionalTest.class,
+ LocalTest.class,
+ RepeatTest.class,
+ UnionTest.class,
+
+ // filter
+ AndTest.class,
+ CoinTest.class,
+ CyclicPathTest.class,
+ DedupTest.class,
+ FilterTest.class,
+ HasTest.class,
+ IsTest.class,
+ OrTest.class,
+ RangeTest.class,
+ SampleTest.class,
+ SimplePathTest.class,
+ TailTest.class,
+ WhereTest.class,
+
+ // map
+ CoalesceTest.class,
+ ConstantTest.class,
+ CountTest.class,
+ FlatMapTest.class,
+ ElementMapTest.class,
+ FoldTest.class,
+ MatchTest.class,
+ MathTest.class,
+ MapTest.class,
+ MaxTest.class,
+ MeanTest.class,
+ MinTest.class,
+ SumTest.class,
+ MatchTest.class,
+ OrderTest.class,
+ PageRankTest.class,
+ // PeerPressureTest.class,
+ PathTest.class,
+ ProfileTest.class,
+ ProjectTest.class,
+ ProgramTest.class,
+ PropertiesTest.class,
+ ShortestPathTest.class,
+ SelectTest.class,
+ UnfoldTest.class,
+ ValueMapTest.class,
+ VertexTest.class,
+
+ // sideEffect
+ AddEdgeTest.class,
+ AggregateTest.class,
+ GroupTest.class,
+ GroupCountTest.class,
+ InjectTest.class,
+ SackTest.class,
+ SideEffectCapTest.class,
+ SideEffectTest.class,
+ StoreTest.class,
+ SubgraphTest.class,
+ TreeTest.class
+ };
+
+ /**
+ * This constructor is used by JUnit and will run this suite with its concrete implementations of the
+ * {@code testsToEnforce}.
+ */
+ public ProcessLimitedComputerSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
+ super(klass, builder, allTests, allTests, false, TraversalEngine.Type.COMPUTER);
+ }
+
+ /**
+ * This constructor is used by Gremlin flavor implementers who supply their own implementations of the
+ * {@code testsToEnforce}.
+ */
+ public ProcessLimitedComputerSuite(final Class<?> klass, final RunnerBuilder builder, final Class<?>[] testsToExecute) throws InitializationError {
+ super(klass, builder, testsToExecute, testsToEnforce, true, TraversalEngine.Type.COMPUTER);
+ }
+}
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedStandardSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedStandardSuite.java
new file mode 100644
index 0000000..1f5d6aa
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedStandardSuite.java
@@ -0,0 +1,229 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.process;
+
+import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
+import org.apache.tinkerpop.gremlin.process.traversal.CoreTraversalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.ComplexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.ChooseTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.OptionalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.UnionTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.AndTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CoinTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CyclicPathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DedupTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.OrTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.RangeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.SampleTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.SimplePathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TailTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.CoalesceTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ConstantTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ElementMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.FoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.IndexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.LoopsTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MaxTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MeanTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MinTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProfileTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ReadTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.SumTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.UnfoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ValueMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.WriteTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ExplainTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SackTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectCapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.StoreTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.TreeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.TranslationStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.EarlyLimitStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.StructureStandardSuite;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * The {@code ProcessLimitedComputerSuite} is a set of tests that providers may implement in addition to the standard Gherkin
+ * feature tests. The {@link ProcessStandardSuite} contains all the tests in Gherkin and is therefore duplicative of
+ * that test set but also includes a number of tests that have not been (or cannot be) converted to Gherkin for various
+ * reasons.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class ProcessLimitedStandardSuite extends AbstractGremlinSuite {
+
+ /**
+ * This list of tests in the suite that will be executed as part of this suite.
+ */
+ private static final Class<?>[] allTests = new Class<?>[]{
+
+ MatchTest.CountMatchTraversals.class,
+ MatchTest.GreedyMatchTraversals.class,
+ ProfileTest.Traversals.class,
+ WriteTest.Traversals.class,
+ ExplainTest.Traversals.class,
+ SideEffectTest.Traversals.class,
+ SubgraphTest.Traversals.class,
+ TreeTest.Traversals.class,
+
+ // compliance
+ ComplexTest.Traversals.class,
+ CoreTraversalTest.class,
+ TraversalInterruptionTest.class,
+
+ // creations
+ TranslationStrategyProcessTest.class,
+
+ // decorations
+ ElementIdStrategyProcessTest.class,
+ EventStrategyProcessTest.class,
+ ReadOnlyStrategyProcessTest.class,
+ PartitionStrategyProcessTest.class,
+ SeedStrategyProcessTest.class,
+ SubgraphStrategyProcessTest.class,
+
+ // optimizations
+ IncidentToAdjacentStrategyProcessTest.class,
+ EarlyLimitStrategyProcessTest.class
+ };
+
+ /**
+ * A list of the minimum set of base tests that Gremlin flavors should implement to be compliant with Gremlin.
+ */
+ private static final Class<?>[] testsToEnforce = new Class<?>[]{
+ // branch
+ BranchTest.class,
+ ChooseTest.class,
+ OptionalTest.class,
+ LocalTest.class,
+ RepeatTest.class,
+ UnionTest.class,
+
+ // filter
+ AndTest.class,
+ CoinTest.class,
+ CyclicPathTest.class,
+ DedupTest.class,
+ DropTest.class,
+ FilterTest.class,
+ HasTest.class,
+ IsTest.class,
+ OrTest.class,
+ RangeTest.class,
+ SampleTest.class,
+ SimplePathTest.class,
+ TailTest.class,
+ WhereTest.class,
+
+ // map
+ AddEdgeTest.class,
+ AddVertexTest.class,
+ CoalesceTest.class,
+ ConstantTest.class,
+ CountTest.class,
+ ElementMapTest.class,
+ FlatMapTest.class,
+ FoldTest.class,
+ LoopsTest.class,
+ IndexTest.class,
+ MapTest.class,
+ MatchTest.class,
+ MathTest.class,
+ MaxTest.class,
+ MeanTest.class,
+ MinTest.class,
+ SumTest.class,
+ OrderTest.class,
+ PathTest.class,
+ PropertiesTest.class,
+ ProfileTest.class,
+ ProjectTest.class,
+ SelectTest.class,
+ VertexTest.class,
+ UnfoldTest.class,
+ ValueMapTest.class,
+
+ // sideEffect
+ AggregateTest.class,
+ GroupTest.class,
+ GroupCountTest.class,
+ InjectTest.class,
+ SackTest.class,
+ SideEffectCapTest.class,
+ SideEffectTest.class,
+ StoreTest.class,
+ SubgraphTest.class,
+ TreeTest.class,
+ };
+
+ /**
+ * This constructor is used by JUnit and will run this suite with its concrete implementations of the
+ * {@code testsToEnforce}.
+ */
+ public ProcessLimitedStandardSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
+ super(klass, builder, allTests, testsToEnforce, false, TraversalEngine.Type.STANDARD);
+ }
+
+ /**
+ * This constructor is used by Gremlin flavor implementers who supply their own implementations of the
+ * {@code testsToEnforce}.
+ */
+ public ProcessLimitedStandardSuite(final Class<?> klass, final RunnerBuilder builder, final Class<?>[] testsToExecute) throws InitializationError {
+ super(klass, builder, testsToExecute, testsToEnforce, true, TraversalEngine.Type.STANDARD);
+ }
+}
diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java
index a36722a..5cfacf7 100644
--- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java
+++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java
@@ -56,6 +56,8 @@ import java.util.stream.StreamSupport;
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_COMPUTER)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_STANDARD)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_COMPUTER)
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchTest$Traversals",
method = "g_V_matchXa_hasXname_GarciaX__a_0writtenBy_b__a_0sungBy_bX",
diff --git a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureIntegrateTest.java
similarity index 98%
rename from hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
rename to hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureIntegrateTest.java
index 998b6c2..a6f5450 100644
--- a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
+++ b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureIntegrateTest.java
@@ -56,7 +56,7 @@ import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
objectFactory = GuiceFactory.class,
features = { "../gremlin-test/features" },
plugin = {"pretty", "junit:target/cucumber.xml"})
-public class HadoopGraphFeatureTest {
+public class HadoopGraphFeatureIntegrateTest {
private static final String skipReasonLength = "Hadoop-Gremlin is OLAP-oriented and for OLTP operations, linear-scan joins are required. This particular tests takes many minutes to execute.";
private static final List<Pair<String, String>> skip = new ArrayList<Pair<String,String>>() {{
@@ -129,7 +129,7 @@ public class HadoopGraphFeatureTest {
}
private static String getWorkingDirectory() {
- return TestHelper.makeTestDataDirectory(HadoopGraphFeatureTest.class, "graph-provider-data");
+ return TestHelper.makeTestDataDirectory(HadoopGraphFeatureIntegrateTest.class, "graph-provider-data");
}
private static Map<String, Object> getBaseConfiguration(final GraphData graphData) {
diff --git a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/process/HadoopGraphProcessStandardIntegrateTest.java b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/process/HadoopGraphProcessStandardIntegrateTest.java
index 4b8375d..f73cb74 100644
--- a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/process/HadoopGraphProcessStandardIntegrateTest.java
+++ b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/process/HadoopGraphProcessStandardIntegrateTest.java
@@ -21,13 +21,13 @@ package org.apache.tinkerpop.gremlin.hadoop.process;
import org.apache.tinkerpop.gremlin.GraphProviderClass;
import org.apache.tinkerpop.gremlin.hadoop.HadoopGraphProvider;
import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
-import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
+import org.apache.tinkerpop.gremlin.process.ProcessLimitedStandardSuite;
import org.junit.runner.RunWith;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
-@RunWith(ProcessStandardSuite.class)
+@RunWith(ProcessLimitedStandardSuite.class)
@GraphProviderClass(provider = HadoopGraphProvider.class, graph = HadoopGraph.class)
public class HadoopGraphProcessStandardIntegrateTest {
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
index d62a81e..df63c97 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
@@ -56,6 +56,7 @@ import java.util.stream.Stream;
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_INTEGRATE)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_STANDARD)
@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.NativeNeo4jSuite")
public final class Neo4jGraph implements Graph, WrappedGraph<Neo4jGraphAPI> {
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jGraphFeatureTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jGraphFeatureTest.java
index 61363c0..a50f4ec 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jGraphFeatureTest.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jGraphFeatureTest.java
@@ -50,7 +50,7 @@ import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
@RunWith(Cucumber.class)
@CucumberOptions(
- tags = "not @RemoteOnly and not @MultiMetaProperties",
+ tags = "not @RemoteOnly and not @MultiMetaProperties and not @GraphComputerOnly",
glue = { "org.apache.tinkerpop.gremlin.features" },
objectFactory = GuiceFactory.class,
features = { "../gremlin-test/features" },
@@ -104,6 +104,11 @@ public class Neo4jGraphFeatureTest {
cleanEmpty();
}
+ @Override
+ public String changePathToDataFile(final String pathToFileFromGremlin) {
+ return ".." + File.separator + pathToFileFromGremlin;
+ }
+
private static void createIndices() {
grateful.tx().readWrite();
grateful.cypher("CREATE INDEX ON :artist(name)").iterate();
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/Neo4jGraphProcessStandardTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/Neo4jGraphProcessStandardTest.java
index 3f2e819..f39561c 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/Neo4jGraphProcessStandardTest.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/Neo4jGraphProcessStandardTest.java
@@ -21,13 +21,13 @@ package org.apache.tinkerpop.gremlin.neo4j.process;
import org.apache.tinkerpop.gremlin.GraphProviderClass;
import org.apache.tinkerpop.gremlin.neo4j.Neo4jGraphProvider;
import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;
-import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
+import org.apache.tinkerpop.gremlin.process.ProcessLimitedStandardSuite;
import org.junit.runner.RunWith;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
-@RunWith(ProcessStandardSuite.class)
+@RunWith(ProcessLimitedStandardSuite.class)
@GraphProviderClass(provider = Neo4jGraphProvider.class, graph = Neo4jGraph.class)
public class Neo4jGraphProcessStandardTest {
}
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureIntegrateTest.java
similarity index 99%
rename from spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
rename to spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureIntegrateTest.java
index 911aa10..50baec0 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureIntegrateTest.java
@@ -64,7 +64,7 @@ import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
objectFactory = GuiceFactory.class,
features = { "../gremlin-test/features" },
plugin = {"pretty", "junit:target/cucumber.xml"})
-public class SparkGraphFeatureTest {
+public class SparkGraphFeatureIntegrateTest {
private static final int AVAILABLE_PROCESSORS = Runtime.getRuntime().availableProcessors();
private static final String skipReasonLength = "Spark-Gremlin is OLAP-oriented and for OLTP operations, linear-scan joins are required. This particular tests takes many minutes to execute.";
@@ -169,7 +169,7 @@ public class SparkGraphFeatureTest {
}
private static String getWorkingDirectory() {
- return TestHelper.makeTestDataDirectory(SparkGraphFeatureTest.class, "graph-provider-data");
+ return TestHelper.makeTestDataDirectory(SparkGraphFeatureIntegrateTest.class, "graph-provider-data");
}
private static Map<String, Object> getBaseConfiguration(final GraphData graphData) {
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
index 2795ae0..0343302 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
@@ -65,6 +65,8 @@ import java.util.stream.Stream;
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_INTEGRATE)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_COMPUTER)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_STANDARD)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_COMPUTER)
public final class TinkerGraph implements Graph {
static {
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessStandardTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessStandardTest.java
index abff119..54ab306 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessStandardTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessStandardTest.java
@@ -19,7 +19,7 @@
package org.apache.tinkerpop.gremlin.tinkergraph.process;
import org.apache.tinkerpop.gremlin.GraphProviderClass;
-import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
+import org.apache.tinkerpop.gremlin.process.ProcessLimitedStandardSuite;
import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
import org.junit.runner.RunWith;
@@ -29,7 +29,7 @@ import org.junit.runner.RunWith;
*
* @author Stephen Mallette (http://stephen.genoprime.com)
*/
-@RunWith(ProcessStandardSuite.class)
+@RunWith(ProcessLimitedStandardSuite.class)
@GraphProviderClass(provider = TinkerGraphProvider.class, graph = TinkerGraph.class)
public class TinkerGraphProcessStandardTest {
}
[tinkerpop] 05/18: TINKERPOP-2601 Packaged up feature/data files
into a gremlin-test zip distribution.
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 9243d1b63b4b9840bad44f8fa095ca5162689140
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Aug 13 16:04:08 2021 -0400
TINKERPOP-2601 Packaged up feature/data files into a gremlin-test zip distribution.
---
CHANGELOG.asciidoc | 1 +
docs/src/upgrade/release-3.6.x.asciidoc | 4 +
gremlin-test/pom.xml | 8 ++
gremlin-test/src/assembly/distribution.xml | 42 ++++++
gremlin-test/src/assembly/standalone.xml | 48 +++++++
gremlin-test/src/main/static/LICENSE | 202 +++++++++++++++++++++++++++++
gremlin-test/src/main/static/NOTICE | 5 +
7 files changed, 310 insertions(+)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 850b6be..e916f4d 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -32,6 +32,7 @@ limitations under the License.
* Replaced log4j usage with logback where builds rely on and packaged distributions now contain the latter.
* Prevented metrics computation unless the traversal is in a locked state.
* Exposed Gherkin tests as part of the provider test suite.
+* Packaged Gherkin tests and data as standalone package as a convenience distribution.
* Bumped to Apache Hadoop 3.3.1.
* Bumped to Apache Spark 3.1.2.
diff --git a/docs/src/upgrade/release-3.6.x.asciidoc b/docs/src/upgrade/release-3.6.x.asciidoc
index b8286b3..8c0f7ab 100644
--- a/docs/src/upgrade/release-3.6.x.asciidoc
+++ b/docs/src/upgrade/release-3.6.x.asciidoc
@@ -91,6 +91,10 @@ Gherkin tests as they will include newer tests that may not be in the old test s
feedback on the new test suite's usage so that when deprecation and removal of the old suite comes to pass the
transition will not carry as much friction.
+Note that the 3.6.0 release includes a convenience zip distribution for `gremlin-test` that packages both the data
+files and Gherkin features files for a release. This new file can be found on the
+link:https://tinkerpop.apache.org/downloads.html[Downloads page] on the website.
+
See: link:https://issues.apache.org/jira/browse/TINKERPOP-2601[TINKERPOP-2601],
link:https://tinkerpop.apache.org/docs/3.6.0/dev/provider/#gherkin-tests-suite[Provider Documentation]
diff --git a/gremlin-test/pom.xml b/gremlin-test/pom.xml
index 05e000b..265c57a 100644
--- a/gremlin-test/pom.xml
+++ b/gremlin-test/pom.xml
@@ -130,6 +130,14 @@ limitations under the License.
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
+ <descriptors>
+ <descriptor>src/assembly/standalone.xml</descriptor>
+ <descriptor>src/assembly/distribution.xml</descriptor>
+ </descriptors>
+ <finalName>apache-tinkerpop-${project.artifactId}-${project.version}</finalName>
+ <outputDirectory>target</outputDirectory>
+ <workDirectory>target/assembly/work</workDirectory>
+ <tarLongFileMode>warn</tarLongFileMode>
</configuration>
</plugin>
</plugins>
diff --git a/gremlin-test/src/assembly/distribution.xml b/gremlin-test/src/assembly/distribution.xml
new file mode 100644
index 0000000..5a6989b
--- /dev/null
+++ b/gremlin-test/src/assembly/distribution.xml
@@ -0,0 +1,42 @@
+<!--
+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.
+-->
+<assembly>
+ <id>distribution</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>target/apache-tinkerpop-${project.artifactId}-${project.version}-standalone/data</directory>
+ <outputDirectory>data</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target/apache-tinkerpop-${project.artifactId}-${project.version}-standalone/features</directory>
+ <outputDirectory>features</outputDirectory>
+ </fileSet>
+ </fileSets>
+ <files>
+ <file>
+ <source>src/main/static/LICENSE</source>
+ <outputDirectory></outputDirectory>
+ </file>
+ <file>
+ <source>src/main/static/NOTICE</source>
+ <outputDirectory></outputDirectory>
+ </file>
+ </files>
+</assembly>
diff --git a/gremlin-test/src/assembly/standalone.xml b/gremlin-test/src/assembly/standalone.xml
new file mode 100644
index 0000000..a2e53e5
--- /dev/null
+++ b/gremlin-test/src/assembly/standalone.xml
@@ -0,0 +1,48 @@
+<!--
+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.
+-->
+<assembly>
+ <id>standalone</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>features</directory>
+ <outputDirectory>/features</outputDirectory>
+ <includes>
+ <include>**/*.feature</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>../data</directory>
+ <outputDirectory>/data</outputDirectory>
+ </fileSet>
+ </fileSets>
+
+ <files>
+ <file>
+ <source>src/main/static/LICENSE</source>
+ <outputDirectory></outputDirectory>
+ </file>
+ <file>
+ <source>src/main/static/NOTICE</source>
+ <outputDirectory></outputDirectory>
+ </file>
+ </files>
+</assembly>
diff --git a/gremlin-test/src/main/static/LICENSE b/gremlin-test/src/main/static/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/gremlin-test/src/main/static/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
diff --git a/gremlin-test/src/main/static/NOTICE b/gremlin-test/src/main/static/NOTICE
new file mode 100644
index 0000000..71f0464
--- /dev/null
+++ b/gremlin-test/src/main/static/NOTICE
@@ -0,0 +1,5 @@
+Apache TinkerPop
+Copyright 2015-2021 The Apache Software Foundation.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
[tinkerpop] 18/18: TINKERPOP-2601 Added tests for graphs that
support null values
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 0725d4189e7e39bd97ff999359759e6570097e36
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Tue Sep 14 06:54:54 2021 -0400
TINKERPOP-2601 Added tests for graphs that support null values
---
docs/src/dev/developer/for-committers.asciidoc | 2 ++
.../traversal/translator/DotNetTranslator.java | 12 ++++++++++-
.../Gherkin/GherkinTestRunner.cs | 18 ++++++++++++++++
.../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 3 +++
.../Gherkin/IgnoreException.cs | 7 ++++++-
.../gremlin-javascript/test/cucumber/gremlin.js | 3 +++
.../gremlin-javascript/test/cucumber/world.js | 4 ++++
.../src/main/python/radish/feature_steps.py | 7 +++++++
gremlin-python/src/main/python/radish/gremlin.py | 3 +++
gremlin-test/features/map/AddEdge.feature | 18 +++++++++++++++-
gremlin-test/features/map/AddVertex.feature | 24 ++++++++++++++++++++++
...t.java => TinkerGraphAllowNullFeatureTest.java} | 8 ++++----
.../tinkergraph/TinkerGraphFeatureTest.java | 2 +-
.../gremlin/tinkergraph/TinkerGraphWorld.java | 16 +++++++++++++++
.../io.cucumber.core.backend.ObjectFactory | 3 ++-
15 files changed, 121 insertions(+), 9 deletions(-)
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index 457a5f2..5a7bc19 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -486,6 +486,8 @@ include or ignore certain tests. The tags enable the practical and necessary abi
they simply cannot support. It is important to be aware of the following tags when writing tests as not including a
tag when one is necessary will cause provider tests to fail:
+* `@AllowNullPropertyValues` - The scenario requires that the graph be configured with `AllowNullPropertyValues` as
+`true` (meaning that it can store `null` values).
* `@GraphComputerVerificationInjectionNotSupported` - The scenario will not work on with `GraphComputer` because the
`inject()` step is not supported.
* `@GraphComputerVerificationMidVNotSupported` - The scenario will not work on with `GraphComputer` because the
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/DotNetTranslator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/DotNetTranslator.java
index 65d4259..0e6ff8c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/DotNetTranslator.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/DotNetTranslator.java
@@ -357,7 +357,17 @@ public final class DotNetTranslator implements Translator.ScriptTranslator {
} else if (methodName.equals(GraphTraversal.Symbols.hasValue)) {
script.append("(object) ");
} else if (methodName.equals(GraphTraversal.Symbols.has)) {
- if (instArgs[0] instanceof T && idx > 0) script.append("(object) ");
+ if (instArgs.length == 2) {
+ if ((instArgs[0] instanceof T || instArgs[0] instanceof String) && idx == 1) {
+ script.append("(object) ");
+ }
+ } else if (instArgs.length == 3) {
+ if ((instArgs[0] instanceof T || instArgs[0] instanceof String) && idx == 1) {
+ script.append("(string) ");
+ } else if ((instArgs[0] instanceof T || instArgs[0] instanceof String) && idx == 2) {
+ script.append("(object) ");
+ }
+ }
}
}
convertToScript(instArg);
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index 4cc21d5..412a16f 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -57,6 +57,18 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_injectXnull_10_5_nullX_sum", IgnoreReason.NoReason},
{"g_injectXlistXnull_10_5_nullXX_sumXlocalX", IgnoreReason.NoReason},
{
+ "g_addVXpersonX_propertyXname_joshX_propertyXage_nullX",
+ IgnoreReason.NoReason
+ },
+ {
+ "g_addVXpersonX_propertyXname_markoX_propertyXfriendWeight_null_acl_nullX",
+ IgnoreReason.NoReason
+ },
+ {
+ "g_addEXknowsXpropertyXweight_nullXfromXV_hasXname_markoXX_toXV_hasXname_vadasXX",
+ IgnoreReason.NoReason
+ },
+ {
"g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack",
IgnoreReason.NoReason
},
@@ -125,6 +137,12 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
continue;
}
+ if (feature.Tags.Select(t => t.Name).ToList().Contains("@AllowNullPropertyValues"))
+ {
+ failedSteps.Add(scenario.Steps.First(), new IgnoreException(IgnoreReason.NullPropertyValuesNotSupportedOnTestGraph));
+ continue;
+ }
+
StepBlock? currentStep = null;
StepDefinition stepDefinition = null;
foreach (var step in scenario.Steps)
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
index 32dc71d..26329c4 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
@@ -328,6 +328,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_addEXV_outE_label_groupCount_orderXlocalX_byXvalues_descX_selectXkeysX_unfold_limitX1XX_fromXV_hasXname_vadasXX_toXV_hasXname_lopXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","jo [...]
{"g_addEXknowsX_fromXaX_toXbX_propertyXweight_0_1X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Propert [...]
{"g_VXaX_addEXknowsX_toXbX_propertyXweight_0_1X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property(" [...]
+ {"g_addEXknowsXpropertyXweight_nullXfromXV_hasXname_markoXX_toXV_hasXname_vadasXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).AddV("person").Property("name","vadas").Property("age",27), (g,p) =>g.AddE("knows").Property("weight",null).From(__.V().Has("name","marko")).To(__.V().Has("name","vadas")), (g,p) =>g.E().Has("knows","weight",(object) null)}},
{"g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property( [...]
{"g_V_addVXanimalX_propertyXage_0X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property("lang","java") [...]
{"g_addVXpersonX_propertyXname_stephenX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Property("lang","j [...]
@@ -345,6 +346,8 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_addVXV_hasXname_markoX_propertiesXnameX_keyX_label", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("age",29).As("marko").AddV("person").Property("name","vadas").Property("age",27).As("vadas").AddV("software").Property("name","lop").Property("lang","java").As("lop").AddV("person").Property("name","josh").Property("age",32).As("josh").AddV("software").Property("name","ripple").Pro [...]
{"g_addVXnullX_propertyXid_nullX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV((string) null).Property(T.Id,null), (g,p) =>g.V().HasLabel("vertex")}},
{"g_addV_propertyXlabel_personX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV().Property(T.Label,"person"), (g,p) =>g.V().HasLabel("person")}},
+ {"g_addVXpersonX_propertyXname_joshX_propertyXage_nullX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","josh").Property("age",null), (g,p) =>g.V().Has("person","age",(object) null)}},
+ {"g_addVXpersonX_propertyXname_markoX_propertyXfriendWeight_null_acl_nullX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property("friendWeight",null,"acl",null), (g,p) =>g.V().Has("person","name","marko").Has("friendWeight",(object) null), (g,p) =>g.V().Has("person","name","marko").Properties<object>("friendWeight").Has("acl",(object) null), (g,p) =>g.V().Has("person","name","marko").Prop [...]
{"g_V_coalesceXoutXfooX_outXbarXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Coalesce<object>(__.Out("foo"),__.Out("bar"))}},
{"g_VX1X_coalesceXoutXknowsX_outXcreatedXX_valuesXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Coalesce<object>(__.Out("knows"),__.Out("created")).Values<object>("name")}},
{"g_VX1X_coalesceXoutXcreatedX_outXknowsXX_valuesXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Coalesce<object>(__.Out("created"),__.Out("knows")).Values<object>("name")}},
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index 9579626..e025e2f 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@ -60,6 +60,11 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
/// <summary>
/// C# array equality is by reference not contents so the gherkin setup won't assert properly
/// </summary>
- ArrayKeysInMapNotAssertingInGherkin
+ ArrayKeysInMapNotAssertingInGherkin,
+
+ /// <summary>
+ /// The GLV suite does not test against a graph that has null property values enabled.
+ /// </summary>
+ NullPropertyValuesNotSupportedOnTestGraph
}
}
\ No newline at end of file
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
index ac659dd..9f50036 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
@@ -317,6 +317,7 @@ const gremlins = {
g_addEXV_outE_label_groupCount_orderXlocalX_byXvalues_descX_selectXkeysX_unfold_limitX1XX_fromXV_hasXname_vadasXX_toXV_hasXname_lopXX: [function({g, v2}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripp [...]
g_addEXknowsX_fromXaX_toXbX_propertyXweight_0_1X: [function({g, v6, xx1, v1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","pe [...]
g_VXaX_addEXknowsX_toXbX_propertyXweight_0_1X: [function({g, v6, xx1, v1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter [...]
+ g_addEXknowsXpropertyXweight_nullXfromXV_hasXname_markoXX_toXV_hasXname_vadasXX: [function({g}) { return g.addV("person").property("name","marko").property("age",29).addV("person").property("name","vadas").property("age",27) }, function({g}) { return g.addE("knows").property("weight",null).from_(__.V().has("name","marko")).to(__.V().has("name","vadas")) }, function({g}) { return g.E().has("knows","weight",null) }],
g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX: [function({g, vid1}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").pr [...]
g_V_addVXanimalX_propertyXage_0X: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").property("age",35).as(" [...]
g_addVXpersonX_propertyXname_stephenX: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").property("age",35) [...]
@@ -334,6 +335,8 @@ const gremlins = {
g_addVXV_hasXname_markoX_propertiesXnameX_keyX_label: [function({g}) { return g.addV("person").property("name","marko").property("age",29).as("marko").addV("person").property("name","vadas").property("age",27).as("vadas").addV("software").property("name","lop").property("lang","java").as("lop").addV("person").property("name","josh").property("age",32).as("josh").addV("software").property("name","ripple").property("lang","java").as("ripple").addV("person").property("name","peter").pro [...]
g_addVXnullX_propertyXid_nullX: [function({g}) { return g.addV(null).property(T.id,null) }, function({g}) { return g.V().hasLabel("vertex") }],
g_addV_propertyXlabel_personX: [function({g}) { return g.addV().property(T.label,"person") }, function({g}) { return g.V().hasLabel("person") }],
+ g_addVXpersonX_propertyXname_joshX_propertyXage_nullX: [function({g}) { return g.addV("person").property("name","josh").property("age",null) }, function({g}) { return g.V().has("person","age",null) }],
+ g_addVXpersonX_propertyXname_markoX_propertyXfriendWeight_null_acl_nullX: [function({g}) { return g.addV("person").property("name","marko").property("friendWeight",null,"acl",null) }, function({g}) { return g.V().has("person","name","marko").has("friendWeight",null) }, function({g}) { return g.V().has("person","name","marko").properties("friendWeight").has("acl",null) }, function({g}) { return g.V().has("person","name","marko").properties("friendWeight").count() }],
g_V_coalesceXoutXfooX_outXbarXX: [function({g}) { return g.V().coalesce(__.out("foo"),__.out("bar")) }],
g_VX1X_coalesceXoutXknowsX_outXcreatedXX_valuesXnameX: [function({g, vid1}) { return g.V(vid1).coalesce(__.out("knows"),__.out("created")).values("name") }],
g_VX1X_coalesceXoutXcreatedX_outXknowsXX_valuesXnameX: [function({g, vid1}) { return g.V(vid1).coalesce(__.out("created"),__.out("knows")).values("name") }],
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
index aae38df..9ea5e37 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
@@ -100,6 +100,10 @@ Before({tags: "@GraphComputerOnly"}, function() {
this.isGraphComputer = true;
})
+Before({tags: "@AllowNullPropertyValues"}, function() {
+ return 'skipped'
+})
+
function getVertices(connection) {
const g = traversal().withRemote(connection);
return g.V().group().by('name').by(__.tail()).next().then(it => it.value);
diff --git a/gremlin-python/src/main/python/radish/feature_steps.py b/gremlin-python/src/main/python/radish/feature_steps.py
index dacc467..eb225bd 100644
--- a/gremlin-python/src/main/python/radish/feature_steps.py
+++ b/gremlin-python/src/main/python/radish/feature_steps.py
@@ -81,6 +81,10 @@ def translate_traversal(step):
p = step.context.traversal_params if hasattr(step.context, "traversal_params") else {}
localg = step.context.g
tagset = [ tag.name for tag in step.all_tags ]
+
+ if not step.context.ignore:
+ step.context.ignore = "AllowNullPropertyValues" in tagset
+
if "GraphComputerOnly" in tagset:
localg = step.context.g.withComputer()
p['g'] = localg
@@ -134,6 +138,9 @@ def assert_side_effects(step, count, traversal_string):
@then("the result should have a count of {count:d}")
def assert_count(step, count):
+ if step.context.ignore:
+ return
+
assert_that(len(list(step.context.result)), equal_to(count))
diff --git a/gremlin-python/src/main/python/radish/gremlin.py b/gremlin-python/src/main/python/radish/gremlin.py
index bc0b9d3..ca561c8 100644
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -302,6 +302,7 @@ world.gremlins = {
'g_addEXV_outE_label_groupCount_orderXlocalX_byXvalues_descX_selectXkeysX_unfold_limitX1XX_fromXV_hasXname_vadasXX_toXV_hasXname_lopXX': [(lambda g, v2=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple [...]
'g_addEXknowsX_fromXaX_toXbX_propertyXweight_0_1X': [(lambda g, v6=None,xx1=None,v1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('na [...]
'g_VXaX_addEXknowsX_toXbX_propertyXweight_0_1X': [(lambda g, v6=None,xx1=None,v1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name' [...]
+ 'g_addEXknowsXpropertyXweight_nullXfromXV_hasXname_markoXX_toXV_hasXname_vadasXX': [(lambda g:g.addV('person').property('name','marko').property('age',29).addV('person').property('name','vadas').property('age',27)), (lambda g:g.addE('knows').property('weight',None).from_(__.V().has('name','marko')).to(__.V().has('name','vadas'))), (lambda g:g.E().has('knows','weight',None))],
'g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX': [(lambda g, vid1=None:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').pro [...]
'g_V_addVXanimalX_propertyXage_0X': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').property('age',35).as_('peter [...]
'g_addVXpersonX_propertyXname_stephenX': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').property('age',35).as_(' [...]
@@ -319,6 +320,8 @@ world.gremlins = {
'g_addVXV_hasXname_markoX_propertiesXnameX_keyX_label': [(lambda g:g.addV('person').property('name','marko').property('age',29).as_('marko').addV('person').property('name','vadas').property('age',27).as_('vadas').addV('software').property('name','lop').property('lang','java').as_('lop').addV('person').property('name','josh').property('age',32).as_('josh').addV('software').property('name','ripple').property('lang','java').as_('ripple').addV('person').property('name','peter').property( [...]
'g_addVXnullX_propertyXid_nullX': [(lambda g:g.addV(None).property(T.id,None)), (lambda g:g.V().hasLabel('vertex'))],
'g_addV_propertyXlabel_personX': [(lambda g:g.addV().property(T.label,'person')), (lambda g:g.V().hasLabel('person'))],
+ 'g_addVXpersonX_propertyXname_joshX_propertyXage_nullX': [(lambda g:g.addV('person').property('name','josh').property('age',None)), (lambda g:g.V().has('person','age',None))],
+ 'g_addVXpersonX_propertyXname_markoX_propertyXfriendWeight_null_acl_nullX': [(lambda g:g.addV('person').property('name','marko').property('friendWeight',None,'acl',None)), (lambda g:g.V().has('person','name','marko').has('friendWeight',None)), (lambda g:g.V().has('person','name','marko').properties('friendWeight').has('acl',None)), (lambda g:g.V().has('person','name','marko').properties('friendWeight').count())],
'g_V_coalesceXoutXfooX_outXbarXX': [(lambda g:g.V().coalesce(__.out('foo'),__.out('bar')))],
'g_VX1X_coalesceXoutXknowsX_outXcreatedXX_valuesXnameX': [(lambda g, vid1=None:g.V(vid1).coalesce(__.out('knows'),__.out('created')).name)],
'g_VX1X_coalesceXoutXcreatedX_outXknowsXX_valuesXnameX': [(lambda g, vid1=None:g.V(vid1).coalesce(__.out('created'),__.out('knows')).name)],
diff --git a/gremlin-test/features/map/AddEdge.feature b/gremlin-test/features/map/AddEdge.feature
index 8deb34e..db0e58a 100644
--- a/gremlin-test/features/map/AddEdge.feature
+++ b/gremlin-test/features/map/AddEdge.feature
@@ -415,4 +415,20 @@ Feature: Step - addE()
Then the result should have a count of 1
And the graph should return 7 for count of "g.E()"
And the graph should return 3 for count of "g.V(v1).outE(\"knows\")"
- And the graph should return 1 for count of "g.V(v1).out(\"knows\").has(\"name\",\"peter\")"
\ No newline at end of file
+ And the graph should return 1 for count of "g.V(v1).out(\"knows\").has(\"name\",\"peter\")"
+
+ @AllowNullPropertyValues
+ Scenario: g_addEXknowsXpropertyXweight_nullXfromXV_hasXname_markoXX_toXV_hasXname_vadasXX
+ Given the empty graph
+ And the graph initializer of
+ """
+ g.addV("person").property("name", "marko").property("age", 29).
+ addV("person").property("name", "vadas").property("age", 27)
+ """
+ And the traversal of
+ """
+ g.addE("knows").property("weight", null).from(V().has("name","marko")).to(V().has("name","vadas"))
+ """
+ When iterated to list
+ Then the result should have a count of 1
+ And the graph should return 1 for count of "g.E().has(\"knows\",\"weight\",null)"
\ No newline at end of file
diff --git a/gremlin-test/features/map/AddVertex.feature b/gremlin-test/features/map/AddVertex.feature
index e4e676f..c149d89 100644
--- a/gremlin-test/features/map/AddVertex.feature
+++ b/gremlin-test/features/map/AddVertex.feature
@@ -438,3 +438,27 @@ Feature: Step - addV()
When iterated to list
Then the result should have a count of 1
And the graph should return 1 for count of "g.V().hasLabel(\"person\")"
+
+ @AllowNullPropertyValues
+ Scenario: g_addVXpersonX_propertyXname_joshX_propertyXage_nullX
+ Given the empty graph
+ And the traversal of
+ """
+ g.addV("person").property("name", "josh").property("age", null)
+ """
+ When iterated to list
+ Then the result should have a count of 1
+ And the graph should return 1 for count of "g.V().has(\"person\",\"age\",null)"
+
+ @AllowNullPropertyValues @MultiMetaProperties
+ Scenario: g_addVXpersonX_propertyXname_markoX_propertyXfriendWeight_null_acl_nullX
+ Given the empty graph
+ And the traversal of
+ """
+ g.addV("person").property("name", "marko").property("friendWeight", null, "acl", null)
+ """
+ When iterated to list
+ Then the result should have a count of 1
+ And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"marko\").has(\"friendWeight\", null)"
+ And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"marko\").properties(\"friendWeight\").has(\"acl\",null)"
+ And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"marko\").properties(\"friendWeight\").count()"
\ No newline at end of file
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphAllowNullFeatureTest.java
similarity index 88%
copy from tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
copy to tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphAllowNullFeatureTest.java
index b3a416a..4c226aa 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphAllowNullFeatureTest.java
@@ -30,12 +30,12 @@ import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(
- tags = "not @RemoteOnly and not @GraphComputerOnly",
+ tags = "@AllowNullPropertyValues",
glue = { "org.apache.tinkerpop.gremlin.features" },
- objectFactory = TinkerGraphFeatureTest.TinkerGraphGuiceFactory.class,
+ objectFactory = TinkerGraphAllowNullFeatureTest.TinkerGraphGuiceFactory.class,
features = { "../gremlin-test/features" },
plugin = {"pretty", "junit:target/cucumber.xml"})
-public class TinkerGraphFeatureTest {
+public class TinkerGraphAllowNullFeatureTest {
public static class TinkerGraphGuiceFactory extends AbstractGuiceFactory {
public TinkerGraphGuiceFactory() {
@@ -46,7 +46,7 @@ public class TinkerGraphFeatureTest {
public static final class ServiceModule extends AbstractModule {
@Override
protected void configure() {
- bind(World.class).to(TinkerGraphWorld.class);
+ bind(World.class).to(TinkerGraphWorld.NullWorld.class);
}
}
}
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
index b3a416a..5ace402 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
@@ -30,7 +30,7 @@ import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(
- tags = "not @RemoteOnly and not @GraphComputerOnly",
+ tags = "not @RemoteOnly and not @GraphComputerOnly and not @AllowNullPropertyValues",
glue = { "org.apache.tinkerpop.gremlin.features" },
objectFactory = TinkerGraphFeatureTest.TinkerGraphGuiceFactory.class,
features = { "../gremlin-test/features" },
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
index a08b62f..19108ef 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
@@ -83,6 +83,22 @@ public class TinkerGraphWorld implements World {
}
/**
+ * Enables the storing of {@code null} property values when testing.
+ */
+ public static class NullWorld extends TinkerGraphWorld {
+
+ @Override
+ public GraphTraversalSource getGraphTraversalSource(final LoadGraphWith.GraphData graphData) {
+ if (graphData != null)
+ throw new UnsupportedOperationException("GraphData not supported: " + graphData.name());
+
+ final Configuration conf = TinkerGraphWorld.getNumberIdManagerConfiguration();
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_ALLOW_NULL_PROPERTY_VALUES, true);
+ return TinkerGraph.open(conf).traversal();
+ }
+ }
+
+ /**
* Turns on {@link GraphComputer} when testing.
*/
public static class ComputerWorld extends TinkerGraphWorld {
diff --git a/tinkergraph-gremlin/src/test/resources/META-INF/services/io.cucumber.core.backend.ObjectFactory b/tinkergraph-gremlin/src/test/resources/META-INF/services/io.cucumber.core.backend.ObjectFactory
index d4066a8..54484d4 100644
--- a/tinkergraph-gremlin/src/test/resources/META-INF/services/io.cucumber.core.backend.ObjectFactory
+++ b/tinkergraph-gremlin/src/test/resources/META-INF/services/io.cucumber.core.backend.ObjectFactory
@@ -1,2 +1,3 @@
org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphFeatureTest$TinkerGraphGuiceFactory
-org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphComputerFeatureTest$TinkerGraphGuiceFactory
\ No newline at end of file
+org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphComputerFeatureTest$TinkerGraphGuiceFactory
+org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphAllowNullFeatureTest$TinkerGraphGuiceFactory
\ No newline at end of file
[tinkerpop] 13/18: TINKERPOP-2601 Remove logging for gherkin from
python
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit d3a0aa0fbfa026f9abcd6bd9207a07f1c5681b0c
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Sep 8 13:42:56 2021 -0400
TINKERPOP-2601 Remove logging for gherkin from python
---
gremlin-python/src/main/python/radish/feature_steps.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/gremlin-python/src/main/python/radish/feature_steps.py b/gremlin-python/src/main/python/radish/feature_steps.py
index 82ec15b..dacc467 100644
--- a/gremlin-python/src/main/python/radish/feature_steps.py
+++ b/gremlin-python/src/main/python/radish/feature_steps.py
@@ -81,7 +81,6 @@ def translate_traversal(step):
p = step.context.traversal_params if hasattr(step.context, "traversal_params") else {}
localg = step.context.g
tagset = [ tag.name for tag in step.all_tags ]
- print(str(tagset))
if "GraphComputerOnly" in tagset:
localg = step.context.g.withComputer()
p['g'] = localg
[tinkerpop] 02/18: TINKERPOP-2601 Neo4jGraph running gherkin tests
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit c5487f56baaf37d433532f386d777612575ca798
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Aug 12 16:24:53 2021 -0400
TINKERPOP-2601 Neo4jGraph running gherkin tests
Includes full build over GLVs after a number of changes that were needed in feature files to better support ordering of results and other odds and ends that Neo4j needed for the tests to pass. Added annotations for multi/metaproperty tests so that Neo4j and other graphs could ignore those.
---
gremlin-dotnet/build/generate.groovy | 2 +-
gremlin-dotnet/test/pom.xml | 5 +
gremlin-javascript/build/generate.groovy | 2 +-
gremlin-javascript/pom.xml | 5 +
gremlin-python/build/generate.groovy | 2 +-
gremlin-python/pom.xml | 5 +
gremlin-test/features/branch/Local.feature | 9 +-
gremlin-test/features/branch/Optional.feature | 24 +-
gremlin-test/features/branch/Repeat.feature | 165 +++++-----
gremlin-test/features/filter/Dedup.feature | 16 +-
gremlin-test/features/filter/Drop.feature | 25 +-
gremlin-test/features/filter/Has.feature | 2 +
gremlin-test/features/filter/Tail.feature | 12 +-
gremlin-test/features/map/AddEdge.feature | 268 +++++++--------
gremlin-test/features/map/AddVertex.feature | 366 +++++++++++----------
gremlin-test/features/map/Graph.feature | 24 +-
gremlin-test/features/map/Match.feature | 69 +++-
gremlin-test/features/map/Order.feature | 6 +-
gremlin-test/features/map/Select.feature | 1 +
gremlin-test/features/map/ShortestPath.feature | 1 +
gremlin-test/features/map/ValueMap.feature | 1 +
gremlin-test/features/map/Vertex.feature | 36 +-
gremlin-test/features/sideEffect/Group.feature | 7 +-
gremlin-test/pom.xml | 11 +
.../tinkerpop/gremlin/features/StepDefinition.java | 4 +
neo4j-gremlin/pom.xml | 6 +
.../gremlin/neo4j/Neo4jGraphFeatureTest.java | 191 +++++++++++
.../src/test/resources/cucumber.properties | 1 +
.../tinkergraph/TinkerGraphFeatureTest.java | 11 +-
29 files changed, 799 insertions(+), 478 deletions(-)
diff --git a/gremlin-dotnet/build/generate.groovy b/gremlin-dotnet/build/generate.groovy
index 5fa64fa..21b5cdf 100644
--- a/gremlin-dotnet/build/generate.groovy
+++ b/gremlin-dotnet/build/generate.groovy
@@ -24,7 +24,7 @@ import org.apache.tinkerpop.gremlin.groovy.jsr223.ast.VarAsBindingASTTransformat
import org.apache.tinkerpop.gremlin.groovy.jsr223.ast.RepeatASTTransformationCustomizer
import org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCustomizer
import org.codehaus.groovy.control.customizers.CompilationCustomizer
-import org.apache.tinkerpop.gremlin.features.FeatureReader
+import org.apache.tinkerpop.gremlin.language.corpus.FeatureReader
import javax.script.SimpleBindings
diff --git a/gremlin-dotnet/test/pom.xml b/gremlin-dotnet/test/pom.xml
index 1716b5c..d6ab999 100644
--- a/gremlin-dotnet/test/pom.xml
+++ b/gremlin-dotnet/test/pom.xml
@@ -113,6 +113,11 @@ limitations under the License.
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.tinkerpop</groupId>
+ <artifactId>gremlin-language</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
diff --git a/gremlin-javascript/build/generate.groovy b/gremlin-javascript/build/generate.groovy
index 09bd9e7..aa1cdf2 100644
--- a/gremlin-javascript/build/generate.groovy
+++ b/gremlin-javascript/build/generate.groovy
@@ -24,7 +24,7 @@ import org.apache.tinkerpop.gremlin.groovy.jsr223.ast.VarAsBindingASTTransformat
import org.apache.tinkerpop.gremlin.groovy.jsr223.ast.RepeatASTTransformationCustomizer
import org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCustomizer
import org.codehaus.groovy.control.customizers.CompilationCustomizer
-import org.apache.tinkerpop.gremlin.features.FeatureReader
+import org.apache.tinkerpop.gremlin.language.corpus.FeatureReader
import javax.script.SimpleBindings
diff --git a/gremlin-javascript/pom.xml b/gremlin-javascript/pom.xml
index 3cdb95c..a2edae5 100644
--- a/gremlin-javascript/pom.xml
+++ b/gremlin-javascript/pom.xml
@@ -66,6 +66,11 @@ limitations under the License.
</dependency>
<dependency>
<groupId>org.apache.tinkerpop</groupId>
+ <artifactId>gremlin-language</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tinkerpop</groupId>
<artifactId>neo4j-gremlin</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/gremlin-python/build/generate.groovy b/gremlin-python/build/generate.groovy
index 701d47b..44470f1 100644
--- a/gremlin-python/build/generate.groovy
+++ b/gremlin-python/build/generate.groovy
@@ -24,7 +24,7 @@ import org.apache.tinkerpop.gremlin.groovy.jsr223.ast.VarAsBindingASTTransformat
import org.apache.tinkerpop.gremlin.groovy.jsr223.ast.RepeatASTTransformationCustomizer
import org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCustomizer
import org.codehaus.groovy.control.customizers.CompilationCustomizer
-import org.apache.tinkerpop.gremlin.features.FeatureReader
+import org.apache.tinkerpop.gremlin.language.corpus.FeatureReader
import javax.script.SimpleBindings
diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml
index dd33341..fd9ff26 100644
--- a/gremlin-python/pom.xml
+++ b/gremlin-python/pom.xml
@@ -261,6 +261,11 @@ limitations under the License.
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.tinkerpop</groupId>
+ <artifactId>gremlin-language</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
diff --git a/gremlin-test/features/branch/Local.feature b/gremlin-test/features/branch/Local.feature
index 509c622..a2464b8 100644
--- a/gremlin-test/features/branch/Local.feature
+++ b/gremlin-test/features/branch/Local.feature
@@ -17,6 +17,7 @@
Feature: Step - local()
+ @MultiMetaProperties
Scenario: g_V_localXpropertiesXlocationX_order_byXvalueX_limitX2XX_value
Given the crew graph
And the traversal of
@@ -44,10 +45,10 @@ Feature: Step - local()
When iterated to list
Then the result should be unordered
| result |
- | m[{"a":"marko","b":"d[3].i"}] |
- | m[{"a":"josh","b":"d[5].i"}] |
- | m[{"a":"josh","b":"d[3].i"}] |
- | m[{"a":"peter","b":"d[3].i"}] |
+ | m[{"a":"marko","b":"v[lop].id"}] |
+ | m[{"a":"josh","b":"v[ripple].id"}] |
+ | m[{"a":"josh","b":"v[lop].id"}] |
+ | m[{"a":"peter","b":"v[lop].id"}] |
Scenario: g_V_localXoutE_countX
Given the modern graph
diff --git a/gremlin-test/features/branch/Optional.feature b/gremlin-test/features/branch/Optional.feature
index 67fc137..5d700ea 100644
--- a/gremlin-test/features/branch/Optional.feature
+++ b/gremlin-test/features/branch/Optional.feature
@@ -84,18 +84,18 @@ Feature: Step - choose()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter vid1 defined as "v[marko].id"
And the traversal of
diff --git a/gremlin-test/features/branch/Repeat.feature b/gremlin-test/features/branch/Repeat.feature
index 55d24da..e7243b6 100644
--- a/gremlin-test/features/branch/Repeat.feature
+++ b/gremlin-test/features/branch/Repeat.feature
@@ -253,112 +253,113 @@ Feature: Step - repeat()
| loop |
| loop |
-Scenario: g_V_repeatXout_repeatXoutX_timesX1XX_timesX1X_limitX1X_path_by_name
+ Scenario: g_V_repeatXout_repeatXoutX_timesX1XX_timesX1X_limitX1X_path_by_name
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().repeat(__.out().repeat(__.out()).times(1)).times(1).limit(1).path().by("name")
+ """
+ When iterated next
+ Then the result should be unordered
+ | result |
+ | marko |
+ | josh |
+ | ripple |
+
+ Scenario: g_V_repeatXoutXknowsXX_untilXrepeatXoutXcreatedXX_emitXhasXname_lopXXX_path_byXnameX
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().repeat(__.out("knows")).until(__.repeat(__.out("created")).emit(__.has("name", "lop"))).path().by("name")
+ """
+ When iterated next
+ Then the result should be unordered
+ | result |
+ | marko |
+ | josh |
+
+ Scenario: g_V_repeatXrepeatXout_createdXX_untilXhasXname_rippleXXXemit_lang
Given the modern graph
And the traversal of
"""
- g.V().repeat(__.out().repeat(__.out()).times(1)).times(1).limit(1).path().by("name")
+ g.V().repeat(__.repeat(__.out("created")).until(__.has("name", "ripple"))).emit().values("lang")
"""
- When iterated next
+ When iterated to list
Then the result should be unordered
| result |
- | marko |
- | josh |
- | ripple |
+ | java |
-Scenario: g_V_repeatXoutXknowsXX_untilXrepeatXoutXcreatedXX_emitXhasXname_lopXXX_path_byXnameX
+ Scenario: g_V_untilXconstantXtrueXX_repeatXrepeatXout_createdXX_untilXhasXname_rippleXXXemit_lang
Given the modern graph
And the traversal of
"""
- g.V().repeat(__.out("knows")).until(__.repeat(__.out("created")).emit(__.has("name", "lop"))).path().by("name")
+ g.V().until(__.constant(true)).repeat(__.repeat(__.out("created")).until(__.has("name", "ripple"))).emit().values("lang")
"""
- When iterated next
+ When iterated to list
Then the result should be unordered
| result |
- | marko |
- | josh |
+ | java |
+ | java |
-Scenario: g_V_repeatXrepeatXout_createdXX_untilXhasXname_rippleXXXemit_lang
- Given the modern graph
- And the traversal of
- """
- g.V().repeat(__.repeat(__.out("created")).until(__.has("name", "ripple"))).emit().values("lang")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | java |
+ Scenario: g_V_emit_repeatXa_outXknows_filterXloops_isX0XX_lang
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().emit().repeat("a", __.out("knows").filter(__.loops("a").is(0))).values("lang")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | java |
+ | java |
-Scenario: g_V_untilXconstantXtrueXX_repeatXrepeatXout_createdXX_untilXhasXname_rippleXXXemit_lang
- Given the modern graph
- And the traversal of
- """
- g.V().until(__.constant(true)).repeat(__.repeat(__.out("created")).until(__.has("name", "ripple"))).emit().values("lang")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | java |
- | java |
+ Scenario: g_VX3X_repeatXbothX_createdXX_untilXloops_is_40XXemit_repeatXin_knowsXX_emit_loopsXisX1Xdedup_values
+ Given the modern graph
+ And using the parameter vid3 defined as "v[lop].id"
+ And the traversal of
+ """
+ g.V(vid3).repeat(__.both("created")).until(__.loops().is(40)).emit(__.repeat(__.in("knows")).emit(__.loops().is(1))).dedup().values("name")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | josh |
+ | lop |
+ | ripple |
-Scenario: g_V_emit_repeatXa_outXknows_filterXloops_isX0XX_lang
- Given the modern graph
- And the traversal of
- """
- g.V().emit().repeat("a", __.out("knows").filter(__.loops("a").is(0))).values("lang")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | java |
- | java |
+ @MultiMetaProperties
+ Scenario: g_VX1X_repeatXrepeatXunionXout_uses_out_traversesXX_whereXloops_isX0X_timesX1X_timeX2X_name
+ Given the crew graph
+ And using the parameter vid1 defined as "v[marko].id"
+ And the traversal of
+ """
+ g.V(vid1).repeat(__.repeat(__.union(__.out("uses"), __.out("traverses")).where(__.loops().is(0))).times(1)).times(2).values("name")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | tinkergraph |
-Scenario: g_VX3X_repeatXbothX_createdXX_untilXloops_is_40XXemit_repeatXin_knowsXX_emit_loopsXisX1Xdedup_values
+ Scenario: g_V_repeatXa_outXknows_repeatXb_outXcreatedX_filterXloops_isX0XX_emit_lang
Given the modern graph
- And using the parameter vid3 defined as "v[lop].id"
And the traversal of
"""
- g.V(vid3).repeat(__.both("created")).until(__.loops().is(40)).emit(__.repeat(__.in("knows")).emit(__.loops().is(1))).dedup().values("name")
+ g.V().repeat("a", __.out("knows").repeat("b", __.out("created").filter(__.loops("a").is(0))).emit()).emit().values("lang")
"""
When iterated to list
- Then the result should be unordered
- | result |
- | josh |
- | lop |
- | ripple |
+ Then the result should be unordered
+ | result |
+ | java |
+ | java |
-Scenario: g_VX1X_repeatXrepeatXunionXout_uses_out_traversesXX_whereXloops_isX0X_timesX1X_timeX2X_name
- Given the crew graph
- And using the parameter vid1 defined as "v[marko].id"
+ Scenario: g_VX6X_repeatXa_bothXcreatedX_simplePathX_emitXrepeatXb_bothXknowsXX_untilXloopsXbX_asXb_whereXloopsXaX_asXbX_hasXname_vadasXX_dedup_name
+ Given the modern graph
+ And using the parameter vid6 defined as "v[peter].id"
And the traversal of
"""
- g.V(vid1).repeat(__.repeat(__.union(__.out("uses"), __.out("traverses")).where(__.loops().is(0))).times(1)).times(2).values("name")
+ g.V(vid6).repeat("a", __.both("created").simplePath()).emit(__.repeat("b", __.both("knows")).until(__.loops("b").as("b").where(__.loops("a").as("b"))).has("name", "vadas")).dedup().values("name")
"""
When iterated to list
- Then the result should be unordered
- | result |
- | tinkergraph |
-
-Scenario: g_V_repeatXa_outXknows_repeatXb_outXcreatedX_filterXloops_isX0XX_emit_lang
- Given the modern graph
- And the traversal of
- """
- g.V().repeat("a", __.out("knows").repeat("b", __.out("created").filter(__.loops("a").is(0))).emit()).emit().values("lang")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | java |
- | java |
-
-Scenario: g_VX6X_repeatXa_bothXcreatedX_simplePathX_emitXrepeatXb_bothXknowsXX_untilXloopsXbX_asXb_whereXloopsXaX_asXbX_hasXname_vadasXX_dedup_name
- Given the modern graph
- And using the parameter vid6 defined as "v[peter].id"
- And the traversal of
- """
- g.V(vid6).repeat("a", __.both("created").simplePath()).emit(__.repeat("b", __.both("knows")).until(__.loops("b").as("b").where(__.loops("a").as("b"))).has("name", "vadas")).dedup().values("name")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | josh |
+ Then the result should be unordered
+ | result |
+ | josh |
diff --git a/gremlin-test/features/filter/Dedup.feature b/gremlin-test/features/filter/Dedup.feature
index a85dcfc..a143cc2 100644
--- a/gremlin-test/features/filter/Dedup.feature
+++ b/gremlin-test/features/filter/Dedup.feature
@@ -135,12 +135,12 @@ Feature: Step - dedup()
Given the modern graph
And the traversal of
"""
- g.V().group().by(T.label).by(__.bothE().values("weight").dedup().fold())
+ g.V().group().by(T.label).by(__.bothE().values("weight").dedup().order().by(Order.asc).fold())
"""
When iterated to list
Then the result should be unordered
| result |
- | m[{"software":[1.0,0.4,0.2],"person":[0.5,1.0,0.4,0.2]}] |
+ | m[{"software":[0.2,0.4,1.0],"person":[0.2,0.4,0.5,1.0]}] |
Scenario: g_V_asXaX_both_asXbX_dedupXa_bX_byXlabelX_selectXa_bX
Given the modern graph
@@ -149,11 +149,20 @@ Feature: Step - dedup()
g.V().as("a").both().as("b").dedup("a", "b").by(T.label).select("a", "b")
"""
When iterated to list
- Then the result should be unordered
+ Then the result should be of
| result |
| m[{"a":"v[marko]","b":"v[lop]"}] |
| m[{"a":"v[marko]","b":"v[vadas]"}] |
+ | m[{"a":"v[marko]","b":"v[josh]"}] |
+ | m[{"a":"v[vadas]","b":"v[marko]"}] |
| m[{"a":"v[lop]","b":"v[marko]"}] |
+ | m[{"a":"v[lop]","b":"v[josh]"}] |
+ | m[{"a":"v[lop]","b":"v[peter]"}] |
+ | m[{"a":"v[josh]","b":"v[ripple]"}] |
+ | m[{"a":"v[josh]","b":"v[lop]"}] |
+ | m[{"a":"v[josh]","b":"v[marko]"}] |
+ | m[{"a":"v[ripple]","b":"v[josh]"}] |
+ | m[{"a":"v[peter]","b":"v[lop]"}] |
Scenario: g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_dedupXa_bX_path
Given the modern graph
@@ -274,6 +283,7 @@ Feature: Step - dedup()
| result |
| d[12].l |
+ @MultiMetaProperties
Scenario: g_V_both_properties_properties_dedup_count
Given the crew graph
And the traversal of
diff --git a/gremlin-test/features/filter/Drop.feature b/gremlin-test/features/filter/Drop.feature
index 144399e..1ee97cc 100644
--- a/gremlin-test/features/filter/Drop.feature
+++ b/gremlin-test/features/filter/Drop.feature
@@ -66,18 +66,18 @@ Feature: Step - drop()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -87,6 +87,7 @@ Feature: Step - drop()
Then the result should be empty
And the graph should return 0 for count of "g.E().properties()"
+ @MultiMetaProperties
Scenario: g_V_properties_propertiesXstartTimeX_drop
Given the empty graph
And the graph initializer of
diff --git a/gremlin-test/features/filter/Has.feature b/gremlin-test/features/filter/Has.feature
index 8b96c5a..11fd48d 100644
--- a/gremlin-test/features/filter/Has.feature
+++ b/gremlin-test/features/filter/Has.feature
@@ -283,6 +283,7 @@ Feature: Step - has()
| e[marko-knows->vadas] |
| e[marko-knows->josh] |
+ @MultiMetaProperties
Scenario: g_E_hasLabelXuses_traversesX
Given the crew graph
And the traversal of
@@ -368,6 +369,7 @@ Feature: Step - has()
| result |
| e[josh-created->ripple] |
+ @MultiMetaProperties
Scenario: g_V_hasXlocationX
Given the crew graph
And the traversal of
diff --git a/gremlin-test/features/filter/Tail.feature b/gremlin-test/features/filter/Tail.feature
index 2db579c..cfc6f69 100644
--- a/gremlin-test/features/filter/Tail.feature
+++ b/gremlin-test/features/filter/Tail.feature
@@ -72,16 +72,16 @@ Feature: Step - tail()
Given the modern graph
And the traversal of
"""
- g.V().repeat(__.both()).times(3).tail(7)
+ g.V().repeat(__.bothE().order().by('weight',Order.asc).otherV()).times(3).tail(7)
"""
When iterated to list
Then the result should be unordered
| result |
- | v[peter] |
- | v[peter] |
- | v[peter] |
- | v[peter] |
- | v[marko] |
+ | v[ripple] |
+ | v[ripple] |
+ | v[josh] |
+ | v[josh] |
+ | v[josh] |
| v[marko] |
| v[marko] |
diff --git a/gremlin-test/features/map/AddEdge.feature b/gremlin-test/features/map/AddEdge.feature
index 4795cbf..f721c12 100644
--- a/gremlin-test/features/map/AddEdge.feature
+++ b/gremlin-test/features/map/AddEdge.feature
@@ -21,18 +21,18 @@ Feature: Step - addE()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter vid1 defined as "v[marko].id"
And the traversal of
@@ -48,46 +48,46 @@ Feature: Step - addE()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter vid1 defined as "v[marko].id"
And the traversal of
"""
- g.V(vid1).as("a").out("created").addE("createdBy").to("a").property("weight", 2.0)
+ g.V(vid1).as("a").out("created").addE("createdBy").to("a").property("weight", 2.0d)
"""
When iterated to list
Then the result should have a count of 1
And the graph should return 7 for count of "g.E()"
And the graph should return 4 for count of "g.V(vid1).bothE()"
- And the graph should return 1 for count of "g.V(vid1).inE().has(\"weight\", 2.0)"
+ And the graph should return 1 for count of "g.V(vid1).inE().has(\"weight\", 2.0d)"
Scenario: g_V_outE_propertyXweight_nullX
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -101,18 +101,18 @@ Feature: Step - addE()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter vid1 defined as "v[marko].id"
And using the parameter vid2 defined as "v[vadas].id"
@@ -156,18 +156,18 @@ Feature: Step - addE()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter vid1 defined as "v[marko].id"
And using the parameter vid2 defined as "v[vadas].id"
@@ -198,18 +198,18 @@ Feature: Step - addE()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter vid1 defined as "v[marko].id"
And using the parameter vid2 defined as "v[vadas].id"
@@ -250,18 +250,18 @@ Feature: Step - addE()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter v1 defined as "v[marko]"
And using the parameter v6 defined as "v[peter]"
@@ -300,18 +300,18 @@ Feature: Step - addE()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter v1 defined as "v[marko]"
And the traversal of
@@ -330,18 +330,18 @@ Feature: Step - addE()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter v2 defined as "v[vadas]"
And the traversal of
@@ -360,18 +360,18 @@ Feature: Step - addE()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter v1 defined as "v[marko]"
And using the parameter v6 defined as "v[peter]"
@@ -390,18 +390,18 @@ Feature: Step - addE()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter v1 defined as "v[marko]"
And using the parameter v6 defined as "v[peter]"
diff --git a/gremlin-test/features/map/AddVertex.feature b/gremlin-test/features/map/AddVertex.feature
index 01fc14a..759817c 100644
--- a/gremlin-test/features/map/AddVertex.feature
+++ b/gremlin-test/features/map/AddVertex.feature
@@ -21,18 +21,18 @@ Feature: Step - addV()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter vid1 defined as "v[marko].id"
And the traversal of
@@ -47,18 +47,18 @@ Feature: Step - addV()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -72,18 +72,18 @@ Feature: Step - addV()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -97,18 +97,18 @@ Feature: Step - addV()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -118,22 +118,23 @@ Feature: Step - addV()
Then the result should have a count of 4
And the graph should return 2 for count of "g.V().properties(\"name\")"
+ @MultiMetaProperties
Scenario: g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -144,22 +145,23 @@ Feature: Step - addV()
And the graph should return 0 for count of "g.V().has(\"person\",\"name\",\"stephen\")"
And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"stephenm\")"
+ @MultiMetaProperties
Scenario: get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -171,22 +173,23 @@ Feature: Step - addV()
And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"stephenm\")"
And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"stephenm\").properties(\"name\").has(\"since\",2010)"
+ @MultiMetaProperties
Scenario: g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -198,22 +201,23 @@ Feature: Step - addV()
And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"marko\").properties(\"friendWeight\").has(\"acl\",\"private\")"
And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"marko\").properties(\"friendWeight\").count()"
+ @MultiMetaProperties
Scenario: g_addVXanimalX_propertyXname_mateoX_propertyXname_gateoX_propertyXname_cateoX_propertyXage_5X
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -227,18 +231,18 @@ Feature: Step - addV()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -250,22 +254,23 @@ Feature: Step - addV()
| marko |
And the graph should return 2 for count of "g.V().has(\"name\",\"marko\")"
+ @MultiMetaProperties
Scenario: g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -277,22 +282,23 @@ Feature: Step - addV()
And the graph should return 1 for count of "g.V().has(\"name\",\"stephenm\")"
And the graph should return 1 for count of "g.V().has(\"name\",\"stephenm\").properties(\"name\").has(\"since\",2010)"
+ @MultiMetaProperties
Scenario: g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -311,18 +317,18 @@ Feature: Step - addV()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -338,18 +344,18 @@ Feature: Step - addV()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -365,18 +371,18 @@ Feature: Step - addV()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
@@ -390,18 +396,18 @@ Feature: Step - addV()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And the traversal of
"""
diff --git a/gremlin-test/features/map/Graph.feature b/gremlin-test/features/map/Graph.feature
index d3e0fff..3e017d1 100644
--- a/gremlin-test/features/map/Graph.feature
+++ b/gremlin-test/features/map/Graph.feature
@@ -73,18 +73,18 @@ Feature: Step - V()
Given the empty graph
And the graph initializer of
"""
- g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
- addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
- addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
- addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
- addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
- addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
- addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
- addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
- addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
- addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
- addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
- addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
"""
And using the parameter xx1 defined as "l[v[lop],v[ripple]]"
And using the parameter vid1 defined as "v[marko].id"
diff --git a/gremlin-test/features/map/Match.feature b/gremlin-test/features/map/Match.feature
index fc60608..65ee6b2 100644
--- a/gremlin-test/features/map/Match.feature
+++ b/gremlin-test/features/map/Match.feature
@@ -58,12 +58,12 @@ Feature: Step - match()
When iterated to list
Then the result should be unordered
| result |
- | d[3].i |
- | d[2].i |
- | d[4].i |
- | d[5].i |
- | d[3].i |
- | d[3].i |
+ | v[lop].id |
+ | v[vadas].id |
+ | v[josh].id |
+ | v[ripple].id |
+ | v[lop].id |
+ | v[lop].id |
Scenario: g_V_matchXa_knows_b__b_created_cX
Given the modern graph
@@ -259,10 +259,10 @@ Feature: Step - match()
When iterated to list
Then the result should be unordered
| result |
- | m[{"a":1,"b":3,"c":4}] |
- | m[{"a":1,"b":3,"c":6}] |
- | m[{"a":4,"b":3,"c":1}] |
- | m[{"a":4,"b":3,"c":6}] |
+ | m[{"a":"v[marko].id","b":"v[lop].id","c":"v[josh].id"}] |
+ | m[{"a":"v[marko].id","b":"v[lop].id","c":"v[peter].id"}] |
+ | m[{"a":"v[josh].id","b":"v[lop].id","c":"v[marko].id"}] |
+ | m[{"a":"v[josh].id","b":"v[lop].id","c":"v[peter].id"}] |
Scenario: g_V_matchXa__a_both_b__b_both_cX_dedupXa_bX
Given the modern graph
@@ -272,20 +272,38 @@ Feature: Step - match()
__.as("b").both().as("c")).dedup("a", "b")
"""
When iterated to list
- Then the result should be unordered
+ Then the result should be of
| result |
| m[{"a":"v[marko]","b":"v[lop]","c":"v[marko]"}] |
+ | m[{"a":"v[marko]","b":"v[lop]","c":"v[josh]"}] |
+ | m[{"a":"v[marko]","b":"v[lop]","c":"v[peter]"}] |
| m[{"a":"v[marko]","b":"v[vadas]","c":"v[marko]"}] |
| m[{"a":"v[marko]","b":"v[josh]","c":"v[ripple]"}] |
+ | m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]"}] |
+ | m[{"a":"v[marko]","b":"v[josh]","c":"v[marko]"}] |
| m[{"a":"v[vadas]","b":"v[marko]","c":"v[lop]"}] |
+ | m[{"a":"v[vadas]","b":"v[marko]","c":"v[vadas]"}] |
+ | m[{"a":"v[vadas]","b":"v[marko]","c":"v[josh]"}] |
| m[{"a":"v[lop]","b":"v[marko]","c":"v[lop]"}] |
+ | m[{"a":"v[lop]","b":"v[marko]","c":"v[vadas]"}] |
+ | m[{"a":"v[lop]","b":"v[marko]","c":"v[josh]"}] |
| m[{"a":"v[lop]","b":"v[josh]","c":"v[ripple]"}] |
+ | m[{"a":"v[lop]","b":"v[josh]","c":"v[lop]"}] |
+ | m[{"a":"v[lop]","b":"v[josh]","c":"v[marko]"}] |
| m[{"a":"v[lop]","b":"v[peter]","c":"v[lop]"}] |
| m[{"a":"v[josh]","b":"v[ripple]","c":"v[josh]"}] |
| m[{"a":"v[josh]","b":"v[lop]","c":"v[marko]"}] |
+ | m[{"a":"v[josh]","b":"v[lop]","c":"v[josh]"}] |
+ | m[{"a":"v[josh]","b":"v[lop]","c":"v[peter]"}] |
| m[{"a":"v[josh]","b":"v[marko]","c":"v[lop]"}] |
+ | m[{"a":"v[josh]","b":"v[marko]","c":"v[vadas]"}] |
+ | m[{"a":"v[josh]","b":"v[marko]","c":"v[josh]"}] |
| m[{"a":"v[ripple]","b":"v[josh]","c":"v[ripple]"}] |
+ | m[{"a":"v[ripple]","b":"v[josh]","c":"v[lop]"}] |
+ | m[{"a":"v[ripple]","b":"v[josh]","c":"v[marko]"}] |
| m[{"a":"v[peter]","b":"v[lop]","c":"v[marko]"}] |
+ | m[{"a":"v[peter]","b":"v[lop]","c":"v[josh]"}] |
+ | m[{"a":"v[peter]","b":"v[lop]","c":"v[peter]"}] |
Scenario: g_V_matchXa_knows_b__b_created_lop__b_matchXb_created_d__d_0created_cX_selectXcX_cX_selectXa_b_cX
Given the modern graph
@@ -355,11 +373,38 @@ Feature: Step - match()
__.as("b").both().as("c")).dedup("a", "b").by(T.label)
"""
When iterated to list
- Then the result should be unordered
+ Then the result should be of
| result |
| m[{"a":"v[marko]","b":"v[lop]","c":"v[marko]"}] |
+ | m[{"a":"v[marko]","b":"v[lop]","c":"v[josh]"}] |
+ | m[{"a":"v[marko]","b":"v[lop]","c":"v[peter]"}] |
| m[{"a":"v[marko]","b":"v[vadas]","c":"v[marko]"}] |
+ | m[{"a":"v[marko]","b":"v[josh]","c":"v[ripple]"}] |
+ | m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]"}] |
+ | m[{"a":"v[marko]","b":"v[josh]","c":"v[marko]"}] |
+ | m[{"a":"v[vadas]","b":"v[marko]","c":"v[lop]"}] |
+ | m[{"a":"v[vadas]","b":"v[marko]","c":"v[vadas]"}] |
+ | m[{"a":"v[vadas]","b":"v[marko]","c":"v[josh]"}] |
| m[{"a":"v[lop]","b":"v[marko]","c":"v[lop]"}] |
+ | m[{"a":"v[lop]","b":"v[marko]","c":"v[vadas]"}] |
+ | m[{"a":"v[lop]","b":"v[marko]","c":"v[josh]"}] |
+ | m[{"a":"v[lop]","b":"v[josh]","c":"v[ripple]"}] |
+ | m[{"a":"v[lop]","b":"v[josh]","c":"v[lop]"}] |
+ | m[{"a":"v[lop]","b":"v[josh]","c":"v[marko]"}] |
+ | m[{"a":"v[lop]","b":"v[peter]","c":"v[lop]"}] |
+ | m[{"a":"v[josh]","b":"v[ripple]","c":"v[josh]"}] |
+ | m[{"a":"v[josh]","b":"v[lop]","c":"v[marko]"}] |
+ | m[{"a":"v[josh]","b":"v[lop]","c":"v[josh]"}] |
+ | m[{"a":"v[josh]","b":"v[lop]","c":"v[peter]"}] |
+ | m[{"a":"v[josh]","b":"v[marko]","c":"v[lop]"}] |
+ | m[{"a":"v[josh]","b":"v[marko]","c":"v[vadas]"}] |
+ | m[{"a":"v[josh]","b":"v[marko]","c":"v[josh]"}] |
+ | m[{"a":"v[ripple]","b":"v[josh]","c":"v[ripple]"}] |
+ | m[{"a":"v[ripple]","b":"v[josh]","c":"v[lop]"}] |
+ | m[{"a":"v[ripple]","b":"v[josh]","c":"v[marko]"}] |
+ | m[{"a":"v[peter]","b":"v[lop]","c":"v[marko]"}] |
+ | m[{"a":"v[peter]","b":"v[lop]","c":"v[josh]"}] |
+ | m[{"a":"v[peter]","b":"v[lop]","c":"v[peter]"}] |
Scenario: g_V_matchXa_created_b__b_0created_aX
Given the modern graph
diff --git a/gremlin-test/features/map/Order.feature b/gremlin-test/features/map/Order.feature
index ddb0c52..89cf9da 100644
--- a/gremlin-test/features/map/Order.feature
+++ b/gremlin-test/features/map/Order.feature
@@ -198,14 +198,14 @@ Feature: Step - order()
Given the modern graph
And the traversal of
"""
- g.V().map(__.bothE().values("weight").fold()).order().by(__.sum(Scope.local), Order.desc)
+ g.V().map(__.bothE().values("weight").order().by(Order.asc).fold()).order().by(__.sum(Scope.local), Order.desc)
"""
When iterated to list
Then the result should be ordered
| result |
- | l[d[1.0].d,d[0.4].d,d[1.0].d] |
+ | l[d[0.4].d,d[1.0].d,d[1.0].d] |
| l[d[0.4].d,d[0.5].d,d[1.0].d] |
- | l[d[0.4].d,d[0.4].d,d[0.2].d] |
+ | l[d[0.2].d,d[0.4].d,d[0.4].d] |
| l[d[1.0].d] |
| l[d[0.5].d] |
| l[d[0.2].d] |
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index 6da8ac6..84d8971 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -125,6 +125,7 @@ Feature: Step - select()
| m[{"a": "lop", "b": "lop"}] |
| m[{"a": "peter", "b": "peter"}] |
+ @MultiMetaProperties
Scenario: g_V_hasXname_gremlinX_inEXusesX_order_byXskill_ascX_asXaX_outV_asXbX_selectXa_bX_byXskillX_byXnameX
Given the crew graph
And the traversal of
diff --git a/gremlin-test/features/map/ShortestPath.feature b/gremlin-test/features/map/ShortestPath.feature
index 9ae01b2..2147985 100644
--- a/gremlin-test/features/map/ShortestPath.feature
+++ b/gremlin-test/features/map/ShortestPath.feature
@@ -299,6 +299,7 @@ Feature: Step - shortestPath()
| result |
| p[v[marko],v[lop],v[josh]] |
+ @MultiMetaProperties
Scenario: g_V_hasXname_danielX_shortestPath_targetXhasXname_stephenXX_edgesXbothEXusesXX
Given the crew graph
And the traversal of
diff --git a/gremlin-test/features/map/ValueMap.feature b/gremlin-test/features/map/ValueMap.feature
index 9818a96..8be2d30 100644
--- a/gremlin-test/features/map/ValueMap.feature
+++ b/gremlin-test/features/map/ValueMap.feature
@@ -183,6 +183,7 @@ Feature: Step - valueMap()
| m[{"name": ["josh"], "age": [32], "t[label]":"person", "t[id]":"v[josh].id"}] |
| m[{"name": ["peter"], "age": [35], "t[label]":"person", "t[id]":"v[peter].id"}] |
+ @MultiMetaProperties
Scenario: g_VX1X_valueMapXname_locationX_byXunfoldX_by
Given the crew graph
And using the parameter vid1 defined as "v[marko].id"
diff --git a/gremlin-test/features/map/Vertex.feature b/gremlin-test/features/map/Vertex.feature
index d1715d1..760ebb8 100644
--- a/gremlin-test/features/map/Vertex.feature
+++ b/gremlin-test/features/map/Vertex.feature
@@ -502,25 +502,39 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
| v[vadas] |
| v[josh] |
- # this test deviates from the setup of the java test, but the intent is the same. the java test drops lop and then
- # tries to query it as part of the group of ids. here, rather than drop, we simply use an id that doesn't exist
- # which is simulated by an edge identifier.
+
+
+ # 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
Scenario: g_VX1_2_3_4X_name
- Given the modern graph
+ Given the empty graph
+ And the graph initializer of
+ """
+ g.addV("person").property("name", "marko").property("age", 29).as("marko").
+ addV("person").property("name", "vadas").property("age", 27).as("vadas").
+ addV("software").property("name", "lop").property("lang", "java").as("lop").
+ addV("person").property("name","josh").property("age", 32).as("josh").
+ addV("software").property("name", "ripple").property("lang", "java").as("ripple").
+ addV("person").property("name", "peter").property("age", 35).as('peter').
+ addE("knows").from("marko").to("vadas").property("weight", 0.5d).
+ addE("knows").from("marko").to("josh").property("weight", 1.0d).
+ addE("created").from("marko").to("lop").property("weight", 0.4d).
+ addE("created").from("josh").to("ripple").property("weight", 1.0d).
+ addE("created").from("josh").to("lop").property("weight", 0.4d).
+ addE("created").from("peter").to("lop").property("weight", 0.2d)
+ """
And using the parameter vid1 defined as "v[marko].id"
And using the parameter vid2 defined as "v[vadas].id"
- And using the parameter vid3 defined as "e[marko-knows->josh].id"
+ And using the parameter vid3 defined as "v[lop].id"
And using the parameter vid4 defined as "v[josh].id"
And the traversal of
"""
- g.V(vid1, vid2, vid3, vid4).values("name")
+ g.V().has('software','name','lop').drop()
"""
When iterated to list
- Then the result should be unordered
- | result |
- | marko |
- | vadas |
- | josh |
+ Then the result should be empty
+ And the graph should return 3 for count of "g.V(vid1, vid2, vid3, vid4)"
Scenario: g_V_hasLabelXpersonX_V_hasLabelXsoftwareX_name
Given the modern graph
diff --git a/gremlin-test/features/sideEffect/Group.feature b/gremlin-test/features/sideEffect/Group.feature
index a8cf455..fde0c8d 100644
--- a/gremlin-test/features/sideEffect/Group.feature
+++ b/gremlin-test/features/sideEffect/Group.feature
@@ -239,17 +239,18 @@ Feature: Step - group()
| result |
| m[{"software":"d[2.0].d", "person":"d[5.0].d"}] |
+ # The post-ordering really isn't really right but works around TINKERPOP-2600
Scenario: g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX
Given the modern graph
- And using the parameter xx1 defined as "m[{\"marko\":[666], \"noone\":[\"blah\"]}]"
+ And using the parameter xx1 defined as "m[{\"marko\":[\"666\"], \"noone\":[\"blah\"]}]"
And the traversal of
"""
- g.withSideEffect("a", xx1).V().group("a").by("name").by(__.outE().label().fold()).cap("a")
+ g.withSideEffect("a", xx1).V().group("a").by("name").by(__.outE().label().fold()).cap("a").unfold().group().by(keys).by(select(values).order(Scope.local).by(Order.asc))
"""
When iterated to list
Then the result should be unordered
| result |
- | m[{"ripple":[], "peter":["created"], "noone":["blah"], "vadas":[], "josh":["created", "created"], "lop":[], "marko":[666, "created", "knows", "knows"]}] |
+ | m[{"ripple":[], "peter":["created"], "noone":["blah"], "vadas":[], "josh":["created", "created"], "lop":[], "marko":["666", "created", "knows", "knows"]}] |
Scenario: g_V_hasLabelXpersonX_asXpX_outXcreatedX_group_byXnameX_byXselectXpX_valuesXageX_sumX
Given the modern graph
diff --git a/gremlin-test/pom.xml b/gremlin-test/pom.xml
index 0ae28f7..05e000b 100644
--- a/gremlin-test/pom.xml
+++ b/gremlin-test/pom.xml
@@ -51,6 +51,17 @@ limitations under the License.
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>6.11.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apiguardian</groupId>
+ <artifactId>apiguardian-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apiguardian</groupId>
+ <artifactId>apiguardian-api</artifactId>
+ <version>1.1.2</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
index e1023ab..3bd136b 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
@@ -187,6 +187,9 @@ public final class StepDefinition {
@Before
public void beforeEachScenario(final Scenario scenario) throws Exception {
+ if (scenario.getName().equals("g_VX1_2_3_4X_name"))
+ System.out.println("stop!");
+
world.beforeEachScenario(scenario);
stringParameters.clear();
if (traversal != null) {
@@ -200,6 +203,7 @@ public final class StepDefinition {
@After
public void afterEachScenario() throws Exception {
world.afterEachScenario();
+ if (g != null) g.close();
}
@Given("the {word} graph")
diff --git a/neo4j-gremlin/pom.xml b/neo4j-gremlin/pom.xml
index 8a2b011..d97e20a 100644
--- a/neo4j-gremlin/pom.xml
+++ b/neo4j-gremlin/pom.xml
@@ -51,6 +51,12 @@ limitations under the License.
</exclusions>
</dependency>
<dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>4.2.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jGraphFeatureTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jGraphFeatureTest.java
new file mode 100644
index 0000000..61363c0
--- /dev/null
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jGraphFeatureTest.java
@@ -0,0 +1,191 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.neo4j;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Stage;
+import io.cucumber.guice.CucumberModules;
+import io.cucumber.guice.GuiceFactory;
+import io.cucumber.guice.InjectorSource;
+import io.cucumber.java.Scenario;
+import io.cucumber.junit.Cucumber;
+import io.cucumber.junit.CucumberOptions;
+import org.apache.commons.configuration2.MapConfiguration;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.features.World;
+import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoResourceAccess;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
+
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ tags = "not @RemoteOnly and not @MultiMetaProperties",
+ glue = { "org.apache.tinkerpop.gremlin.features" },
+ objectFactory = GuiceFactory.class,
+ features = { "../gremlin-test/features" },
+ plugin = {"pretty", "junit:target/cucumber.xml"})
+public class Neo4jGraphFeatureTest {
+ private static final Logger logger = LoggerFactory.getLogger(Neo4jGraphFeatureTest.class);
+
+ public static final class ServiceModule extends AbstractModule {
+ @Override
+ protected void configure() {
+ bind(World.class).to(Neo4jGraphWorld.class);
+ }
+ }
+
+ public static class Neo4jGraphWorld implements World {
+
+ private static final Neo4jGraph modern = Neo4jGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.MODERN)));
+ private static final Neo4jGraph classic = Neo4jGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.CLASSIC)));
+ private static final Neo4jGraph sink = Neo4jGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.SINK)));
+ private static final Neo4jGraph grateful = Neo4jGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.GRATEFUL)));
+ private static final Neo4jGraph empty = Neo4jGraph.open(new MapConfiguration(getBaseConfiguration(null)));
+
+ static {
+ createIndices();
+ readIntoGraph(modern, GraphData.MODERN);
+ readIntoGraph(classic, GraphData.CLASSIC);
+ readIntoGraph(sink, GraphData.SINK);
+ readIntoGraph(grateful, GraphData.GRATEFUL);
+ }
+
+ @Override
+ public GraphTraversalSource getGraphTraversalSource(final GraphData graphData) {
+ if (null == graphData)
+ return empty.traversal();
+ else if (graphData == GraphData.CLASSIC)
+ return classic.traversal();
+ else if (graphData == GraphData.CREW)
+ throw new UnsupportedOperationException("The Crew dataset is not supported by Neo4j because it doesn't support mult/meta-properties");
+ else if (graphData == GraphData.MODERN)
+ return modern.traversal();
+ else if (graphData == GraphData.SINK)
+ return sink.traversal();
+ else if (graphData == GraphData.GRATEFUL)
+ return grateful.traversal();
+ else
+ throw new UnsupportedOperationException("GraphData not supported: " + graphData.name());
+ }
+
+ @Override
+ public void beforeEachScenario(final Scenario scenario) {
+ cleanEmpty();
+ }
+
+ private static void createIndices() {
+ grateful.tx().readWrite();
+ grateful.cypher("CREATE INDEX ON :artist(name)").iterate();
+ grateful.cypher("CREATE INDEX ON :song(name)").iterate();
+ grateful.cypher("CREATE INDEX ON :song(songType)").iterate();
+ grateful.cypher("CREATE INDEX ON :song(performances)").iterate();
+ grateful.tx().commit();
+
+ modern.tx().readWrite();
+ modern.cypher("CREATE INDEX ON :person(name)").iterate();
+ modern.cypher("CREATE INDEX ON :person(age)").iterate();
+ modern.cypher("CREATE INDEX ON :software(name)").iterate();
+ modern.cypher("CREATE INDEX ON :software(lang)").iterate();
+ modern.tx().commit();
+
+ classic.tx().readWrite();
+ classic.cypher("CREATE INDEX ON :vertex(name)").iterate();
+ classic.cypher("CREATE INDEX ON :vertex(age)").iterate();
+ classic.cypher("CREATE INDEX ON :vertex(lang)").iterate();
+ classic.tx().commit();
+ }
+
+ private void cleanEmpty() {
+ final GraphTraversalSource g = empty.traversal();
+ g.V().drop().iterate();
+ }
+
+ private static void readIntoGraph(final Graph graph, final GraphData graphData) {
+ try {
+ final String dataFile = TestHelper.generateTempFileFromResource(graph.getClass(),
+ GryoResourceAccess.class, graphData.location().substring(graphData.location().lastIndexOf(File.separator) + 1), "", false).getAbsolutePath();
+ graph.traversal().io(dataFile).read().iterate();
+ } catch (IOException ioe) {
+ throw new IllegalStateException(ioe);
+ }
+ }
+
+ private static String getWorkingDirectory() {
+ return TestHelper.makeTestDataDirectory(Neo4jGraphFeatureTest.class, "graph-provider-data");
+ }
+
+ private static String makeTestDirectory(final String graphName) {
+ return getWorkingDirectory() + File.separator
+ + RandomStringUtils.randomAlphabetic(10) + File.separator
+ + TestHelper.cleanPathSegment(graphName);
+ }
+
+ private static Map<String, Object> getBaseConfiguration(final LoadGraphWith.GraphData graphData) {
+ final String directory = makeTestDirectory(graphData == null ? "default" : graphData.name().toLowerCase());
+
+ final File f = new File(directory);
+ if (f.exists()) deleteDirectory(f);
+ f.mkdirs();
+
+ return new HashMap<String, Object>() {{
+ put(Graph.GRAPH, Neo4jGraph.class.getName());
+ put(Neo4jGraph.CONFIG_DIRECTORY, directory);
+ put(Neo4jGraph.CONFIG_CONF + ".dbms.memory.pagecache.size", "1m");
+ }};
+ }
+
+ static void deleteDirectory(final File directory) {
+ if (directory.exists()) {
+ for (File file : directory.listFiles()) {
+ if (file.isDirectory()) {
+ deleteDirectory(file);
+ } else {
+ file.delete();
+ }
+ }
+ directory.delete();
+ }
+
+ if (directory.exists()) logger.error("unable to delete directory " + directory.getAbsolutePath());
+ }
+ }
+
+ public static final class WorldInjectorSource implements InjectorSource {
+ @Override
+ public Injector getInjector() {
+ return Guice.createInjector(Stage.PRODUCTION, CucumberModules.createScenarioModule(), new ServiceModule());
+ }
+ }
+
+}
diff --git a/neo4j-gremlin/src/test/resources/cucumber.properties b/neo4j-gremlin/src/test/resources/cucumber.properties
new file mode 100644
index 0000000..bbb9128
--- /dev/null
+++ b/neo4j-gremlin/src/test/resources/cucumber.properties
@@ -0,0 +1 @@
+guice.injector-source=org.apache.tinkerpop.gremlin.neo4j.Neo4jGraphFeatureTest$WorldInjectorSource
\ No newline at end of file
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
index 51896ea..478fee1 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
@@ -28,6 +28,8 @@ import io.cucumber.guice.InjectorSource;
import io.cucumber.java.Scenario;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
+import org.apache.commons.configuration2.BaseConfiguration;
+import org.apache.commons.configuration2.Configuration;
import org.apache.tinkerpop.gremlin.features.World;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
@@ -63,7 +65,7 @@ public class TinkerGraphFeatureTest {
@Override
public GraphTraversalSource getGraphTraversalSource(final GraphData graphData) {
if (null == graphData)
- return TinkerGraph.open().traversal();
+ return TinkerGraph.open(getNumberIdManagerConfiguration()).traversal();
else if (graphData == GraphData.CLASSIC)
return classic.traversal();
else if (graphData == GraphData.CREW)
@@ -86,4 +88,11 @@ public class TinkerGraphFeatureTest {
}
}
+ private static Configuration getNumberIdManagerConfiguration() {
+ final Configuration conf = new BaseConfiguration();
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER, TinkerGraph.DefaultIdManager.LONG.name());
+ return conf;
+ }
}
[tinkerpop] 09/18: TINKERPOP-2601 Improved support around
withComputer() testing
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit aaa73b06c8b7d8369d6c80c4b53046372d29d68f
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Sep 8 12:33:14 2021 -0400
TINKERPOP-2601 Improved support around withComputer() testing
Adjusted the grammar to allow an existing GraphTraversalSource to be used. Modified the test runners to better trigger use of withComputer() rather than embedding it into the tests themselves. Added many more tags to give runners more control over how the tests are executed. Developed a method by which TinkerGraph can do multiple runs with multiple World implementations.
---
docs/src/dev/developer/for-committers.asciidoc | 10 ++
.../grammar/GraphTraversalSourceVisitor.java | 14 ++-
.../language/grammar/GremlinAntlrToJava.java | 35 ++++++
.../Gherkin/CommonSteps.cs | 5 +
.../Gherkin/GherkinTestRunner.cs | 2 +
.../Gherkin/ScenarioData.cs | 1 +
.../test/cucumber/feature-steps.js | 5 +
.../gremlin-javascript/test/cucumber/world.js | 5 +
.../src/main/python/radish/feature_steps.py | 7 +-
gremlin-test/features/branch/Choose.feature | 2 +
gremlin-test/features/branch/Local.feature | 1 +
gremlin-test/features/branch/Optional.feature | 5 +-
gremlin-test/features/branch/Repeat.feature | 8 +-
gremlin-test/features/filter/And.feature | 1 +
gremlin-test/features/filter/Dedup.feature | 5 +-
gremlin-test/features/filter/Range.feature | 5 +
gremlin-test/features/filter/SimplePath.feature | 1 +
gremlin-test/features/filter/Tail.feature | 22 ++--
gremlin-test/features/filter/Where.feature | 8 ++
gremlin-test/features/map/Coalesce.feature | 3 +-
.../features/map/ConnectedComponent.feature | 12 +-
gremlin-test/features/map/Count.feature | 1 +
gremlin-test/features/map/ElementMap.feature | 1 +
gremlin-test/features/map/Loops.feature | 3 +
gremlin-test/features/map/Match.feature | 4 +
gremlin-test/features/map/Math.feature | 3 +
gremlin-test/features/map/Min.feature | 1 +
gremlin-test/features/map/PageRank.feature | 23 ++--
gremlin-test/features/map/Path.feature | 4 +
gremlin-test/features/map/PeerPressure.feature | 9 +-
gremlin-test/features/map/Select.feature | 7 ++
gremlin-test/features/map/ShortestPath.feature | 32 ++---
gremlin-test/features/map/Unfold.feature | 1 +
gremlin-test/features/map/Vertex.feature | 1 +
gremlin-test/features/sideEffect/Group.feature | 7 +-
gremlin-test/features/sideEffect/Sack.feature | 2 +
.../gremlin/features/AbstractGuiceFactory.java | 56 +++++++++
.../tinkerpop/gremlin/features/StepDefinition.java | 7 +-
.../gremlin/hadoop/HadoopGraphFeatureTest.java | 9 +-
.../gremlin/spark/SparkGraphFeatureTest.java | 48 ++++++--
.../TinkerGraphComputerFeatureTest.java | 52 ++++++++
.../tinkergraph/TinkerGraphFeatureTest.java | 70 ++---------
.../gremlin/tinkergraph/TinkerGraphWorld.java | 137 +++++++++++++++++++++
.../io.cucumber.core.backend.ObjectFactory | 2 +
44 files changed, 492 insertions(+), 145 deletions(-)
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index 60ba841..457a5f2 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -486,6 +486,16 @@ include or ignore certain tests. The tags enable the practical and necessary abi
they simply cannot support. It is important to be aware of the following tags when writing tests as not including a
tag when one is necessary will cause provider tests to fail:
+* `@GraphComputerVerificationInjectionNotSupported` - The scenario will not work on with `GraphComputer` because the
+`inject()` step is not supported.
+* `@GraphComputerVerificationMidVNotSupported` - The scenario will not work on with `GraphComputer` because the
+mid-`V()` step is not supported.
+* `@GraphComputerVerificationOneBulk` - The scenario will not work because `withBulk(false)` is configured and that
+is not compatible with `GraphComputer`
+* `@GraphComputerVerificationReferenceOnly` - The scenario itself is not written to support `GraphComputer` because it
+tries to reference inaccessible properties that are on elements only available by "reference" (i.e `T.id` only).
+* `@GraphComputerVerificationStarGraphExceeded` - The scenario itself is not written to support `GraphComputer` because
+the traversal does not mind the star graph limitation.
* `@MultiMetaProperties` - The scenario uses "The Crew" graph as a dataset or otherwise utilizes multi-properties
or meta-properties for creating or querying data.
* `@RemoteOnly` - The scenario uses some Gremlin syntax that cannot be supported outside of remote test executions. The
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GraphTraversalSourceVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GraphTraversalSourceVisitor.java
index 6d44337..bf30941 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GraphTraversalSourceVisitor.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GraphTraversalSourceVisitor.java
@@ -29,14 +29,24 @@ public class GraphTraversalSourceVisitor extends GremlinBaseVisitor<GraphTravers
private final Graph graph;
private final GremlinAntlrToJava antlr;
private final String traversalSourceName;
+ private final GraphTraversalSource g;
+ /**
+ * Constructs the visitor and if the {@link GremlinAntlrToJava} has a {@link GraphTraversalSource} assigned to it,
+ * the visitor will prefer that "g" rather than creating a new one from the associated {@link Graph} instance.
+ */
public GraphTraversalSourceVisitor(final GremlinAntlrToJava antlr) {
this(TRAVERSAL_ROOT, antlr);
}
+ /**
+ * Same as {@link #GraphTraversalSourceVisitor(GremlinAntlrToJava)} but allows the traversal source name to be
+ * configured to something other than "g".
+ */
public GraphTraversalSourceVisitor(final String traversalSourceName, final GremlinAntlrToJava antlr) {
this.graph = antlr.graph;
this.antlr = antlr;
+ this.g = antlr.g;
this.traversalSourceName = traversalSourceName;
}
@@ -47,13 +57,13 @@ public class GraphTraversalSourceVisitor extends GremlinBaseVisitor<GraphTravers
public GraphTraversalSource visitTraversalSource(final GremlinParser.TraversalSourceContext ctx) {
if (ctx.getChildCount() == 1) {
// handle source method only
- return graph.traversal();
+ return null == g ? graph.traversal() : g;
} else {
final int childIndexOfSelfMethod = 2;
GraphTraversalSource source;
if (ctx.getChild(0).getText().equals(traversalSourceName)) {
// handle single traversal source
- source = graph.traversal();
+ source = null == g ? graph.traversal() : g;
} else {
// handle chained self method
final int childIndexOfTraversalSource = 0;
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinAntlrToJava.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinAntlrToJava.java
index cb3afff..a06d5e7 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinAntlrToJava.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinAntlrToJava.java
@@ -44,6 +44,11 @@ public class GremlinAntlrToJava extends GremlinBaseVisitor<Object> {
final Graph graph;
/**
+ * The "g" from which to start the traversal.
+ */
+ final GraphTraversalSource g;
+
+ /**
* A {@link GremlinBaseVisitor} that processes {@link TraversalSource} methods.
*/
final GremlinBaseVisitor<GraphTraversalSource> gvisitor;
@@ -84,6 +89,14 @@ public class GremlinAntlrToJava extends GremlinBaseVisitor<Object> {
}
/**
+ * Constructs a new instance that is bound to the specified {@link GraphTraversalSource} and thus spawns the
+ * {@link Traversal} from this "g" rather than from a fresh one constructed from the {@link Graph} instance.
+ */
+ public GremlinAntlrToJava(final GraphTraversalSource g) {
+ this(g, __::start);
+ }
+
+ /**
* Constructs a new instance that is bound to the specified {@link Graph} instance with an override to using
* {@link __} for constructing anonymous {@link Traversal} instances. Assumes that "g" is the name of the
* {@link GraphTraversalSource}.
@@ -93,6 +106,14 @@ public class GremlinAntlrToJava extends GremlinBaseVisitor<Object> {
}
/**
+ * Constructs a new instance that is bound to the specified {@link GraphTraversalSource} and thus spawns the
+ * {@link Traversal} from this "g" rather than from a fresh one constructed from the {@link Graph} instance.
+ */
+ protected GremlinAntlrToJava(final GraphTraversalSource g, final Supplier<GraphTraversal<?,?>> createAnonymous) {
+ this(GraphTraversalSourceVisitor.TRAVERSAL_ROOT, g.getGraph(), createAnonymous, g);
+ }
+
+ /**
* Constructs a new instance that is bound to the specified {@link Graph} instance with an override to using
* {@link __} for constructing anonymous {@link Traversal} instances.
*
@@ -100,6 +121,20 @@ public class GremlinAntlrToJava extends GremlinBaseVisitor<Object> {
*/
protected GremlinAntlrToJava(final String traversalSourceName, final Graph graph,
final Supplier<GraphTraversal<?,?>> createAnonymous) {
+ this(traversalSourceName, graph, createAnonymous, null);
+ }
+
+ /**
+ * Constructs a new instance that is bound to the specified {@link Graph} instance with an override to using
+ * {@link __} for constructing anonymous {@link Traversal} instances. If the {@link GraphTraversalSource} is
+ * provided then the {@link Traversal} will spawn from it as opposed to a fresh one from the {@link Graph} instance.
+ *
+ * @param traversalSourceName The name of the traversal source which will be "g" if not specified.
+ */
+ protected GremlinAntlrToJava(final String traversalSourceName, final Graph graph,
+ final Supplier<GraphTraversal<?,?>> createAnonymous,
+ final GraphTraversalSource g) {
+ this.g = g;
this.graph = graph;
this.gvisitor = new GraphTraversalSourceVisitor(
null == traversalSourceName ? GraphTraversalSourceVisitor.TRAVERSAL_ROOT : traversalSourceName,this);
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
index 0c17cc3..a2941eb 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
@@ -114,6 +114,11 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{
throw new InvalidOperationException("g should be a traversal source");
}
+
+ if (ScenarioData.CurrentFeature.Tags.Select(t => t.Name).ToList().Contains("@GraphComputerOnly"))
+ {
+ _g = _g.WithComputer();
+ }
_traversal =
Gremlin.UseTraversal(ScenarioData.CurrentScenario.Name, _g, _parameters);
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index ce33709..4cc21d5 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -143,6 +143,8 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
}
scenarioData.CurrentScenario = scenario;
+ scenarioData.CurrentFeature = feature;
+
var result = ExecuteStep(stepDefinition, currentStep.Value, step);
if (result != null)
{
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
index 28979a3..99731fe 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
@@ -50,6 +50,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
private readonly RemoteConnectionFactory _connectionFactory;
public Scenario CurrentScenario;
+ public Feature CurrentFeature;
public ScenarioDataPerGraph GetByGraphName(string name)
{
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 07be9f9..49a7891 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -80,6 +80,11 @@ Given(/^the (.+) graph$/, function (graphName) {
this.graphName = graphName;
const data = this.getData();
this.g = traversal().withRemote(data.connection);
+
+ if (this.isGraphComputer) {
+ this.g = this.g.withComputer();
+ }
+
if (graphName === 'empty') {
return this.cleanEmptyGraph();
}
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
index b9211c0..aae38df 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
@@ -38,6 +38,7 @@ function TinkerPopWorld(){
this.cache = null;
this.graphName = null;
this.parameters = {};
+ this.isGraphComputer = false;
}
TinkerPopWorld.prototype.getData = function () {
@@ -95,6 +96,10 @@ Before(function (info) {
this.cache = cache;
});
+Before({tags: "@GraphComputerOnly"}, function() {
+ this.isGraphComputer = true;
+})
+
function getVertices(connection) {
const g = traversal().withRemote(connection);
return g.V().group().by('name').by(__.tail()).next().then(it => it.value);
diff --git a/gremlin-python/src/main/python/radish/feature_steps.py b/gremlin-python/src/main/python/radish/feature_steps.py
index fe1ea44..82ec15b 100644
--- a/gremlin-python/src/main/python/radish/feature_steps.py
+++ b/gremlin-python/src/main/python/radish/feature_steps.py
@@ -79,7 +79,12 @@ def add_parameter(step, param_name, param):
def translate_traversal(step):
step.context.ignore = step.text in ignores
p = step.context.traversal_params if hasattr(step.context, "traversal_params") else {}
- p['g'] = step.context.g
+ localg = step.context.g
+ tagset = [ tag.name for tag in step.all_tags ]
+ print(str(tagset))
+ if "GraphComputerOnly" in tagset:
+ localg = step.context.g.withComputer()
+ p['g'] = localg
step.context.traversal = step.context.traversals.pop(0)(**p)
diff --git a/gremlin-test/features/branch/Choose.feature b/gremlin-test/features/branch/Choose.feature
index 42d7257..9696563 100644
--- a/gremlin-test/features/branch/Choose.feature
+++ b/gremlin-test/features/branch/Choose.feature
@@ -141,6 +141,7 @@ Feature: Step - choose()
| result |
| m[{"young":"d[1].l", "old":"d[3].l"}] |
+ @GraphComputerVerificationInjectionNotSupported
Scenario: g_injectX1X_chooseXisX1X__constantX10Xfold__foldX
Given the empty graph
And using the parameter xx1 defined as "d[10].i"
@@ -154,6 +155,7 @@ Feature: Step - choose()
| result |
| l[d[10].i] |
+ @GraphComputerVerificationInjectionNotSupported
Scenario: g_injectX2X_chooseXisX1X__constantX10Xfold__foldX
Given the empty graph
And using the parameter xx1 defined as "d[10].i"
diff --git a/gremlin-test/features/branch/Local.feature b/gremlin-test/features/branch/Local.feature
index e3e8099..315235e 100644
--- a/gremlin-test/features/branch/Local.feature
+++ b/gremlin-test/features/branch/Local.feature
@@ -168,6 +168,7 @@ Feature: Step - local()
| marko |
| marko |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_localXmatchXproject__created_person__person_name_nameX_selectXname_projectX_by_byXnameX
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/branch/Optional.feature b/gremlin-test/features/branch/Optional.feature
index 26d33b4..7ac8ff4 100644
--- a/gremlin-test/features/branch/Optional.feature
+++ b/gremlin-test/features/branch/Optional.feature
@@ -42,6 +42,7 @@ Feature: Step - choose()
| result |
| v[marko] |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_hasLabelXpersonX_optionalXoutXknowsX_optionalXoutXcreatedXXX_path
Given the modern graph
And the traversal of
@@ -60,7 +61,8 @@ Feature: Step - choose()
| p[v[vadas]] |
| p[v[josh]] |
| p[v[peter]] |
-
+
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_optionalXout_optionalXoutXX_path
Given the modern graph
And the traversal of
@@ -81,6 +83,7 @@ Feature: Step - choose()
| p[v[ripple]] |
| p[v[peter],v[lop]] |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_VX1X_optionalXaddVXdogXX_label
Given the empty graph
And the graph initializer of
diff --git a/gremlin-test/features/branch/Repeat.feature b/gremlin-test/features/branch/Repeat.feature
index bc2f520..cfc8d6b 100644
--- a/gremlin-test/features/branch/Repeat.feature
+++ b/gremlin-test/features/branch/Repeat.feature
@@ -48,6 +48,7 @@ Feature: Step - repeat()
| marko |
| marko |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_repeatXoutE_inVX_timesX2X_path_by_name_by_label
Given the modern graph
And the traversal of
@@ -223,6 +224,7 @@ Feature: Step - repeat()
| result |
| m[{"ripple":"d[3].l","vadas":"d[3].l","josh":"d[4].l","lop":"d[10].l","marko":"d[4].l"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_hasXname_markoX_repeatXoutE_inV_simplePathX_untilXhasXname_rippleXX_path_byXnameX_byXlabelX
Given the modern graph
And the traversal of
@@ -238,6 +240,7 @@ Feature: Step - repeat()
| created |
| ripple |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_hasXloop_name_loopX_repeatXinX_timesX5X_path_by_name
Given the sink graph
And the traversal of
@@ -254,6 +257,7 @@ Feature: Step - repeat()
| loop |
| loop |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_repeatXout_repeatXoutX_timesX1XX_timesX1X_limitX1X_path_by_name
Given the modern graph
And the traversal of
@@ -266,7 +270,7 @@ Feature: Step - repeat()
| marko |
| josh |
| ripple |
-
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_repeatXoutXknowsXX_untilXrepeatXoutXcreatedXX_emitXhasXname_lopXXX_path_byXnameX
Given the modern graph
And the traversal of
@@ -314,6 +318,7 @@ Feature: Step - repeat()
| java |
| java |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_VX3X_repeatXbothX_createdXX_untilXloops_is_40XXemit_repeatXin_knowsXX_emit_loopsXisX1Xdedup_values
Given the modern graph
And using the parameter vid3 defined as "v[lop].id"
@@ -353,6 +358,7 @@ Feature: Step - repeat()
| java |
| java |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_VX6X_repeatXa_bothXcreatedX_simplePathX_emitXrepeatXb_bothXknowsXX_untilXloopsXbX_asXb_whereXloopsXaX_asXbX_hasXname_vadasXX_dedup_name
Given the modern graph
And using the parameter vid6 defined as "v[peter].id"
diff --git a/gremlin-test/features/filter/And.feature b/gremlin-test/features/filter/And.feature
index b368707..3ced5db 100644
--- a/gremlin-test/features/filter/And.feature
+++ b/gremlin-test/features/filter/And.feature
@@ -42,6 +42,7 @@ Feature: Step - and()
| josh |
| peter |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_asXaX_outXknowsX_and_outXcreatedX_inXcreatedX_asXaX_name
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/filter/Dedup.feature b/gremlin-test/features/filter/Dedup.feature
index 228205f..0cf9c21 100644
--- a/gremlin-test/features/filter/Dedup.feature
+++ b/gremlin-test/features/filter/Dedup.feature
@@ -70,9 +70,10 @@ Feature: Step - dedup()
g.V().both().has(T.label, "software").dedup().by("lang").values("name")
"""
When iterated to list
- Then the result should be unordered
+ Then the result should be of
| result |
| lop |
+ | ripple |
Scenario: g_V_both_name_order_byXa_bX_dedup_value
Given the modern graph
@@ -143,6 +144,7 @@ Feature: Step - dedup()
| result |
| m[{"software":[0.2,0.4,1.0],"person":[0.2,0.4,0.5,1.0]}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_both_asXbX_dedupXa_bX_byXlabelX_selectXa_bX
Given the modern graph
And the traversal of
@@ -246,6 +248,7 @@ Feature: Step - dedup()
| d[0].l |
# https://issues.apache.org/jira/browse/TINKERPOP-2529
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_both_group_by_byXout_dedup_foldX_unfold_selectXvaluesX_unfold_out_order_byXnameX_limitX1X_valuesXnameX
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/filter/Range.feature b/gremlin-test/features/filter/Range.feature
index 1bb9d53..c3dc520 100644
--- a/gremlin-test/features/filter/Range.feature
+++ b/gremlin-test/features/filter/Range.feature
@@ -171,6 +171,7 @@ Feature: Step - range()
| m[{"b":"josh"}] |
| m[{"b":"josh"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_rangeXlocal_1_3X
Given the modern graph
And the traversal of
@@ -183,6 +184,7 @@ Feature: Step - range()
| l[josh,ripple] |
| l[josh,lop] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_rangeXlocal_1_2X
Given the modern graph
And the traversal of
@@ -208,6 +210,7 @@ Feature: Step - range()
| josh |
| peter |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_rangeXlocal_4_5X
Given the modern graph
And the traversal of
@@ -228,6 +231,7 @@ Feature: Step - range()
| result |
| l[d[0.4].d,d[0.5].d,d[1.0].d,d[1.0].d] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_in_asXaX_in_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_limitXlocal_1X
Given the modern graph
And the traversal of
@@ -240,6 +244,7 @@ Feature: Step - range()
| lop |
| ripple |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_in_asXaX_in_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_limitXlocal_2X
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/filter/SimplePath.feature b/gremlin-test/features/filter/SimplePath.feature
index c97de36..d1e2d13 100644
--- a/gremlin-test/features/filter/SimplePath.feature
+++ b/gremlin-test/features/filter/SimplePath.feature
@@ -59,6 +59,7 @@ Feature: Step - simplePath()
| p[v[peter],v[lop],v[josh],v[ripple]] |
| p[v[peter],v[lop],v[josh],v[marko]] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXbX_out_asXcX_simplePath_byXlabelX_fromXbX_toXcX_path_byXnameX
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/filter/Tail.feature b/gremlin-test/features/filter/Tail.feature
index 95d5cb7..a2ae496 100644
--- a/gremlin-test/features/filter/Tail.feature
+++ b/gremlin-test/features/filter/Tail.feature
@@ -70,21 +70,11 @@ Feature: Step - tail()
| vadas |
Scenario: g_V_repeatXbothX_timesX3X_tailX7X
- Given the modern graph
- And the traversal of
+ Given an unsupported test
+ Then nothing should happen because
"""
- g.V().repeat(__.bothE().order().by('weight',Order.asc).otherV()).times(3).tail(7)
+ This test is not easily asserted given limitations on ordering.
"""
- When iterated to list
- Then the result should be unordered
- | result |
- | v[ripple] |
- | v[ripple] |
- | v[josh] |
- | v[josh] |
- | v[josh] |
- | v[marko] |
- | v[marko] |
Scenario: g_V_repeatXin_outX_timesX3X_tailX7X_count
Given the modern graph
@@ -97,6 +87,7 @@ Feature: Step - tail()
| result |
| d[7].l |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXaX_byXunfold_valuesXnameX_foldX_tailXlocal_1X
Given the modern graph
And the traversal of
@@ -109,6 +100,7 @@ Feature: Step - tail()
| ripple |
| lop |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXaX_byXunfold_valuesXnameX_foldX_tailXlocalX
Given the modern graph
And the traversal of
@@ -145,6 +137,7 @@ Feature: Step - tail()
| m[{"c":"ripple"}] |
| m[{"c":"lop"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_tailXlocal_1X
Given the modern graph
And the traversal of
@@ -157,6 +150,7 @@ Feature: Step - tail()
| ripple |
| lop |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_tailXlocalX
Given the modern graph
And the traversal of
@@ -169,6 +163,7 @@ Feature: Step - tail()
| ripple |
| lop |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXlimitXlocal_0XX_tailXlocal_1X
Given the modern graph
And the traversal of
@@ -178,6 +173,7 @@ Feature: Step - tail()
When iterated to list
Then the result should be empty
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXaX_out_asXaX_selectXmixed_aX_byXunfold_valuesXnameX_foldX_tailXlocal_2X
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/filter/Where.feature b/gremlin-test/features/filter/Where.feature
index 6266675..27e0e46 100644
--- a/gremlin-test/features/filter/Where.feature
+++ b/gremlin-test/features/filter/Where.feature
@@ -117,6 +117,7 @@ Feature: Step - where()
| josh |
| peter |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXasXbX_outXcreatedX_hasXname_rippleXX_valuesXage_nameX
Given the modern graph
And using the parameter vid1 defined as "v[marko].id"
@@ -209,6 +210,7 @@ Feature: Step - where()
| lop |
| ripple |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX
Given the modern graph
And the traversal of
@@ -234,6 +236,7 @@ Feature: Step - where()
| vadas |
| josh |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_outXcreatedX_asXbX_whereXandXasXbX_in__notXasXaX_outXcreatedX_hasXname_rippleXXX_selectXa_bX
Given the modern graph
And the traversal of
@@ -258,6 +261,7 @@ Feature: Step - where()
| m[{"a": "v[marko]", "b": "v[lop]", "c": "v[josh]", "d": "v[vadas]"}] |
| m[{"a": "v[peter]", "b": "v[lop]", "c": "v[josh]", "d": "v[vadas]"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXbX_whereXin_count_isXeqX3XX_or_whereXoutXcreatedX_and_hasXlabel_personXXX_selectXa_bX
Given the modern graph
And the traversal of
@@ -272,6 +276,7 @@ Feature: Step - where()
| m[{"a": "v[josh]", "b": "v[lop]"}] |
| m[{"a": "v[peter]", "b": "v[lop]"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_gtXbXX_byXageX_selectXa_bX_byXnameX
Given the modern graph
And the traversal of
@@ -285,6 +290,7 @@ Feature: Step - where()
| m[{"a": "peter", "b": "marko"}] |
| m[{"a": "peter", "b": "josh"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX
Given the modern graph
And the traversal of
@@ -299,6 +305,7 @@ Feature: Step - where()
| m[{"a": "josh", "c": "lop"}] |
| m[{"a": "peter", "c": "lop"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX
Given the modern graph
And the traversal of
@@ -313,6 +320,7 @@ Feature: Step - where()
| m[{"a": "peter", "c": "lop", "d": "marko"}] |
| m[{"a": "peter", "c": "lop", "d": "josh"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_VX1X_asXaX_out_hasXageX_whereXgtXaXX_byXageX_name
Given the modern graph
And using the parameter vid1 defined as "v[marko].id"
diff --git a/gremlin-test/features/map/Coalesce.feature b/gremlin-test/features/map/Coalesce.feature
index 028cd58..dd5820b 100644
--- a/gremlin-test/features/map/Coalesce.feature
+++ b/gremlin-test/features/map/Coalesce.feature
@@ -63,6 +63,7 @@ Feature: Step - coalesce()
| result |
| m[{"ripple":"d[1].l", "vadas":"d[1].l", "josh":"d[1].l", "lop":"d[2].l"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_coalesceXoutEXknowsX_outEXcreatedXX_otherV_path_byXnameX_byXlabelX
Given the modern graph
And the traversal of
@@ -85,7 +86,7 @@ Feature: Step - coalesce()
g.V().out("created").order().by("name").coalesce(__.values("name"), __.constant("x"))
"""
When iterated to list
- Then the result should be ordered
+ Then the result should be unordered
| result |
| lop |
| lop |
diff --git a/gremlin-test/features/map/ConnectedComponent.feature b/gremlin-test/features/map/ConnectedComponent.feature
index 3933a6c..95b5cb7 100644
--- a/gremlin-test/features/map/ConnectedComponent.feature
+++ b/gremlin-test/features/map/ConnectedComponent.feature
@@ -15,14 +15,14 @@
# specific language governing permissions and limitations
# under the License.
-@StepClassMap @StepConnectedComponent
+@GraphComputerOnly @StepClassMap @StepConnectedComponent
Feature: Step - connectedComponent()
-
+
Scenario: g_V_connectedComponent_hasXcomponentX
Given the modern graph
And the traversal of
"""
- g.withComputer().V().connectedComponent().has("gremlin.connectedComponentVertexProgram.component")
+ g.V().connectedComponent().has("gremlin.connectedComponentVertexProgram.component")
"""
When iterated to list
Then the result should be unordered
@@ -38,7 +38,7 @@ Feature: Step - connectedComponent()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().dedup().connectedComponent().has("gremlin.connectedComponentVertexProgram.component")
+ g.V().dedup().connectedComponent().has("gremlin.connectedComponentVertexProgram.component")
"""
When iterated to list
Then the result should be unordered
@@ -54,7 +54,7 @@ Feature: Step - connectedComponent()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().hasLabel("software").connectedComponent().project("name","component").by("name").by("gremlin.connectedComponentVertexProgram.component")
+ g.V().hasLabel("software").connectedComponent().project("name","component").by("name").by("gremlin.connectedComponentVertexProgram.component")
"""
When iterated to list
Then the result should be unordered
@@ -66,7 +66,7 @@ Feature: Step - connectedComponent()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().hasLabel("person").connectedComponent().with("~tinkerpop.connectedComponent.edges", __.bothE("knows")).with("~tinkerpop.connectedComponent.propertyName", "cluster").project("name","cluster").by("name").by("cluster")
+ g.V().hasLabel("person").connectedComponent().with("~tinkerpop.connectedComponent.edges", __.bothE("knows")).with("~tinkerpop.connectedComponent.propertyName", "cluster").project("name","cluster").by("name").by("cluster")
"""
When iterated to list
Then the result should be unordered
diff --git a/gremlin-test/features/map/Count.feature b/gremlin-test/features/map/Count.feature
index 474233a..7db93d2 100644
--- a/gremlin-test/features/map/Count.feature
+++ b/gremlin-test/features/map/Count.feature
@@ -73,6 +73,7 @@ Feature: Step - count()
| result |
| d[0].l |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_whereXinXkknowsX_outXcreatedX_count_is_0XX_name
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/map/ElementMap.feature b/gremlin-test/features/map/ElementMap.feature
index 1188783..4ebcddb 100644
--- a/gremlin-test/features/map/ElementMap.feature
+++ b/gremlin-test/features/map/ElementMap.feature
@@ -50,6 +50,7 @@ Feature: Step - elementMap()
| m[{"t[id]": "v[lop].id", "t[label]": "software", "name": "lop"}] |
| m[{"t[id]": "v[ripple].id", "t[label]": "software", "name": "ripple"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_EX11X_elementMap
Given the modern graph
And using the parameter eid11 defined as "e[josh-created->lop].id"
diff --git a/gremlin-test/features/map/Loops.feature b/gremlin-test/features/map/Loops.feature
index 9032180..fe3701a 100644
--- a/gremlin-test/features/map/Loops.feature
+++ b/gremlin-test/features/map/Loops.feature
@@ -18,6 +18,7 @@
@StepClassMap @StepLoops
Feature: Step - loops()
+ @GraphComputerVerificationReferenceOnly
Scenario: g_VX1X_repeatXboth_simplePathX_untilXhasXname_peterX_or_loops_isX3XX_hasXname_peterX_path_byXnameX
Given the modern graph
And using the parameter vid1 defined as "v[marko].id"
@@ -31,6 +32,7 @@ Feature: Step - loops()
| p[marko,lop,peter] |
| p[marko,josh,lop,peter] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_VX1X_repeatXboth_simplePathX_untilXhasXname_peterX_or_loops_isX2XX_hasXname_peterX_path_byXnameX
Given the modern graph
And using the parameter vid1 defined as "v[marko].id"
@@ -43,6 +45,7 @@ Feature: Step - loops()
| result |
| p[marko,lop,peter] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_VX1X_repeatXboth_simplePathX_untilXhasXname_peterX_and_loops_isX3XX_hasXname_peterX_path_byXnameX
Given the modern graph
And using the parameter vid1 defined as "v[marko].id"
diff --git a/gremlin-test/features/map/Match.feature b/gremlin-test/features/map/Match.feature
index 6ec49fd..be926fc 100644
--- a/gremlin-test/features/map/Match.feature
+++ b/gremlin-test/features/map/Match.feature
@@ -124,6 +124,7 @@ Feature: Step - match()
| m[{"a":"v[marko]","b":"v[josh]","c":"v[ripple]","d":"v[vadas]"}] |
| m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]","d":"v[vadas]"}] |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_matchXa_created_lop_b__b_0created_29_c__c_whereXrepeatXoutX_timesX2XXX
Given the modern graph
And the traversal of
@@ -162,6 +163,7 @@ Feature: Step - match()
| m[{"a":"v[marko]","b":"v[vadas]"}] |
| m[{"a":"v[marko]","b":"v[josh]"}] |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_matchXa_created_lop_b__b_0created_29_cX_whereXc_repeatXoutX_timesX2XX_selectXa_b_cX
Given the modern graph
And the traversal of
@@ -336,6 +338,7 @@ Feature: Step - match()
| m[{"a":"v[marko]","b":"v[vadas]","c":"v[lop]"}] |
| m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_matchXwhereXandXa_created_b__b_0created_count_isXeqX3XXXX__a_both_b__whereXb_inXX
Given the modern graph
And the traversal of
@@ -366,6 +369,7 @@ Feature: Step - match()
| m[{"a":"josh","b":"ripple"}] |
| m[{"a":"peter","b":"lop"}] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_matchXa_both_b__b_both_cX_dedupXa_bX_byXlabelX
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/map/Math.feature b/gremlin-test/features/map/Math.feature
index b797425..768f37c 100644
--- a/gremlin-test/features/map/Math.feature
+++ b/gremlin-test/features/map/Math.feature
@@ -48,6 +48,7 @@ Feature: Step - math()
| d[54.0].d |
| d[70.0].d |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_outXknowsX_asXbX_mathXa_plus_bX_byXageX
Given the modern graph
And the traversal of
@@ -75,6 +76,7 @@ Feature: Step - math()
| d[132.0].d |
| d[135.0].d |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_outXcreatedX_asXbX_mathXb_plus_aX_byXinXcreatedX_countX_byXageX
Given the modern graph
And the traversal of
@@ -89,6 +91,7 @@ Feature: Step - math()
| d[35.0].d |
| d[38.0].d |
+ @GraphComputerVerificationInjectionNotSupported
Scenario: g_withSackX1X_injectX1X_repeatXsackXsumX_byXconstantX1XXX_timesX5X_emit_mathXsin__X_byXsackX
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/map/Min.feature b/gremlin-test/features/map/Min.feature
index acb5d04..193e340 100644
--- a/gremlin-test/features/map/Min.feature
+++ b/gremlin-test/features/map/Min.feature
@@ -146,6 +146,7 @@ Feature: Step - min()
| result |
| m[{"ripple":"d[1.0].d","lop":"d[0.2].d"}] |
+ @GraphComputerVerificationInjectionNotSupported
Scenario: g_V_foo_injectX9999999999X_min
Given the modern graph
And using the parameter xx1 defined as "d[9999999999].l"
diff --git a/gremlin-test/features/map/PageRank.feature b/gremlin-test/features/map/PageRank.feature
index d80cab0..a0f003e 100644
--- a/gremlin-test/features/map/PageRank.feature
+++ b/gremlin-test/features/map/PageRank.feature
@@ -15,14 +15,14 @@
# specific language governing permissions and limitations
# under the License.
-@StepClassMap @StepPageRank
+@GraphComputerOnly @StepClassMap @StepPageRank
Feature: Step - pageRank()
-
+
Scenario: g_V_pageRank_hasXpageRankX
Given the modern graph
And the traversal of
"""
- g.withComputer().V().pageRank().has("gremlin.pageRankVertexProgram.pageRank")
+ g.V().pageRank().has("gremlin.pageRankVertexProgram.pageRank")
"""
When iterated to list
Then the result should be unordered
@@ -33,13 +33,12 @@ Feature: Step - pageRank()
| v[josh] |
| v[ripple] |
| v[peter] |
- And the graph should return 6 for count of "g.withComputer().V().pageRank().has(\"gremlin.pageRankVertexProgram.pageRank\")"
Scenario: g_V_outXcreatedX_pageRank_withXedges_bothEX_withXpropertyName_projectRankX_withXtimes_0X_valueMapXname_projectRankX
Given the modern graph
And the traversal of
"""
- g.withComputer().V().out("created").pageRank().with("~tinkerpop.pageRank.edges",__.bothE()).with("~tinkerpop.pageRank.propertyName","projectRank").with("~tinkerpop.pageRank.times",0).valueMap("name", "projectRank")
+ g.V().out("created").pageRank().with("~tinkerpop.pageRank.edges",__.bothE()).with("~tinkerpop.pageRank.propertyName","projectRank").with("~tinkerpop.pageRank.times",0).valueMap("name", "projectRank")
"""
When iterated to list
Then the result should be unordered
@@ -53,7 +52,7 @@ Feature: Step - pageRank()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank", Order.desc).by("name").values("name")
+ g.V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank", Order.desc).by("name").values("name")
"""
When iterated to list
Then the result should be ordered
@@ -69,7 +68,7 @@ Feature: Step - pageRank()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank", Order.desc).values("name").limit(2)
+ g.V().pageRank().order().by("gremlin.pageRankVertexProgram.pageRank", Order.desc).values("name").limit(2)
"""
When iterated to list
Then the result should be ordered
@@ -81,7 +80,7 @@ Feature: Step - pageRank()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().pageRank().with("~tinkerpop.pageRank.edges",__.outE("knows")).with("~tinkerpop.pageRank.propertyName","friendRank").project("name", "friendRank").by("name").by(__.values("friendRank").math("ceil(_ * 100)"))
+ g.V().pageRank().with("~tinkerpop.pageRank.edges",__.outE("knows")).with("~tinkerpop.pageRank.propertyName","friendRank").project("name", "friendRank").by("name").by(__.values("friendRank").math("ceil(_ * 100)"))
"""
When iterated to list
Then the result should be unordered
@@ -97,7 +96,7 @@ Feature: Step - pageRank()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().hasLabel("person").pageRank().with("~tinkerpop.pageRank.propertyName","pageRank").project("name", "pageRank").by("name").by(__.values("pageRank").math("ceil(_ * 100)"))
+ g.V().hasLabel("person").pageRank().with("~tinkerpop.pageRank.propertyName","pageRank").project("name", "pageRank").by("name").by(__.values("pageRank").math("ceil(_ * 100)"))
"""
When iterated to list
Then the result should be unordered
@@ -111,7 +110,7 @@ Feature: Step - pageRank()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().pageRank().with("~tinkerpop.pageRank.propertyName","pageRank").as("a").out("knows").values("pageRank").as("b").select("a", "b").by().by(__.math("ceil(_ * 100)"))
+ g.V().pageRank().with("~tinkerpop.pageRank.propertyName","pageRank").as("a").out("knows").values("pageRank").as("b").select("a", "b").by().by(__.math("ceil(_ * 100)"))
"""
When iterated to list
Then the result should be unordered
@@ -123,7 +122,7 @@ Feature: Step - pageRank()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().hasLabel("software").has("name", "ripple").pageRank(1.0).with("~tinkerpop.pageRank.edges",__.inE("created")).with("~tinkerpop.pageRank.times",1).with("~tinkerpop.pageRank.propertyName","priors").in("created").union(__.both(), __.identity()).valueMap("name", "priors")
+ g.V().hasLabel("software").has("name", "ripple").pageRank(1.0).with("~tinkerpop.pageRank.edges",__.inE("created")).with("~tinkerpop.pageRank.times",1).with("~tinkerpop.pageRank.propertyName","priors").in("created").union(__.both(), __.identity()).valueMap("name", "priors")
"""
When iterated to list
Then the result should be unordered
@@ -137,7 +136,7 @@ Feature: Step - pageRank()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().out("created").group("m").by(T.label).pageRank(1.0).with("~tinkerpop.pageRank.propertyName", "pageRank").with("~tinkerpop.pageRank.edges",__.inE()).with("~tinkerpop.pageRank.times", 1).in("created").group("m").by("pageRank").cap("m")
+ g.V().out("created").group("m").by(T.label).pageRank(1.0).with("~tinkerpop.pageRank.propertyName", "pageRank").with("~tinkerpop.pageRank.edges",__.inE()).with("~tinkerpop.pageRank.times", 1).in("created").group("m").by("pageRank").cap("m")
"""
When iterated next
Then the result should have a count of 3
\ No newline at end of file
diff --git a/gremlin-test/features/map/Path.feature b/gremlin-test/features/map/Path.feature
index 9dc86ba..c31d1dc 100644
--- a/gremlin-test/features/map/Path.feature
+++ b/gremlin-test/features/map/Path.feature
@@ -30,6 +30,7 @@ Feature: Step - path()
| result |
| p[v[marko],marko] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_VX1X_out_path_byXageX_byXnameX
Given the modern graph
And using the parameter vid1 defined as "v[marko].id"
@@ -44,6 +45,7 @@ Feature: Step - path()
| p[d[29].i,vadas] |
| p[d[29].i,josh] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_repeatXoutX_timesX2X_path_byXitX_byXnameX_byXlangX
Given the modern graph
And the traversal of
@@ -56,6 +58,7 @@ Feature: Step - path()
| p[v[marko],josh,java] |
| p[v[marko],josh,java] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_out_out_path_byXnameX_byXageX
Given the modern graph
And the traversal of
@@ -93,6 +96,7 @@ Feature: Step - path()
| p[v[marko],e[marko-created->lop],v[lop],e[josh-created->lop],v[josh]] |
| p[v[marko],e[marko-created->lop],v[lop],e[peter-created->lop],v[peter]] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_out_asXbX_out_asXcX_path_fromXbX_toXcX_byXnameX
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/map/PeerPressure.feature b/gremlin-test/features/map/PeerPressure.feature
index 29f5c13..ed01125 100644
--- a/gremlin-test/features/map/PeerPressure.feature
+++ b/gremlin-test/features/map/PeerPressure.feature
@@ -15,14 +15,14 @@
# specific language governing permissions and limitations
# under the License.
-@StepClassMap @StepPeerPressure
+@GraphComputerOnly @StepClassMap @StepPeerPressure
Feature: Step - peerPressure()
Scenario: g_V_peerPressure_hasXclusterX
Given the modern graph
And the traversal of
"""
- g.withComputer().V().peerPressure().has("gremlin.peerPressureVertexProgram.cluster")
+ g.V().peerPressure().has("gremlin.peerPressureVertexProgram.cluster")
"""
When iterated to list
Then the result should be unordered
@@ -33,13 +33,12 @@ Feature: Step - peerPressure()
| v[josh] |
| v[ripple] |
| v[peter] |
- And the graph should return 6 for count of "g.withComputer().V().peerPressure().has(\"gremlin.peerPressureVertexProgram.cluster\")"
Scenario: g_V_peerPressure_withXpropertyName_clusterX_withXedges_outEXknowsXX_pageRankX1X_byXrankX_withXedges_outEXknowsX_withXtimes_2X_group_byXclusterX_byXrank_sumX_limitX100X
Given the modern graph
And the traversal of
"""
- g.withComputer().V().peerPressure().with("~tinkerpop.peerPressure.propertyName","cluster").with("~tinkerpop.peerPressure.edges",__.outE("knows")).pageRank(1.0).with("~tinkerpop.pageRank.propertyName", "rank").with("~tinkerpop.pageRank.edges", __.outE("knows")).with("~tinkerpop.pageRank.times", 1).group().by("cluster").by(__.values("rank").sum()).limit(100)
+ g.V().peerPressure().with("~tinkerpop.peerPressure.propertyName","cluster").with("~tinkerpop.peerPressure.edges",__.outE("knows")).pageRank(1.0).with("~tinkerpop.pageRank.propertyName", "rank").with("~tinkerpop.pageRank.edges", __.outE("knows")).with("~tinkerpop.pageRank.times", 1).group().by("cluster").by(__.values("rank").sum()).limit(100)
"""
When iterated to list
Then the result should be unordered
@@ -50,7 +49,7 @@ Feature: Step - peerPressure()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().has("name", "ripple").in("created").peerPressure().with("~tinkerpop.peerPressure.edges",__.outE()).with("~tinkerpop.peerPressure.propertyName", "cluster").repeat(__.union(__.identity(), __.both())).times(2).dedup().valueMap("name", "cluster")
+ g.V().has("name", "ripple").in("created").peerPressure().with("~tinkerpop.peerPressure.edges",__.outE()).with("~tinkerpop.peerPressure.propertyName", "cluster").repeat(__.union(__.identity(), __.both())).times(2).dedup().valueMap("name", "cluster")
"""
When iterated to list
Then the result should be unordered
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index 485372d..a69dcc4 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -342,6 +342,7 @@ Feature: Step - select()
| result |
| m[{"ripple":"d[1].l", "lop":"d[6].l"}] |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_untilXout_outX_repeatXin_asXaXX_selectXaX_byXtailXlocalX_nameX
Given the modern graph
And the traversal of
@@ -371,6 +372,7 @@ Feature: Step - select()
| d[0.4].d |
| d[0.2].d |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_hasLabelXsoftwareX_asXnameX_asXlanguageX_asXcreatorsX_selectXname_language_creatorsX_byXnameX_byXlangX_byXinXcreatedX_name_fold_orderXlocalXX
Given the modern graph
And the traversal of
@@ -412,6 +414,7 @@ Feature: Step - select()
| d[2].l |
| d[1].l |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_untilXout_outX_repeatXin_asXaX_in_asXbXX_selectXa_bX_byXnameX
Given the modern graph
And the traversal of
@@ -462,6 +465,7 @@ Feature: Step - select()
| v[marko] |
| v[marko] |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_outXknowsX_asXbX_localXselectXa_bX_byXnameXX
Given the modern graph
And the traversal of
@@ -522,6 +526,7 @@ Feature: Step - select()
| d[2].l |
| d[2].l |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX
Given the modern graph
And the traversal of
@@ -538,6 +543,7 @@ Feature: Step - select()
| d[1].l |
| d[1].l |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_groupXmX_by_byXbothE_countX_barrier_selectXmX_selectXselectXaXX_byXmathX_plus_XX
Given the modern graph
And the traversal of
@@ -554,6 +560,7 @@ Feature: Step - select()
| d[2].d |
| d[2].d |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_V_asXaX_outXknowsX_asXaX_selectXall_constantXaXX
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/map/ShortestPath.feature b/gremlin-test/features/map/ShortestPath.feature
index bfe1925..1393812 100644
--- a/gremlin-test/features/map/ShortestPath.feature
+++ b/gremlin-test/features/map/ShortestPath.feature
@@ -15,14 +15,14 @@
# specific language governing permissions and limitations
# under the License.
-@StepClassMap @StepShortestPath
+@GraphComputerOnly @StepClassMap @StepShortestPath
Feature: Step - shortestPath()
Scenario: g_V_shortestPath
Given the modern graph
And the traversal of
"""
- g.withComputer().V().shortestPath()
+ g.V().shortestPath()
"""
When iterated to list
Then the result should be unordered
@@ -68,7 +68,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().both().dedup().shortestPath()
+ g.V().both().dedup().shortestPath()
"""
When iterated to list
Then the result should be unordered
@@ -114,7 +114,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().shortestPath().with("~tinkerpop.shortestPath.includeEdges")
+ g.V().shortestPath().with("~tinkerpop.shortestPath.includeEdges")
"""
When iterated to list
Then the result should be unordered
@@ -160,7 +160,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().shortestPath().with("~tinkerpop.shortestPath.edges", Direction.IN)
+ g.V().shortestPath().with("~tinkerpop.shortestPath.edges", Direction.IN)
"""
When iterated to list
Then the result should be unordered
@@ -183,7 +183,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().shortestPath().with("~tinkerpop.shortestPath.edges", __.outE())
+ g.V().shortestPath().with("~tinkerpop.shortestPath.edges", __.outE())
"""
When iterated to list
Then the result should be unordered
@@ -206,7 +206,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().shortestPath().
+ g.V().shortestPath().
with("~tinkerpop.shortestPath.includeEdges").
with("~tinkerpop.shortestPath.edges", __.outE())
"""
@@ -231,7 +231,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().has("name","marko").shortestPath()
+ g.V().has("name","marko").shortestPath()
"""
When iterated to list
Then the result should be unordered
@@ -247,7 +247,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().shortestPath().with("~tinkerpop.shortestPath.target", __.has("name","marko"))
+ g.V().shortestPath().with("~tinkerpop.shortestPath.target", __.has("name","marko"))
"""
When iterated to list
Then the result should be unordered
@@ -263,7 +263,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().shortestPath().with("~tinkerpop.shortestPath.target", __.values("name").is("marko"))
+ g.V().shortestPath().with("~tinkerpop.shortestPath.target", __.values("name").is("marko"))
"""
When iterated to list
Then the result should be unordered
@@ -279,7 +279,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().has("name","marko").shortestPath().with("~tinkerpop.shortestPath.target", __.hasLabel("software"))
+ g.V().has("name","marko").shortestPath().with("~tinkerpop.shortestPath.target", __.hasLabel("software"))
"""
When iterated to list
Then the result should be unordered
@@ -291,7 +291,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().has("name","marko").shortestPath().
+ g.V().has("name","marko").shortestPath().
with("~tinkerpop.shortestPath.target", __.has("name","josh")).
with("~tinkerpop.shortestPath.distance", "weight")
"""
@@ -305,7 +305,7 @@ Feature: Step - shortestPath()
Given the crew graph
And the traversal of
"""
- g.withComputer().V().has("name","daniel").shortestPath().
+ g.V().has("name","daniel").shortestPath().
with("~tinkerpop.shortestPath.target", __.has("name","stephen")).
with("~tinkerpop.shortestPath.edges", __.bothE("uses"))
"""
@@ -319,7 +319,7 @@ Feature: Step - shortestPath()
Given the grateful graph
And the traversal of
"""
- g.withComputer().V().has("song","name","MIGHT AS WELL").
+ g.V().has("song","name","MIGHT AS WELL").
shortestPath().
with("~tinkerpop.shortestPath.target", __.has("song","name","MAYBE YOU KNOW HOW I FEEL")).
with("~tinkerpop.shortestPath.edges", __.outE("followedBy")).
@@ -335,7 +335,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().has("name","marko").shortestPath().with("~tinkerpop.shortestPath.maxDistance", 1)
+ g.V().has("name","marko").shortestPath().with("~tinkerpop.shortestPath.maxDistance", 1)
"""
When iterated to list
Then the result should be unordered
@@ -349,7 +349,7 @@ Feature: Step - shortestPath()
Given the modern graph
And the traversal of
"""
- g.withComputer().V().has("name","vadas").shortestPath().
+ g.V().has("name","vadas").shortestPath().
with("~tinkerpop.shortestPath.distance", "weight").
with("~tinkerpop.shortestPath.maxDistance", 1.3)
"""
diff --git a/gremlin-test/features/map/Unfold.feature b/gremlin-test/features/map/Unfold.feature
index 68c295d..b687db9 100644
--- a/gremlin-test/features/map/Unfold.feature
+++ b/gremlin-test/features/map/Unfold.feature
@@ -57,6 +57,7 @@ Feature: Step - unfold()
| name |
| age |
+ @GraphComputerVerificationReferenceOnly
Scenario: g_VX1X_repeatXboth_simplePathX_untilXhasIdX6XX_path_byXnameX_unfold
Given the modern graph
And using the parameter vid1 defined as "v[marko].id"
diff --git a/gremlin-test/features/map/Vertex.feature b/gremlin-test/features/map/Vertex.feature
index 121a0d7..37738bb 100644
--- a/gremlin-test/features/map/Vertex.feature
+++ b/gremlin-test/features/map/Vertex.feature
@@ -537,6 +537,7 @@ Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
Then the result should be empty
And the graph should return 3 for count of "g.V(vid1, vid2, vid3, vid4)"
+ @GraphComputerVerificationMidVNotSupported
Scenario: g_V_hasLabelXpersonX_V_hasLabelXsoftwareX_name
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/sideEffect/Group.feature b/gremlin-test/features/sideEffect/Group.feature
index 54b0435..e7c83a7 100644
--- a/gremlin-test/features/sideEffect/Group.feature
+++ b/gremlin-test/features/sideEffect/Group.feature
@@ -99,12 +99,12 @@ Feature: Step - group()
Given the modern graph
And the traversal of
"""
- g.V().group().by(__.outE().count()).by("name")
+ g.V().order().by("name").group().by(__.outE().count()).by("name")
"""
When iterated to list
Then the result should be unordered
| result |
- | m[{"d[0].l":["vadas","lop","ripple"],"d[1].l":["peter"],"d[2].l":["josh"],"d[3].l":["marko"]}] |
+ | m[{"d[0].l":["lop","ripple","vadas"],"d[1].l":["peter"],"d[2].l":["josh"],"d[3].l":["marko"]}] |
Scenario: g_V_groupXaX_byXlabelX_byXoutE_weight_sumX_capXaX
Given the modern graph
@@ -218,6 +218,7 @@ Feature: Step - group()
| result |
| m[{"cover":{"followedBy":"d[777982].l"}, "":{"followedBy":"d[179350].l"}, "original":{"followedBy":"d[2185613].l"}}] |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX
Given the modern graph
And the traversal of
@@ -253,6 +254,7 @@ Feature: Step - group()
| result |
| m[{"ripple":[], "peter":["created"], "noone":["blah"], "vadas":[], "josh":["created", "created"], "lop":[], "marko":["666", "created", "knows", "knows"]}] |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_hasLabelXpersonX_asXpX_outXcreatedX_group_byXnameX_byXselectXpX_valuesXageX_sumX
Given the modern graph
And the traversal of
@@ -264,6 +266,7 @@ Feature: Step - group()
| result |
| m[{"ripple":"d[32].l", "lop":"d[96].l"}] |
+ @GraphComputerVerificationStarGraphExceeded
Scenario: g_V_hasLabelXpersonX_asXpX_outXcreatedX_groupXaX_byXnameX_byXselectXpX_valuesXageX_sumX_capXaX
Given the modern graph
And the traversal of
diff --git a/gremlin-test/features/sideEffect/Sack.feature b/gremlin-test/features/sideEffect/Sack.feature
index 5f243c2..0ce1ad0 100644
--- a/gremlin-test/features/sideEffect/Sack.feature
+++ b/gremlin-test/features/sideEffect/Sack.feature
@@ -57,6 +57,7 @@ Feature: Step - sack()
| d[2.0].m |
| d[1.4].m |
+ @GraphComputerVerificationOneBulk
Scenario: g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack
Given the modern graph
And using the parameter vid1 defined as "v[marko].id"
@@ -69,6 +70,7 @@ Feature: Step - sack()
| result |
| d[1.0].m |
+ @GraphComputerVerificationOneBulk
Scenario: g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack
Given the modern graph
And the traversal of
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/AbstractGuiceFactory.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/AbstractGuiceFactory.java
new file mode 100644
index 0000000..13c17b9
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/AbstractGuiceFactory.java
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.features;
+
+import com.google.inject.Injector;
+import io.cucumber.core.backend.ObjectFactory;
+import io.cucumber.guice.ScenarioScope;
+
+/**
+ * Base class for implementing a custom {@code ObjectFactory} for cucumber tests and is based on the basic
+ * {@code GuiceFactory} implementation which can't be extended. That implementation works well when there is only
+ * single {@link World} implementation to test or if the requirements are such that system properties or environment
+ * variables can otherwise suffice in controlling the test environment to the provider's satisfaction. In other cases,
+ * it may simply be easier to create a custom {@code ObjectFactory} from this class, register it in
+ * {@code META-INF/services/io.cucumber.core.backend.ObjectFactory} and then reference it directly in the
+ * {@code CucumberOptions} annotation for the test class.
+ */
+public class AbstractGuiceFactory implements ObjectFactory {
+ private final Injector injector;
+
+ protected AbstractGuiceFactory(final Injector injector) {
+ this.injector = injector;
+ }
+
+ public boolean addClass(final Class<?> clazz) {
+ return true;
+ }
+
+ public void start() {
+ injector.getInstance(ScenarioScope.class).enterScope();
+ }
+
+ public void stop() {
+ injector.getInstance(ScenarioScope.class).exitScope();
+ }
+
+ public <T> T getInstance(final Class<T> clazz) {
+ return injector.getInstance(clazz);
+ }
+}
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
index e5095e3..ebf04fc 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
@@ -38,7 +38,6 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.T;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
import org.apache.tinkerpop.shaded.jackson.databind.JsonNode;
import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
@@ -47,7 +46,6 @@ import org.javatuples.Triplet;
import org.junit.AssumptionViolatedException;
import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
-import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.inV;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.collection.IsIn.in;
import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
@@ -313,13 +311,10 @@ public final class StepDefinition {
//////////////////////////////////////////////
private Traversal parseGremlin(final String script) {
- if (script.contains(".withComputer("))
- throw new AssumptionViolatedException("withComputer() syntax is not supported by gremlin-language at this time");
-
final GremlinLexer lexer = new GremlinLexer(CharStreams.fromString(script));
final GremlinParser parser = new GremlinParser(new CommonTokenStream(lexer));
final GremlinParser.QueryContext ctx = parser.query();
- return (Traversal) new GremlinAntlrToJava(g.getGraph()).visitQuery(ctx);
+ return (Traversal) new GremlinAntlrToJava(g).visitQuery(ctx);
}
private List<Object> translateResultsToActual() {
diff --git a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
index 8f8f6a4..998b6c2 100644
--- a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
+++ b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
@@ -29,8 +29,6 @@ import io.cucumber.java.Scenario;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.apache.commons.configuration2.MapConfiguration;
-import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.tinkerpop.gremlin.LoadGraphWith;
import org.apache.tinkerpop.gremlin.TestHelper;
import org.apache.tinkerpop.gremlin.features.TestFiles;
import org.apache.tinkerpop.gremlin.features.World;
@@ -42,10 +40,7 @@ import org.apache.tinkerpop.gremlin.structure.Graph;
import org.javatuples.Pair;
import org.junit.AssumptionViolatedException;
import org.junit.runner.RunWith;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -56,14 +51,12 @@ import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
@RunWith(Cucumber.class)
@CucumberOptions(
- tags = "not @RemoteOnly and not @MultiMetaProperties",
+ tags = "not @RemoteOnly and not @GraphComputerOnly",
glue = { "org.apache.tinkerpop.gremlin.features" },
objectFactory = GuiceFactory.class,
features = { "../gremlin-test/features" },
plugin = {"pretty", "junit:target/cucumber.xml"})
public class HadoopGraphFeatureTest {
- private static final Logger logger = LoggerFactory.getLogger(HadoopGraphFeatureTest.class);
-
private static final String skipReasonLength = "Hadoop-Gremlin is OLAP-oriented and for OLTP operations, linear-scan joins are required. This particular tests takes many minutes to execute.";
private static final List<Pair<String, String>> skip = new ArrayList<Pair<String,String>>() {{
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
index 9112448..21a11ff 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
@@ -46,26 +46,25 @@ import org.apache.tinkerpop.gremlin.structure.Graph;
import org.javatuples.Pair;
import org.junit.AssumptionViolatedException;
import org.junit.runner.RunWith;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
+import java.util.stream.Collectors;
import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
@RunWith(Cucumber.class)
@CucumberOptions(
- tags = "not @RemoteOnly and not @MultiMetaProperties",
+ tags = "not @RemoteOnly",
glue = { "org.apache.tinkerpop.gremlin.features" },
objectFactory = GuiceFactory.class,
features = { "../gremlin-test/features" },
plugin = {"pretty", "junit:target/cucumber.xml"})
public class SparkGraphFeatureTest {
- private static final Logger logger = LoggerFactory.getLogger(SparkGraphFeatureTest.class);
private static final int AVAILABLE_PROCESSORS = Runtime.getRuntime().availableProcessors();
private static final String skipReasonLength = "Spark-Gremlin is OLAP-oriented and for OLTP operations, linear-scan joins are required. This particular tests takes many minutes to execute.";
@@ -86,6 +85,27 @@ public class SparkGraphFeatureTest {
add(Pair.with("g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count", skipReasonLength));
}};
+ private static final List<String> TAGS_TO_IGNORE = Arrays.asList(
+ "@StepDrop",
+ "@StepV",
+ "@StepConnectedComponent", // need to implement this in the grammar
+ "@StepIndex", // doesn't look like this works with Spark atm - doesn't serialize (IndexTest not in the ProcessComputerSuite)
+ "@GraphComputerVerificationOneBulk",
+ "@GraphComputerVerificationMidVNotSupported",
+ "@GraphComputerVerificationInjectionNotSupported",
+ "@GraphComputerVerificationStarGraphExceeded",
+ "@GraphComputerVerificationReferenceOnly");
+
+ private static final List<String> SCENARIOS_TO_IGNORE = Arrays.asList(
+ "g_V_group_byXoutE_countX_byXnameX",
+ "g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_descX",
+ "g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX",
+ "g_V_group_byXageX",
+ "g_V_order_byXoutE_count_descX",
+ "g_V_both_both_dedup_byXoutE_countX_name",
+ "g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_descX",
+ "g_V_hasLabelXsoftwareX_order_byXnameX_index_withXmapX");
+
public static final class ServiceModule extends AbstractModule {
@Override
protected void configure() {
@@ -114,15 +134,15 @@ public class SparkGraphFeatureTest {
if (null == graphData)
throw new AssumptionViolatedException("HadoopGraph does not support graph mutations");
else if (graphData == GraphData.CLASSIC)
- return classic.traversal().withComputer(Computer.compute(SparkGraphComputer.class));
+ return classic.traversal().withComputer(Computer.compute(SparkGraphComputer.class).workers(AVAILABLE_PROCESSORS));
else if (graphData == GraphData.CREW)
- return crew.traversal().withComputer(Computer.compute(SparkGraphComputer.class));
+ return crew.traversal().withComputer(Computer.compute(SparkGraphComputer.class).workers(AVAILABLE_PROCESSORS));
else if (graphData == GraphData.MODERN)
- return modern.traversal().withComputer(Computer.compute(SparkGraphComputer.class));
+ return modern.traversal().withComputer(Computer.compute(SparkGraphComputer.class).workers(AVAILABLE_PROCESSORS));
else if (graphData == GraphData.SINK)
- return sink.traversal().withComputer(Computer.compute(SparkGraphComputer.class));
+ return sink.traversal().withComputer(Computer.compute(SparkGraphComputer.class).workers(AVAILABLE_PROCESSORS));
else if (graphData == GraphData.GRATEFUL)
- return grateful.traversal().withComputer(Computer.compute(SparkGraphComputer.class));
+ return grateful.traversal().withComputer(Computer.compute(SparkGraphComputer.class).workers(AVAILABLE_PROCESSORS));
else
throw new UnsupportedOperationException("GraphData not supported: " + graphData.name());
}
@@ -133,6 +153,16 @@ public class SparkGraphFeatureTest {
filter(s -> s.getValue0().equals(scenario.getName())).findFirst();
if (skipped.isPresent())
throw new AssumptionViolatedException(skipped.get().getValue1());
+
+ final List<String> ignores = TAGS_TO_IGNORE.stream().filter(t -> scenario.getSourceTagNames().contains(t)).collect(Collectors.toList());
+ if (!ignores.isEmpty())
+ throw new AssumptionViolatedException(String.format("This scenario is not supported with GraphComputer: %s", ignores));
+
+ // the following needs some further investigation.........may need to improve the definition of result
+ // equality with map<list>
+ final String scenarioName = scenario.getName();
+ if (SCENARIOS_TO_IGNORE.contains(scenarioName))
+ throw new AssumptionViolatedException("There are some internal ordering issues with result where equality is not required but is being enforced");
}
private static void readIntoGraph(final Graph graph, final GraphData graphData) {
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphComputerFeatureTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphComputerFeatureTest.java
new file mode 100644
index 0000000..e996a23
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphComputerFeatureTest.java
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.tinkergraph;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Stage;
+import io.cucumber.guice.CucumberModules;
+import io.cucumber.junit.Cucumber;
+import io.cucumber.junit.CucumberOptions;
+import org.apache.tinkerpop.gremlin.features.AbstractGuiceFactory;
+import org.apache.tinkerpop.gremlin.features.World;
+import org.junit.runner.RunWith;
+
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ tags = "not @RemoteOnly",
+ glue = { "org.apache.tinkerpop.gremlin.features" },
+ objectFactory = TinkerGraphComputerFeatureTest.TinkerGraphGuiceFactory.class,
+ features = { "../gremlin-test/features" },
+ plugin = {"pretty", "junit:target/cucumber.xml"})
+public class TinkerGraphComputerFeatureTest {
+
+ public static class TinkerGraphGuiceFactory extends AbstractGuiceFactory {
+ public TinkerGraphGuiceFactory() {
+ super(Guice.createInjector(Stage.PRODUCTION, CucumberModules.createScenarioModule(), new ServiceModule()));
+ }
+ }
+
+ public static final class ServiceModule extends AbstractModule {
+ @Override
+ protected void configure() {
+ bind(World.class).to(TinkerGraphWorld.ComputerWorld.class);
+ }
+ }
+}
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
index 6c2d27f..b3a416a 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
@@ -20,85 +20,33 @@ package org.apache.tinkerpop.gremlin.tinkergraph;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
-import com.google.inject.Injector;
import com.google.inject.Stage;
import io.cucumber.guice.CucumberModules;
-import io.cucumber.guice.GuiceFactory;
-import io.cucumber.guice.InjectorSource;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
-import org.apache.commons.configuration2.BaseConfiguration;
-import org.apache.commons.configuration2.Configuration;
-import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.features.AbstractGuiceFactory;
import org.apache.tinkerpop.gremlin.features.World;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
import org.junit.runner.RunWith;
-import java.io.File;
-
-import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
-
@RunWith(Cucumber.class)
@CucumberOptions(
- tags = "not @RemoteOnly",
+ tags = "not @RemoteOnly and not @GraphComputerOnly",
glue = { "org.apache.tinkerpop.gremlin.features" },
- objectFactory = GuiceFactory.class,
+ objectFactory = TinkerGraphFeatureTest.TinkerGraphGuiceFactory.class,
features = { "../gremlin-test/features" },
plugin = {"pretty", "junit:target/cucumber.xml"})
public class TinkerGraphFeatureTest {
- public static final class ServiceModule extends AbstractModule {
- @Override
- protected void configure() {
- bind(World.class).to(TinkerGraphWorld.class);
+ public static class TinkerGraphGuiceFactory extends AbstractGuiceFactory {
+ public TinkerGraphGuiceFactory() {
+ super(Guice.createInjector(Stage.PRODUCTION, CucumberModules.createScenarioModule(), new ServiceModule()));
}
}
- public static class TinkerGraphWorld implements World {
- private static final TinkerGraph modern = TinkerFactory.createModern();
- private static final TinkerGraph classic = TinkerFactory.createClassic();
- private static final TinkerGraph crew = TinkerFactory.createTheCrew();
- private static final TinkerGraph sink = TinkerFactory.createKitchenSink();
- private static final TinkerGraph grateful = TinkerFactory.createGratefulDead();
-
- @Override
- public GraphTraversalSource getGraphTraversalSource(final GraphData graphData) {
- if (null == graphData)
- return TinkerGraph.open(getNumberIdManagerConfiguration()).traversal();
- else if (graphData == GraphData.CLASSIC)
- return classic.traversal();
- else if (graphData == GraphData.CREW)
- return crew.traversal();
- else if (graphData == GraphData.MODERN)
- return modern.traversal();
- else if (graphData == GraphData.SINK)
- return sink.traversal();
- else if (graphData == GraphData.GRATEFUL)
- return grateful.traversal();
- else
- throw new UnsupportedOperationException("GraphData not supported: " + graphData.name());
- }
-
- @Override
- public String changePathToDataFile(final String pathToFileFromGremlin) {
- return ".." + File.separator + pathToFileFromGremlin;
- }
- }
-
- public static final class WorldInjectorSource implements InjectorSource {
+ public static final class ServiceModule extends AbstractModule {
@Override
- public Injector getInjector() {
- return Guice.createInjector(Stage.PRODUCTION, CucumberModules.createScenarioModule(), new ServiceModule());
+ protected void configure() {
+ bind(World.class).to(TinkerGraphWorld.class);
}
}
-
- private static Configuration getNumberIdManagerConfiguration() {
- final Configuration conf = new BaseConfiguration();
- conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
- conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
- conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER, TinkerGraph.DefaultIdManager.LONG.name());
- return conf;
- }
}
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
new file mode 100644
index 0000000..f37e5ac
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
@@ -0,0 +1,137 @@
+/*
+ * 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.
+ */
+package org.apache.tinkerpop.gremlin.tinkergraph;
+
+import io.cucumber.java.Scenario;
+import org.apache.commons.configuration2.BaseConfiguration;
+import org.apache.commons.configuration2.Configuration;
+import org.apache.commons.configuration2.MapConfiguration;
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.features.World;
+import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerGraphComputer;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.AssumptionViolatedException;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+import java.util.stream.Collectors;
+
+/**
+ * The {@link World} implementation for TinkerGraph that provides the {@link GraphTraversalSource} instances required
+ * by the Gherkin test suite.
+ */
+public class TinkerGraphWorld implements World {
+ private static final TinkerGraph modern = TinkerFactory.createModern();
+ private static final TinkerGraph classic = TinkerFactory.createClassic();
+ private static final TinkerGraph crew = TinkerFactory.createTheCrew();
+ private static final TinkerGraph sink = TinkerFactory.createKitchenSink();
+ private static final TinkerGraph grateful = TinkerFactory.createGratefulDead();
+
+ @Override
+ public GraphTraversalSource getGraphTraversalSource(final LoadGraphWith.GraphData graphData) {
+ if (null == graphData)
+ return TinkerGraph.open(getNumberIdManagerConfiguration()).traversal();
+ else if (graphData == LoadGraphWith.GraphData.CLASSIC)
+ return classic.traversal();
+ else if (graphData == LoadGraphWith.GraphData.CREW)
+ return crew.traversal();
+ else if (graphData == LoadGraphWith.GraphData.MODERN)
+ return modern.traversal();
+ else if (graphData == LoadGraphWith.GraphData.SINK)
+ return sink.traversal();
+ else if (graphData == LoadGraphWith.GraphData.GRATEFUL)
+ return grateful.traversal();
+ else
+ throw new UnsupportedOperationException("GraphData not supported: " + graphData.name());
+ }
+
+ @Override
+ public String changePathToDataFile(final String pathToFileFromGremlin) {
+ return ".." + File.separator + pathToFileFromGremlin;
+ }
+
+ private static Configuration getNumberIdManagerConfiguration() {
+ final Configuration conf = new BaseConfiguration();
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER, TinkerGraph.DefaultIdManager.INTEGER.name());
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER, TinkerGraph.DefaultIdManager.LONG.name());
+ return conf;
+ }
+
+ /**
+ * Turns on {@link GraphComputer} when testing.
+ */
+ public static class ComputerWorld extends TinkerGraphWorld {
+ private static final Random RANDOM = TestHelper.RANDOM;
+
+ private static final List<String> TAGS_TO_IGNORE = Arrays.asList(
+ "@StepDrop",
+ "@StepV",
+ "@StepConnectedComponent", // need to implement this in the grammar
+ "@GraphComputerVerificationOneBulk",
+ "@GraphComputerVerificationMidVNotSupported",
+ "@GraphComputerVerificationInjectionNotSupported",
+ "@GraphComputerVerificationStarGraphExceeded",
+ "@GraphComputerVerificationReferenceOnly");
+
+ private static final List<String> SCENARIOS_TO_IGNORE = Arrays.asList(
+ "g_V_group_byXoutE_countX_byXnameX",
+ "g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_descX",
+ "g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX",
+ "g_V_group_byXageX",
+ "g_V_order_byXoutE_count_descX",
+ "g_V_both_both_dedup_byXoutE_countX_name",
+ "g_V_mapXbothE_weight_foldX_order_byXsumXlocalX_descX",
+ "g_V_hasLabelXsoftwareX_order_byXnameX_index_withXmapX");
+
+ @Override
+ public void beforeEachScenario(final Scenario scenario) {
+ final List<String> ignores = TAGS_TO_IGNORE.stream().filter(t -> scenario.getSourceTagNames().contains(t)).collect(Collectors.toList());
+ if (!ignores.isEmpty())
+ throw new AssumptionViolatedException(String.format("This scenario is not supported with GraphComputer: %s", ignores));
+
+ // the following needs some further investigation.........may need to improve the definition of result
+ // equality with map<list>
+ final String scenarioName = scenario.getName();
+ if (SCENARIOS_TO_IGNORE.contains(scenarioName))
+ throw new AssumptionViolatedException("There are some internal ordering issues with result where equality is not required but is being enforced");
+ }
+
+ @Override
+ public GraphTraversalSource getGraphTraversalSource(final LoadGraphWith.GraphData graphData) {
+ if (null == graphData)
+ throw new AssumptionViolatedException("GraphComputer does not support mutation");
+
+ return super.getGraphTraversalSource(graphData).withStrategies(VertexProgramStrategy.create(new MapConfiguration(new HashMap<String, Object>() {{
+ put(VertexProgramStrategy.WORKERS, Runtime.getRuntime().availableProcessors());
+ put(VertexProgramStrategy.GRAPH_COMPUTER, RANDOM.nextBoolean() ?
+ GraphComputer.class.getCanonicalName() :
+ TinkerGraphComputer.class.getCanonicalName());
+ }})));
+ }
+ }
+}
diff --git a/tinkergraph-gremlin/src/test/resources/META-INF/services/io.cucumber.core.backend.ObjectFactory b/tinkergraph-gremlin/src/test/resources/META-INF/services/io.cucumber.core.backend.ObjectFactory
new file mode 100644
index 0000000..d4066a8
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/resources/META-INF/services/io.cucumber.core.backend.ObjectFactory
@@ -0,0 +1,2 @@
+org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphFeatureTest$TinkerGraphGuiceFactory
+org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphComputerFeatureTest$TinkerGraphGuiceFactory
\ No newline at end of file
[tinkerpop] 04/18: TINKERPOP-2601 Add io() support for Gherkin
tests on jvm
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 8061ed8d015741cf920071ae558994a6f482b521
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Aug 13 14:56:07 2021 -0400
TINKERPOP-2601 Add io() support for Gherkin tests on jvm
---
.../tinkerpop/gremlin/features/StepDefinition.java | 22 +++++++++++++---------
.../apache/tinkerpop/gremlin/features/World.java | 12 ++++++++++++
.../tinkergraph/TinkerGraphFeatureTest.java | 8 ++++++++
3 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
index b769e21..e97c264 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
@@ -75,12 +75,13 @@ public final class StepDefinition {
private static final ObjectMapper mapper = new ObjectMapper();
- private final World world;
+ private World world;
private GraphTraversalSource g;
private final Map<String, String> stringParameters = new HashMap<>();
private Traversal traversal;
private Object result;
- private static Pattern edgeTriplet = Pattern.compile("(.+)-(.+)->(.+)");
+ private static final Pattern edgeTripletPattern = Pattern.compile("(.+)-(.+)->(.+)");
+ private static final Pattern ioPattern = Pattern.compile("g\\.io\\(\"(.*)\"\\).*");
private List<Pair<Pattern, Function<String,String>>> stringMatcherConverters = new ArrayList<Pair<Pattern, Function<String,String>>>() {{
// expects json so that should port to the Gremlin script form - replace curly json braces with square ones
// for Gremlin sake.
@@ -228,7 +229,8 @@ public final class StepDefinition {
@Given("the traversal of")
public void theTraversalOf(final String docString) {
- traversal = parseGremlin(applyParameters(docString));
+ final String gremlin = tryUpdateDataFilePath(docString);
+ traversal = parseGremlin(applyParameters(gremlin));
}
@When("iterated to list")
@@ -313,11 +315,6 @@ public final class StepDefinition {
if (script.contains(".withComputer("))
throw new AssumptionViolatedException("withComputer() syntax is not supported by gremlin-language at this time");
- // TODO: fix io() data pathing stuff to bind it better to the graph
- if (script.startsWith("g.io(\"")) {
- throw new AssumptionViolatedException("io() syntax");
- }
-
final GremlinLexer lexer = new GremlinLexer(CharStreams.fromString(script));
final GremlinParser parser = new GremlinParser(new CommonTokenStream(lexer));
final GremlinParser.QueryContext ctx = parser.query();
@@ -403,7 +400,7 @@ public final class StepDefinition {
}
private static Triplet<String,String,String> getEdgeTriplet(final String e) {
- final Matcher m = edgeTriplet.matcher(e);
+ final Matcher m = edgeTripletPattern.matcher(e);
if (m.matches()) {
return Triplet.with(m.group(1), m.group(2), m.group(3));
}
@@ -431,4 +428,11 @@ public final class StepDefinition {
}
return replaced;
}
+
+ private String tryUpdateDataFilePath(final String docString) {
+ final Matcher matcher = ioPattern.matcher(docString);
+ final String gremlin = matcher.matches() ?
+ docString.replace(matcher.group(1), world.changePathToDataFile(matcher.group(1))) : docString;
+ return gremlin;
+ }
}
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/World.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/World.java
index 99fac71..971105b 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/World.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/World.java
@@ -54,4 +54,16 @@ public interface World {
public default void afterEachScenario() {
// do nothing
}
+
+ /**
+ * Called when {@code g.io()} is encountered in the Gherkin tests and allows the path to the data file to
+ * referenced to be changed. The default path will look something like: {@code data/file.extension} and will
+ * match one of the standard TinkerPop data files associated with the test framework. If the files need to be
+ * located somewhere else for a particular provider, this method can alter the path as needed.
+ *
+ * @param pathToFileFromGremlin the path to a data file as taken from the Gherkin tests
+ */
+ public default String changePathToDataFile(final String pathToFileFromGremlin) {
+ return pathToFileFromGremlin;
+ }
}
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
index 3cc834d..6c2d27f 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
@@ -29,12 +29,15 @@ import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.apache.commons.configuration2.BaseConfiguration;
import org.apache.commons.configuration2.Configuration;
+import org.apache.tinkerpop.gremlin.TestHelper;
import org.apache.tinkerpop.gremlin.features.World;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
import org.junit.runner.RunWith;
+import java.io.File;
+
import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
@RunWith(Cucumber.class)
@@ -77,6 +80,11 @@ public class TinkerGraphFeatureTest {
else
throw new UnsupportedOperationException("GraphData not supported: " + graphData.name());
}
+
+ @Override
+ public String changePathToDataFile(final String pathToFileFromGremlin) {
+ return ".." + File.separator + pathToFileFromGremlin;
+ }
}
public static final class WorldInjectorSource implements InjectorSource {
[tinkerpop] 16/18: TINKERPOP-2601 Fixed mistype in suite definition
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit f599f99d06f02f250c7dc662e962a385f622303c
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Sep 9 17:57:02 2021 -0400
TINKERPOP-2601 Fixed mistype in suite definition
---
.../spark/process/computer/SparkGraphComputerProcessIntegrateTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputerProcessIntegrateTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputerProcessIntegrateTest.java
index c909b5b..7091ff3 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputerProcessIntegrateTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputerProcessIntegrateTest.java
@@ -21,13 +21,14 @@ package org.apache.tinkerpop.gremlin.spark.process.computer;
import org.apache.tinkerpop.gremlin.GraphProviderClass;
import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
import org.apache.tinkerpop.gremlin.process.ProcessComputerSuite;
+import org.apache.tinkerpop.gremlin.process.ProcessLimitedComputerSuite;
import org.apache.tinkerpop.gremlin.process.ProcessLimitedStandardSuite;
import org.junit.runner.RunWith;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
-@RunWith(ProcessLimitedStandardSuite.class)
+@RunWith(ProcessLimitedComputerSuite.class)
@GraphProviderClass(provider = SparkHadoopGraphProvider.class, graph = HadoopGraph.class)
public class SparkGraphComputerProcessIntegrateTest {
}
[tinkerpop] 08/18: TINKERPOP-2601 Added gherkin tests to Spark
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 445765d13bfc53388ffc5e3c8792d2725d0ff6a6
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Aug 20 14:42:36 2021 -0400
TINKERPOP-2601 Added gherkin tests to Spark
Refactored runner to better handle olap by not exiting the star graph when looking up edges for assertions/parameters
---
.../tinkerpop/gremlin/features/StepDefinition.java | 6 ++-
.../gremlin/hadoop/HadoopGraphFeatureTest.java | 8 ----
spark-gremlin/pom.xml | 12 +++++
.../gremlin/spark/SparkGraphFeatureTest.java | 52 ++++++++++++----------
.../src/test/resources/cucumber.properties | 1 +
5 files changed, 46 insertions(+), 33 deletions(-)
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
index e97c264..e5095e3 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
@@ -38,6 +38,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.T;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
import org.apache.tinkerpop.shaded.jackson.databind.JsonNode;
import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
@@ -410,7 +411,10 @@ public final class StepDefinition {
private static Edge getEdge(final GraphTraversalSource g, final String e) {
final Triplet<String,String,String> t = getEdgeTriplet(e);
- return g.V().has("name", t.getValue0()).outE(t.getValue1()).where(inV().has("name", t.getValue2())).next();
+
+ // make this OLAP proof since you can't leave the star graph
+ return g.V().has("name", t.getValue0()).outE(t.getValue1()).toStream().
+ filter(edge -> g.V(edge.inVertex().id()).has("name", t.getValue2()).hasNext()).findFirst().get();
}
private static Object getEdgeId(final GraphTraversalSource g, final String e) {
diff --git a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
index e43b00b..8f8f6a4 100644
--- a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
+++ b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
@@ -96,7 +96,6 @@ public class HadoopGraphFeatureTest {
private static final HadoopGraph crew = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.CREW)));
private static final HadoopGraph sink = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.SINK)));
private static final HadoopGraph grateful = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.GRATEFUL)));
- private static final HadoopGraph empty = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(null)));
static {
readIntoGraph(modern, GraphData.MODERN);
@@ -130,13 +129,6 @@ public class HadoopGraphFeatureTest {
filter(s -> s.getValue0().equals(scenario.getName())).findFirst();
if (skipped.isPresent())
throw new AssumptionViolatedException(skipped.get().getValue1());
-
- cleanEmpty();
- }
-
- private void cleanEmpty() {
- final GraphTraversalSource g = empty.traversal();
- g.V().drop().iterate();
}
private static void readIntoGraph(final Graph graph, final GraphData graphData) {
diff --git a/spark-gremlin/pom.xml b/spark-gremlin/pom.xml
index 8eb7fba..089e99a 100644
--- a/spark-gremlin/pom.xml
+++ b/spark-gremlin/pom.xml
@@ -206,6 +206,18 @@ limitations under the License.
</exclusions>
</dependency>
<dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>4.2.3</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkergraph-gremlin</artifactId>
<version>${project.version}</version>
diff --git a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
similarity index 77%
copy from hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
copy to spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
index e43b00b..9112448 100644
--- a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tinkerpop.gremlin.hadoop;
+package org.apache.tinkerpop.gremlin.spark;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
@@ -29,15 +29,19 @@ import io.cucumber.java.Scenario;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.apache.commons.configuration2.MapConfiguration;
-import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.spark.launcher.SparkLauncher;
+import org.apache.spark.serializer.KryoSerializer;
import org.apache.tinkerpop.gremlin.TestHelper;
import org.apache.tinkerpop.gremlin.features.TestFiles;
import org.apache.tinkerpop.gremlin.features.World;
+import org.apache.tinkerpop.gremlin.hadoop.Constants;
import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat;
import org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoOutputFormat;
+import org.apache.tinkerpop.gremlin.process.computer.Computer;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.spark.process.computer.SparkGraphComputer;
+import org.apache.tinkerpop.gremlin.spark.structure.io.gryo.GryoRegistrator;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.javatuples.Pair;
import org.junit.AssumptionViolatedException;
@@ -45,7 +49,6 @@ import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -61,13 +64,14 @@ import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
objectFactory = GuiceFactory.class,
features = { "../gremlin-test/features" },
plugin = {"pretty", "junit:target/cucumber.xml"})
-public class HadoopGraphFeatureTest {
- private static final Logger logger = LoggerFactory.getLogger(HadoopGraphFeatureTest.class);
+public class SparkGraphFeatureTest {
+ private static final Logger logger = LoggerFactory.getLogger(SparkGraphFeatureTest.class);
+ private static final int AVAILABLE_PROCESSORS = Runtime.getRuntime().availableProcessors();
- private static final String skipReasonLength = "Hadoop-Gremlin is OLAP-oriented and for OLTP operations, linear-scan joins are required. This particular tests takes many minutes to execute.";
+ private static final String skipReasonLength = "Spark-Gremlin is OLAP-oriented and for OLTP operations, linear-scan joins are required. This particular tests takes many minutes to execute.";
private static final List<Pair<String, String>> skip = new ArrayList<Pair<String,String>>() {{
- add(Pair.with("g_V_both_both_count", skipReasonLength));
+ add(Pair.with("g_V_both_both_count", skipReasonLength));
add(Pair.with("g_V_repeatXoutX_timesX3X_count", skipReasonLength));
add(Pair.with("g_V_repeatXoutX_timesX8X_count", skipReasonLength));
add(Pair.with("g_V_repeatXoutX_timesX5X_asXaX_outXwrittenByX_asXbX_selectXa_bX_count", skipReasonLength));
@@ -85,18 +89,17 @@ public class HadoopGraphFeatureTest {
public static final class ServiceModule extends AbstractModule {
@Override
protected void configure() {
- bind(World.class).to(HadoopGraphWorld.class);
+ bind(World.class).to(SparkGraphWorld.class);
}
}
- public static class HadoopGraphWorld implements World {
+ public static class SparkGraphWorld implements World {
private static final HadoopGraph modern = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.MODERN)));
private static final HadoopGraph classic = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.CLASSIC)));
private static final HadoopGraph crew = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.CREW)));
private static final HadoopGraph sink = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.SINK)));
private static final HadoopGraph grateful = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(GraphData.GRATEFUL)));
- private static final HadoopGraph empty = HadoopGraph.open(new MapConfiguration(getBaseConfiguration(null)));
static {
readIntoGraph(modern, GraphData.MODERN);
@@ -111,15 +114,15 @@ public class HadoopGraphFeatureTest {
if (null == graphData)
throw new AssumptionViolatedException("HadoopGraph does not support graph mutations");
else if (graphData == GraphData.CLASSIC)
- return classic.traversal();
+ return classic.traversal().withComputer(Computer.compute(SparkGraphComputer.class));
else if (graphData == GraphData.CREW)
- return crew.traversal();
+ return crew.traversal().withComputer(Computer.compute(SparkGraphComputer.class));
else if (graphData == GraphData.MODERN)
- return modern.traversal();
+ return modern.traversal().withComputer(Computer.compute(SparkGraphComputer.class));
else if (graphData == GraphData.SINK)
- return sink.traversal();
+ return sink.traversal().withComputer(Computer.compute(SparkGraphComputer.class));
else if (graphData == GraphData.GRATEFUL)
- return grateful.traversal();
+ return grateful.traversal().withComputer(Computer.compute(SparkGraphComputer.class));
else
throw new UnsupportedOperationException("GraphData not supported: " + graphData.name());
}
@@ -130,13 +133,6 @@ public class HadoopGraphFeatureTest {
filter(s -> s.getValue0().equals(scenario.getName())).findFirst();
if (skipped.isPresent())
throw new AssumptionViolatedException(skipped.get().getValue1());
-
- cleanEmpty();
- }
-
- private void cleanEmpty() {
- final GraphTraversalSource g = empty.traversal();
- g.V().drop().iterate();
}
private static void readIntoGraph(final Graph graph, final GraphData graphData) {
@@ -144,7 +140,7 @@ public class HadoopGraphFeatureTest {
}
private static String getWorkingDirectory() {
- return TestHelper.makeTestDataDirectory(HadoopGraphFeatureTest.class, "graph-provider-data");
+ return TestHelper.makeTestDataDirectory(SparkGraphFeatureTest.class, "graph-provider-data");
}
private static Map<String, Object> getBaseConfiguration(final GraphData graphData) {
@@ -154,6 +150,14 @@ public class HadoopGraphFeatureTest {
put(Constants.GREMLIN_HADOOP_GRAPH_WRITER, GryoOutputFormat.class.getCanonicalName());
put(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, getWorkingDirectory());
put(Constants.GREMLIN_HADOOP_JARS_IN_DISTRIBUTED_CACHE, false);
+
+ put(Constants.GREMLIN_SPARK_PERSIST_CONTEXT, true); // this makes the test suite go really fast
+
+ put(Constants.GREMLIN_HADOOP_DEFAULT_GRAPH_COMPUTER, SparkGraphComputer.class.getCanonicalName());
+ put(SparkLauncher.SPARK_MASTER, "local[" + AVAILABLE_PROCESSORS + "]");
+ put(Constants.SPARK_SERIALIZER, KryoSerializer.class.getCanonicalName());
+ put(Constants.SPARK_KRYO_REGISTRATOR, GryoRegistrator.class.getCanonicalName());
+ put(Constants.SPARK_KRYO_REGISTRATION_REQUIRED, true);
}};
}
}
diff --git a/spark-gremlin/src/test/resources/cucumber.properties b/spark-gremlin/src/test/resources/cucumber.properties
new file mode 100644
index 0000000..0180176
--- /dev/null
+++ b/spark-gremlin/src/test/resources/cucumber.properties
@@ -0,0 +1 @@
+guice.injector-source=org.apache.tinkerpop.gremlin.spark.SparkGraphFeatureTest$WorldInjectorSource
\ No newline at end of file
[tinkerpop] 11/18: TINKERPOP-2601 TinkerGraph no longer needs
cucumber.properties
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 8a3572299765e74ff6c94c5b5d08607b3bc7b892
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Sep 8 12:48:55 2021 -0400
TINKERPOP-2601 TinkerGraph no longer needs cucumber.properties
It has a custom ObjectFactory now.
---
tinkergraph-gremlin/src/test/resources/cucumber.properties | 1 -
1 file changed, 1 deletion(-)
diff --git a/tinkergraph-gremlin/src/test/resources/cucumber.properties b/tinkergraph-gremlin/src/test/resources/cucumber.properties
deleted file mode 100644
index 159b8c8..0000000
--- a/tinkergraph-gremlin/src/test/resources/cucumber.properties
+++ /dev/null
@@ -1 +0,0 @@
-guice.injector-source=org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphFeatureTest$WorldInjectorSource
\ No newline at end of file
[tinkerpop] 03/18: TINKERPOP-2601 Documentation for Gherkin for
providers
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 42e7019fdd925407acd01fd4b15b27f5b5236acb
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Aug 13 10:58:42 2021 -0400
TINKERPOP-2601 Documentation for Gherkin for providers
---
CHANGELOG.asciidoc | 1 +
docs/src/dev/developer/for-committers.asciidoc | 17 ++-
docs/src/dev/provider/index.asciidoc | 114 ++++++++++++++++++++-
docs/src/upgrade/release-3.6.x.asciidoc | 17 +++
.../tinkerpop/gremlin/features/StepDefinition.java | 3 -
.../tinkergraph/TinkerGraphFeatureTest.java | 2 -
6 files changed, 147 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 8363264..850b6be 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -31,6 +31,7 @@ limitations under the License.
* Removed `groovy` and `groovy-json` dependencies from `gremlin-driver` as well as related `JsonBuilder` serialization support.
* Replaced log4j usage with logback where builds rely on and packaged distributions now contain the latter.
* Prevented metrics computation unless the traversal is in a locked state.
+* Exposed Gherkin tests as part of the provider test suite.
* Bumped to Apache Hadoop 3.3.1.
* Bumped to Apache Spark 3.1.2.
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index d819840..8a3bc67 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -198,6 +198,7 @@ call out this fact.
The JIRA issues that track removal of deprecated methods should be periodically evaluated to determine if it is
prudent to schedule them into a release.
+[[developing-tests]]
== Developing Tests
TinkerPop has a wide variety of test types that help validate its internal code as well as external provider code.
@@ -224,9 +225,10 @@ environments without a `GraphProvider` being initialized by a suite. These types
`Check` instead. Please see link:https://github.com/apache/tinkerpop/blob/e32a4187e4f25e290aabe14007f9087c48a06521/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureCheck.java[NativeNeo4jStructureCheck]
for an example.
+[[gremlin-language-test-cases]]
=== Gremlin Language Test Cases
-Test cases for the Gremlin Language currently requires that the newly developed test be added in three places:
+Test cases for the Gremlin Language currently requires that the newly developed test be added in two places:
1. As a test written in Java in the `gremlin-test` module within the subpackages of
`org.apache.tinkerpop.gremlin.process.traversal.step`
@@ -465,6 +467,19 @@ Scenario: g_V_outE_drop
And the graph should return 0 for count of "g.E()"
----
+[[gherkin-tags]]
+==== Tags
+
+Scenarios have tags associated with them that help identify subsets of tests so that a test runner can selectively
+include or ignore certain tests. The tags enable the practical and necessary ability for providers to ignore tests that
+they simply cannot support. It is important to be aware of the following tags when writing tests as not including a
+tag when one is necessary will cause provider tests to fail:
+
+* *@MultiMetaProperties* - The scenario uses "The Crew" graph as a dataset or otherwise utilizes multi-properties
+or meta-properties for creating or querying data.
+* *@RemoteOnly* - The scenario uses some Gremlin syntax that cannot be supported outside of remote test executions. The
+best example of this sort of test would be one that uses the remote `Lambda` syntax.
+
== Developing Benchmarks
Benchmarks are a useful tool to track performance between TinkerPop versions and also as tools to aid development
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 1c928f6..480dee0 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -617,6 +617,29 @@ image:gremlin-edumacated.png[width=225]
</dependency>
----
+Providers currently have two approaches to consider when validating their TinkerPop implementations. The first approach
+comes from the wholly JVM oriented original test suite which was developed in the early days of TinkerPop 3.x design
+and development. The second approach is available as of 3.6.0, is Gherkin-based and originates from the Gremlin
+Language Variant test suite which is language agnostic.
+
+The first approach is more complete and more opinionated as to how an implementation should behave and in many ways
+helpful in getting an implementation semantically correct from the ground up (i.e. first getting the `Graph` Structure
+API implemented well by getting the Structure Suite to pass which will almost inevitably ensure that the most of the
+Gremlin language oriented tests in the Process Suite pass early on). On the other hand, the fact that this test suite
+is rigorous also can make it harder to implement especially if your graph already exists and behaves in a certain
+fashion.
+
+The second approach only validates Gremlin semantics which is ultimately what users concern themselves with as that is
+the method by which they will interact with a provider's `Graph`. This test suite is less concerned with how a
+TinkerPop implementation does what it does, so long as it succeeds at processing Gremlin traversals. There is
+significant overlap between this test suite and the aforementioned Process Suite.
+
+At this time, it would be wise for providers to implement both approaches as the goal for TinkerPop is to move away
+from the rigors of the JVM Structure and Process Suites in favor of Gherkin. Over time, the Structure and Process
+Suites will be deprecated and removed.
+
+==== JVM Test Suite
+
The operational semantics of any OLTP or OLAP implementation are validated by `gremlin-test`. To implement these tests,
provide test case implementations as shown below, where `XXX` below denotes the name of the graph implementation (e.g.
TinkerGraph, Neo4jGraph, HadoopGraph, etc.).
@@ -758,7 +781,7 @@ environment variable, depending on your project layout. Some tests require this
creating temporary files. The value is typically set to the project build directory. For example using the Maven
SureFire Plugin, this is done via the configuration argLine with `-Dbuild.dir=${project.build.directory}`.
-==== Checking resource leak
+===== Checking Resource Leaks
The TinkerPop query engine retrieves data by interfacing with the provider using iterators. These iterators (depending
on the provider) may hold up resources in the underlying storage layer and hence, it is critical to close them after
@@ -772,6 +795,95 @@ is provided with TinkerGraph as `TinkerGraphIterator.java`.
Assertions for leak detection are enabled by default when running the test suite. They can be temporarily disabled
by way of a system property - simply set `-DtestIteratorLeaks=false".
+[[gherkin-tests-suite]]
+==== Gherkin Test Suite
+
+The Gherkin Test Suite is a language agnostic set of tests that verify Gremlin semantics. It provides a unified set of
+tests that validate many TinkerPop components internally. The tests themselves can be found in `gremlin-tests/features`
+(link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-test/features[here]) with their syntax described in the
+link:https://tinkerpop.apache.org/docs/x.y.z/dev/developer/#gremlin-language-test-cases[TinkerPop Developer Documentation].
+
+TinkerPop provides some infrastructure, for JVM based graphs, to help make it easier for providers to implement these
+tests against their implementations. This infrastructure is built on `cucumber-java` which is a dependency of
+`gremlin-test`. There are two main components to implementing the tests:
+
+1. A `org.apache.tinkerpop.gremlin.features.World` implementation which is a class in `gremlin-test`.
+2. A JUnit test class that will act as the runner for the tests with the appropriate annotations
+
+TIP: It may be helpful to get familiar with link:https://cucumber.io/docs/installation/java/[Cucumber] before
+proceeding with an implementation.
+
+The `World` implementation provides context to the tests and allows providers to intercept test events that might be
+important to proper execution specific to their implementations. The most important part of implementing `World` is
+properly implementing the `GraphTraversalSource getGraphTraversalSource(GraphData)` method which provides to the test
+the `GraphTraversalSource` to execute the test against.
+
+The JUnit test class is really just the test runner. It is a simple class which must include some Cucumber annotations.
+The following is just an example as taken from TinkerGraph:
+
+[source,java]
+----
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ tags = "not @RemoteOnly",
+ glue = { "org.apache.tinkerpop.gremlin.features" },
+ features = { "../gremlin-test/features" },
+ plugin = {"pretty", "junit:target/cucumber.xml",
+ objectFactory = GuiceFactory.class})
+----
+
+The `@CucumberOptions` that are used are mostly implementation specific, so it will be up to the provider to make some
+choices as to what is right for their environment. For TinkerGraph, it needed to ignore Gherkin tests with the
+`@RemoteOnly` tag (the full list of possible tags can be found link:https://tinkerpop.apache.org/docs/current/dev/developer/#gherkin-tags[here]),
+as will most providers. The "glue" will be the same for all test implementers as it refers to a package containing
+TinkerPop's test infrastructure in `gremlin-test` (unless of course, a provider needs to develop their own
+infrastructure for some reason). The "features" is the path to the actual Gherkin test files that should be made
+available locally. The "plugin" defines a JUnit style output, which happens to be understood by Maven.
+
+The "objectFactory" is the last component. Cucumber relies on dependency injection to get a `World` implementation into
+the test infrastructure. Providers may choose from multiple available implementations, but TinkerPop chose to use
+Guice. To follow this approach include the following module:
+
+[source,xml]
+----
+<dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>4.2.3</version>
+ <scope>test</scope>
+</dependency>
+----
+
+Following the TinkerGraph implementation, there are two classes to construct:
+
+[source,java]
+----
+public class ServiceModule extends AbstractModule {
+ @Override
+ protected void configure() {
+ bind(World.class).to(TinkerGraphWorld.class);
+ }
+}
+
+public class WorldInjectorSource implements InjectorSource {
+ @Override
+ public Injector getInjector() {
+ return Guice.createInjector(Stage.PRODUCTION, CucumberModules.createScenarioModule(), new ServiceModule());
+ }
+}
+----
+
+The key here is that the `TinkerGraphWorld` implementation gets bound to `World` in the `ServiceModule` and there is
+a `WorldInjectorSource` that specifies the `ServiceModule` to Cucumber. As a final step, the provider's test resources
+needs a `cucumber.properties` file with an entry that specifies the `InjectorSource` so that Guice can find it. Here
+is the example taken from TinkerGraph where the `WorldInjectorSource` is inner class of `TinkerGraphFeatureTest`
+itself.
+
+[source,text]
+----
+guice.injector-source=org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphFeatureTest$WorldInjectorSource
+----
+
=== Accessibility via GremlinPlugin
image:gremlin-plugin.png[width=100,float=left] The applications distributed with TinkerPop do not distribute with
diff --git a/docs/src/upgrade/release-3.6.x.asciidoc b/docs/src/upgrade/release-3.6.x.asciidoc
index 2d0c3df..b8286b3 100644
--- a/docs/src/upgrade/release-3.6.x.asciidoc
+++ b/docs/src/upgrade/release-3.6.x.asciidoc
@@ -77,6 +77,23 @@ See: link:https://issues.apache.org/jira/browse/TINKERPOP-2593[TINKERPOP-2593]
==== Graph System Providers
+===== Gherkin Tests
+
+TinkerPop originally introduced Gherkin-based feature tests when GLVs were first introduced to help provide a language
+agnostic test capability. The Gherkin tests were a near one-to-one copy of the tests of the Gremlin Process Test Suite
+which focus on Gremlin semantics. Unfortunately, having both JVM tests and Gherkin tests meant maintaining two sets
+of tests which were testing identical things.
+
+To simplify the ongoing maintenance of the test suite and to make it even easier to contribute to the enforcement of
+Gremlin semantics, TinkerPop now provides infrastructure in the `gremlin-test` module to run the Gherkin-based tests.
+For 3.6.0, the old test suite remains intact and is not deprecated, but providers are encouraged to implement the
+Gherkin tests as they will include newer tests that may not be in the old test suite and it would be good to gather
+feedback on the new test suite's usage so that when deprecation and removal of the old suite comes to pass the
+transition will not carry as much friction.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-2601[TINKERPOP-2601],
+link:https://tinkerpop.apache.org/docs/3.6.0/dev/provider/#gherkin-tests-suite[Provider Documentation]
+
===== Filters with Mixed Id Types
The requirement that "ids" passed to `Graph.vertices` and `Graph.edges` all be of a single type has been removed. This
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
index 3bd136b..b769e21 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java
@@ -187,9 +187,6 @@ public final class StepDefinition {
@Before
public void beforeEachScenario(final Scenario scenario) throws Exception {
- if (scenario.getName().equals("g_VX1_2_3_4X_name"))
- System.out.println("stop!");
-
world.beforeEachScenario(scenario);
stringParameters.clear();
if (traversal != null) {
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
index 478fee1..3cc834d 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphFeatureTest.java
@@ -25,7 +25,6 @@ import com.google.inject.Stage;
import io.cucumber.guice.CucumberModules;
import io.cucumber.guice.GuiceFactory;
import io.cucumber.guice.InjectorSource;
-import io.cucumber.java.Scenario;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.apache.commons.configuration2.BaseConfiguration;
@@ -34,7 +33,6 @@ import org.apache.tinkerpop.gremlin.features.World;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
-import org.junit.AssumptionViolatedException;
import org.junit.runner.RunWith;
import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
[tinkerpop] 12/18: TINKERPOP-2601 Added connectedComponent() to
grammar
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit d6afb71407a88e75c1d993e793e5bd5478d1beea
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Sep 8 13:23:37 2021 -0400
TINKERPOP-2601 Added connectedComponent() to grammar
This probably needs to be backported to 3.5.x.
---
.../language/grammar/GremlinBaseVisitor.java | 25 +++++++++++++++++++++
.../grammar/GremlinStringConstantsVisitor.java | 21 +++++++++++++++++
.../language/grammar/TraversalMethodVisitor.java | 5 +++++
gremlin-language/src/main/antlr4/Gremlin.g4 | 26 +++++++++++++++++++---
.../gremlin/spark/SparkGraphFeatureTest.java | 1 -
.../gremlin/tinkergraph/TinkerGraphWorld.java | 1 -
6 files changed, 74 insertions(+), 5 deletions(-)
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinBaseVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinBaseVisitor.java
index ac55b96..caa0a8a 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinBaseVisitor.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinBaseVisitor.java
@@ -1453,6 +1453,31 @@ public class GremlinBaseVisitor<T> extends AbstractParseTreeVisitor<T> implement
notImplemented(ctx); return null;
}
+ @Override
+ public T visitConnectedComponentConstants(final GremlinParser.ConnectedComponentConstantsContext ctx) {
+ notImplemented(ctx); return null;
+ }
+
+ @Override
+ public T visitGremlinStringConstants_connectedComponentStringConstants_component(final GremlinParser.GremlinStringConstants_connectedComponentStringConstants_componentContext ctx) {
+ notImplemented(ctx); return null;
+ }
+
+ @Override
+ public T visitGremlinStringConstants_connectedComponentStringConstants_edges(final GremlinParser.GremlinStringConstants_connectedComponentStringConstants_edgesContext ctx) {
+ notImplemented(ctx); return null;
+ }
+
+ @Override
+ public T visitGremlinStringConstants_connectedComponentStringConstants_propertyName(GremlinParser.GremlinStringConstants_connectedComponentStringConstants_propertyNameContext ctx) {
+ return null;
+ }
+
+ @Override
+ public T visitConnectedComponentStringConstant(final GremlinParser.ConnectedComponentStringConstantContext ctx) {
+ notImplemented(ctx); return null;
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinStringConstantsVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinStringConstantsVisitor.java
index fee33d4..9b6b2a4 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinStringConstantsVisitor.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/GremlinStringConstantsVisitor.java
@@ -18,6 +18,7 @@
*/
package org.apache.tinkerpop.gremlin.language.grammar;
+import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ConnectedComponent;
import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PageRank;
import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.PeerPressure;
import org.apache.tinkerpop.gremlin.process.computer.traversal.step.map.ShortestPath;
@@ -47,6 +48,11 @@ public class GremlinStringConstantsVisitor extends GremlinBaseVisitor<Object> {
}
@Override
+ public Object visitConnectedComponentStringConstant(GremlinParser.ConnectedComponentStringConstantContext ctx) {
+ return visitChildren(ctx);
+ }
+
+ @Override
public Object visitPageRankStringConstants(final GremlinParser.PageRankStringConstantsContext ctx) {
return visitChildren(ctx);
}
@@ -72,6 +78,21 @@ public class GremlinStringConstantsVisitor extends GremlinBaseVisitor<Object> {
}
@Override
+ public Object visitGremlinStringConstants_connectedComponentStringConstants_edges(final GremlinParser.GremlinStringConstants_connectedComponentStringConstants_edgesContext ctx) {
+ return ConnectedComponent.edges;
+ }
+
+ @Override
+ public Object visitGremlinStringConstants_connectedComponentStringConstants_component(final GremlinParser.GremlinStringConstants_connectedComponentStringConstants_componentContext ctx) {
+ return ConnectedComponent.component;
+ }
+
+ @Override
+ public Object visitGremlinStringConstants_connectedComponentStringConstants_propertyName(final GremlinParser.GremlinStringConstants_connectedComponentStringConstants_propertyNameContext ctx) {
+ return ConnectedComponent.propertyName;
+ }
+
+ @Override
public Object visitGremlinStringConstants_pageRankStringConstants_edges(final GremlinParser.GremlinStringConstants_pageRankStringConstants_edgesContext ctx) {
return PageRank.edges;
}
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java
index 598dd45..1205d47 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java
@@ -1017,6 +1017,11 @@ public class TraversalMethodVisitor extends TraversalRootVisitor<GraphTraversal>
return graphTraversal.outV();
}
+ @Override
+ public Traversal visitTraversalMethod_connectedComponent(final GremlinParser.TraversalMethod_connectedComponentContext ctx) {
+ return graphTraversal.connectedComponent();
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/gremlin-language/src/main/antlr4/Gremlin.g4 b/gremlin-language/src/main/antlr4/Gremlin.g4
index f3f9a15..f70edcf 100644
--- a/gremlin-language/src/main/antlr4/Gremlin.g4
+++ b/gremlin-language/src/main/antlr4/Gremlin.g4
@@ -736,9 +736,6 @@ traversalMethod_write
: 'write' LPAREN RPAREN
;
-
-
-
/*********************************************
ARGUMENT AND TERMINAL RULES
**********************************************/
@@ -1040,12 +1037,19 @@ traversalSelfMethod_none
gremlinStringConstants
: withOptionsStringConstants
+ | connectedComponentConstants
| shortestPathStringConstants
| pageRankStringConstants
| peerPressureStringConstants
| ioOptionsStringConstants
;
+connectedComponentConstants
+ : gremlinStringConstants_connectedComponentStringConstants_component
+ | gremlinStringConstants_connectedComponentStringConstants_edges
+ | gremlinStringConstants_connectedComponentStringConstants_propertyName
+ ;
+
pageRankStringConstants
: gremlinStringConstants_pageRankStringConstants_edges
| gremlinStringConstants_pageRankStringConstants_times
@@ -1087,6 +1091,18 @@ ioOptionsStringConstants
| gremlinStringConstants_ioOptionsStringConstants_graphml
;
+gremlinStringConstants_connectedComponentStringConstants_component
+ : connectedComponentStringConstant DOT 'component'
+ ;
+
+gremlinStringConstants_connectedComponentStringConstants_edges
+ : connectedComponentStringConstant DOT 'edges'
+ ;
+
+gremlinStringConstants_connectedComponentStringConstants_propertyName
+ : connectedComponentStringConstant DOT 'propertyName'
+ ;
+
gremlinStringConstants_pageRankStringConstants_edges
: pageRankStringConstant DOT 'edges'
;
@@ -1191,6 +1207,10 @@ gremlinStringConstants_ioOptionsStringConstants_graphml
: ioOptionsStringConstant DOT 'graphml'
;
+connectedComponentStringConstant
+ : 'ConnectedComponent'
+ ;
+
pageRankStringConstant
: 'PageRank'
;
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
index 21a11ff..911aa10 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
@@ -88,7 +88,6 @@ public class SparkGraphFeatureTest {
private static final List<String> TAGS_TO_IGNORE = Arrays.asList(
"@StepDrop",
"@StepV",
- "@StepConnectedComponent", // need to implement this in the grammar
"@StepIndex", // doesn't look like this works with Spark atm - doesn't serialize (IndexTest not in the ProcessComputerSuite)
"@GraphComputerVerificationOneBulk",
"@GraphComputerVerificationMidVNotSupported",
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
index f37e5ac..f5992f4 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
@@ -91,7 +91,6 @@ public class TinkerGraphWorld implements World {
private static final List<String> TAGS_TO_IGNORE = Arrays.asList(
"@StepDrop",
"@StepV",
- "@StepConnectedComponent", // need to implement this in the grammar
"@GraphComputerVerificationOneBulk",
"@GraphComputerVerificationMidVNotSupported",
"@GraphComputerVerificationInjectionNotSupported",
[tinkerpop] 10/18: TINKERPOP-2601 Added further provider
documentation on Gherkin tests
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 2bd208a9ac6bc6051feb9d738bf74556ae074fdf
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Sep 8 12:44:15 2021 -0400
TINKERPOP-2601 Added further provider documentation on Gherkin tests
---
docs/src/dev/provider/index.asciidoc | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 480dee0..91e40d8 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -854,14 +854,14 @@ Guice. To follow this approach include the following module:
</dependency>
----
-Following the TinkerGraph implementation, there are two classes to construct:
+Following the Neo4jGraph implementation, there are two classes to construct:
[source,java]
----
public class ServiceModule extends AbstractModule {
@Override
protected void configure() {
- bind(World.class).to(TinkerGraphWorld.class);
+ bind(World.class).to(Neo4jGraphWorld.class);
}
}
@@ -873,7 +873,7 @@ public class WorldInjectorSource implements InjectorSource {
}
----
-The key here is that the `TinkerGraphWorld` implementation gets bound to `World` in the `ServiceModule` and there is
+The key here is that the `Neo4jGraphWorld` implementation gets bound to `World` in the `ServiceModule` and there is
a `WorldInjectorSource` that specifies the `ServiceModule` to Cucumber. As a final step, the provider's test resources
needs a `cucumber.properties` file with an entry that specifies the `InjectorSource` so that Guice can find it. Here
is the example taken from TinkerGraph where the `WorldInjectorSource` is inner class of `TinkerGraphFeatureTest`
@@ -881,9 +881,16 @@ itself.
[source,text]
----
-guice.injector-source=org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphFeatureTest$WorldInjectorSource
+guice.injector-source=org.apache.tinkerpop.gremlin.neo4j.Neo4jGraphFeatureTest$WorldInjectorSource
----
+In the event that a single `World` configuration is insufficient, it may be necessary to develop a custom
+`ObjectFactory`. An easy way to do this is to create a class that extends from the `AbstractGuiceFactory` in
+`gremlin-test` and provide that class to the `@CucumberOptions`. This approach does rely on the `ServiceLoader` which
+means it will be important to include a `io.cucumber.core.backend.ObjectFactory` file in `META-INF/services` and an
+entry that registers the custom implementation. Please see the TinkerGraph test code for further information on this
+approach.
+
=== Accessibility via GremlinPlugin
image:gremlin-plugin.png[width=100,float=left] The applications distributed with TinkerPop do not distribute with
[tinkerpop] 15/18: TINKERPOP-2601 Fixed failing gherkin test
configurations
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit e241b9e069a72e46e27e5201b44d297de1d12133
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Sep 9 13:32:20 2021 -0400
TINKERPOP-2601 Fixed failing gherkin test configurations
---
.../process/ProcessLimitedComputerSuite.java | 58 ---------------------
.../process/ProcessLimitedStandardSuite.java | 59 ----------------------
.../src/test/resources/cucumber.properties | 2 +-
.../SparkGraphComputerProcessIntegrateTest.java | 3 +-
.../src/test/resources/cucumber.properties | 2 +-
5 files changed, 4 insertions(+), 120 deletions(-)
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedComputerSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedComputerSuite.java
index ee77c91..bf3f357 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedComputerSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedComputerSuite.java
@@ -151,68 +151,10 @@ public class ProcessLimitedComputerSuite extends AbstractGremlinSuite {
* A list of the minimum set of base tests that Gremlin flavors should implement to be compliant with Gremlin.
*/
private static final Class<?>[] testsToEnforce = new Class<?>[]{
- // branch
- BranchTest.class,
- ChooseTest.class,
- OptionalTest.class,
- LocalTest.class,
- RepeatTest.class,
- UnionTest.class,
-
- // filter
- AndTest.class,
- CoinTest.class,
- CyclicPathTest.class,
- DedupTest.class,
- FilterTest.class,
- HasTest.class,
- IsTest.class,
- OrTest.class,
- RangeTest.class,
- SampleTest.class,
- SimplePathTest.class,
- TailTest.class,
- WhereTest.class,
-
- // map
- CoalesceTest.class,
- ConstantTest.class,
- CountTest.class,
- FlatMapTest.class,
- ElementMapTest.class,
- FoldTest.class,
MatchTest.class,
- MathTest.class,
- MapTest.class,
- MaxTest.class,
- MeanTest.class,
- MinTest.class,
- SumTest.class,
- MatchTest.class,
- OrderTest.class,
- PageRankTest.class,
- // PeerPressureTest.class,
- PathTest.class,
ProfileTest.class,
- ProjectTest.class,
ProgramTest.class,
- PropertiesTest.class,
- ShortestPathTest.class,
- SelectTest.class,
- UnfoldTest.class,
- ValueMapTest.class,
- VertexTest.class,
-
- // sideEffect
- AddEdgeTest.class,
- AggregateTest.class,
- GroupTest.class,
- GroupCountTest.class,
- InjectTest.class,
- SackTest.class,
- SideEffectCapTest.class,
SideEffectTest.class,
- StoreTest.class,
SubgraphTest.class,
TreeTest.class
};
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedStandardSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedStandardSuite.java
index 1f5d6aa..ddf3280 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedStandardSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedStandardSuite.java
@@ -146,67 +146,8 @@ public class ProcessLimitedStandardSuite extends AbstractGremlinSuite {
* A list of the minimum set of base tests that Gremlin flavors should implement to be compliant with Gremlin.
*/
private static final Class<?>[] testsToEnforce = new Class<?>[]{
- // branch
- BranchTest.class,
- ChooseTest.class,
- OptionalTest.class,
- LocalTest.class,
- RepeatTest.class,
- UnionTest.class,
-
- // filter
- AndTest.class,
- CoinTest.class,
- CyclicPathTest.class,
- DedupTest.class,
- DropTest.class,
- FilterTest.class,
- HasTest.class,
- IsTest.class,
- OrTest.class,
- RangeTest.class,
- SampleTest.class,
- SimplePathTest.class,
- TailTest.class,
- WhereTest.class,
-
- // map
- AddEdgeTest.class,
- AddVertexTest.class,
- CoalesceTest.class,
- ConstantTest.class,
- CountTest.class,
- ElementMapTest.class,
- FlatMapTest.class,
- FoldTest.class,
- LoopsTest.class,
- IndexTest.class,
- MapTest.class,
- MatchTest.class,
- MathTest.class,
- MaxTest.class,
- MeanTest.class,
- MinTest.class,
- SumTest.class,
- OrderTest.class,
- PathTest.class,
- PropertiesTest.class,
ProfileTest.class,
- ProjectTest.class,
- SelectTest.class,
- VertexTest.class,
- UnfoldTest.class,
- ValueMapTest.class,
-
- // sideEffect
- AggregateTest.class,
- GroupTest.class,
- GroupCountTest.class,
- InjectTest.class,
- SackTest.class,
- SideEffectCapTest.class,
SideEffectTest.class,
- StoreTest.class,
SubgraphTest.class,
TreeTest.class,
};
diff --git a/hadoop-gremlin/src/test/resources/cucumber.properties b/hadoop-gremlin/src/test/resources/cucumber.properties
index 66a963b..b30d19d 100644
--- a/hadoop-gremlin/src/test/resources/cucumber.properties
+++ b/hadoop-gremlin/src/test/resources/cucumber.properties
@@ -1 +1 @@
-guice.injector-source=org.apache.tinkerpop.gremlin.hadoop.HadoopGraphFeatureTest$WorldInjectorSource
\ No newline at end of file
+guice.injector-source=org.apache.tinkerpop.gremlin.hadoop.HadoopGraphFeatureIntegrateTest$WorldInjectorSource
\ No newline at end of file
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputerProcessIntegrateTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputerProcessIntegrateTest.java
index f38dcf5..c909b5b 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputerProcessIntegrateTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputerProcessIntegrateTest.java
@@ -21,12 +21,13 @@ package org.apache.tinkerpop.gremlin.spark.process.computer;
import org.apache.tinkerpop.gremlin.GraphProviderClass;
import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
import org.apache.tinkerpop.gremlin.process.ProcessComputerSuite;
+import org.apache.tinkerpop.gremlin.process.ProcessLimitedStandardSuite;
import org.junit.runner.RunWith;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
-@RunWith(ProcessComputerSuite.class)
+@RunWith(ProcessLimitedStandardSuite.class)
@GraphProviderClass(provider = SparkHadoopGraphProvider.class, graph = HadoopGraph.class)
public class SparkGraphComputerProcessIntegrateTest {
}
diff --git a/spark-gremlin/src/test/resources/cucumber.properties b/spark-gremlin/src/test/resources/cucumber.properties
index 0180176..21cdec8 100644
--- a/spark-gremlin/src/test/resources/cucumber.properties
+++ b/spark-gremlin/src/test/resources/cucumber.properties
@@ -1 +1 @@
-guice.injector-source=org.apache.tinkerpop.gremlin.spark.SparkGraphFeatureTest$WorldInjectorSource
\ No newline at end of file
+guice.injector-source=org.apache.tinkerpop.gremlin.spark.SparkGraphFeatureIntegrateTest$WorldInjectorSource
\ No newline at end of file
[tinkerpop] 06/18: TINKERPOP-2601 Added group tags to feature tests
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 9d684ca1f5d931aef50cf37eb5fafcf13860580b
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Aug 18 07:36:12 2021 -0400
TINKERPOP-2601 Added group tags to feature tests
---
docs/src/dev/developer/for-committers.asciidoc | 15 +++++++++++++--
gremlin-test/features/branch/Branch.feature | 1 +
gremlin-test/features/branch/Choose.feature | 1 +
gremlin-test/features/branch/Local.feature | 1 +
gremlin-test/features/branch/Optional.feature | 1 +
gremlin-test/features/branch/Repeat.feature | 1 +
gremlin-test/features/branch/Union.feature | 1 +
gremlin-test/features/filter/And.feature | 1 +
gremlin-test/features/filter/Coin.feature | 1 +
gremlin-test/features/filter/CyclicPath.feature | 1 +
gremlin-test/features/filter/Dedup.feature | 1 +
gremlin-test/features/filter/Drop.feature | 1 +
gremlin-test/features/filter/Filter.feature | 1 +
gremlin-test/features/filter/Has.feature | 1 +
gremlin-test/features/filter/Is.feature | 1 +
gremlin-test/features/filter/Or.feature | 1 +
gremlin-test/features/filter/Range.feature | 1 +
gremlin-test/features/filter/Sample.feature | 1 +
gremlin-test/features/filter/SimplePath.feature | 1 +
gremlin-test/features/filter/Tail.feature | 1 +
gremlin-test/features/filter/Where.feature | 1 +
gremlin-test/features/map/AddEdge.feature | 1 +
gremlin-test/features/map/AddVertex.feature | 1 +
gremlin-test/features/map/Coalesce.feature | 1 +
gremlin-test/features/map/ConnectedComponent.feature | 1 +
gremlin-test/features/map/Constant.feature | 1 +
gremlin-test/features/map/Count.feature | 1 +
gremlin-test/features/map/ElementMap.feature | 1 +
gremlin-test/features/map/FlatMap.feature | 1 +
gremlin-test/features/map/Fold.feature | 1 +
gremlin-test/features/map/Graph.feature | 1 +
gremlin-test/features/map/Index.feature | 1 +
gremlin-test/features/map/Loops.feature | 1 +
gremlin-test/features/map/Map.feature | 1 +
gremlin-test/features/map/Match.feature | 1 +
gremlin-test/features/map/Math.feature | 1 +
gremlin-test/features/map/Max.feature | 1 +
gremlin-test/features/map/Mean.feature | 1 +
gremlin-test/features/map/Min.feature | 1 +
gremlin-test/features/map/Order.feature | 1 +
gremlin-test/features/map/PageRank.feature | 1 +
gremlin-test/features/map/Path.feature | 1 +
gremlin-test/features/map/PeerPressure.feature | 1 +
gremlin-test/features/map/Project.feature | 1 +
gremlin-test/features/map/Properties.feature | 1 +
gremlin-test/features/map/Select.feature | 1 +
gremlin-test/features/map/ShortestPath.feature | 1 +
gremlin-test/features/map/Sum.feature | 1 +
gremlin-test/features/map/Unfold.feature | 1 +
gremlin-test/features/map/ValueMap.feature | 1 +
gremlin-test/features/map/Vertex.feature | 1 +
gremlin-test/features/sideEffect/Aggregate.feature | 1 +
gremlin-test/features/sideEffect/Group.feature | 1 +
gremlin-test/features/sideEffect/GroupCount.feature | 1 +
gremlin-test/features/sideEffect/Inject.feature | 1 +
gremlin-test/features/sideEffect/Read.feature | 1 +
gremlin-test/features/sideEffect/Sack.feature | 1 +
gremlin-test/features/sideEffect/SideEffectCap.feature | 1 +
gremlin-test/features/sideEffect/Store.feature | 1 +
gremlin-test/features/sideEffect/Write.feature | 1 +
60 files changed, 72 insertions(+), 2 deletions(-)
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index 8a3bc67..60ba841 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -470,14 +470,25 @@ Scenario: g_V_outE_drop
[[gherkin-tags]]
==== Tags
+Features have tags associated with them to help allow developers to better break up test runs if they desire. There
+are two types of tags:
+
+* `@StepClass*` - Marks the step grouping and is a prefix that precedes and refers to one of the four types of steps:
+`Branch`, `Filter`, `Map`, and `SideEffect` (e.g. `@StepClassBranch`).
+* `@Step*` - Marks testing for a particular step. While this tag is generally unique to the feature
+file itself and test filtering could be accomplished at that level by way of the file, the use of the tag is a
+secondary option and allows filtering to be consistently managed by tags alone. The suffix is the Gremlin step itself
+(e.g. `@StepHas`) in all cases except for `@StepVertex` which covers `V()`, `E()`, `out()`, `in()`, `both()`, `inE()`,
+`outE()`, and `bothE()`.
+
Scenarios have tags associated with them that help identify subsets of tests so that a test runner can selectively
include or ignore certain tests. The tags enable the practical and necessary ability for providers to ignore tests that
they simply cannot support. It is important to be aware of the following tags when writing tests as not including a
tag when one is necessary will cause provider tests to fail:
-* *@MultiMetaProperties* - The scenario uses "The Crew" graph as a dataset or otherwise utilizes multi-properties
+* `@MultiMetaProperties` - The scenario uses "The Crew" graph as a dataset or otherwise utilizes multi-properties
or meta-properties for creating or querying data.
-* *@RemoteOnly* - The scenario uses some Gremlin syntax that cannot be supported outside of remote test executions. The
+* `@RemoteOnly` - The scenario uses some Gremlin syntax that cannot be supported outside of remote test executions. The
best example of this sort of test would be one that uses the remote `Lambda` syntax.
== Developing Benchmarks
diff --git a/gremlin-test/features/branch/Branch.feature b/gremlin-test/features/branch/Branch.feature
index c8a5b42..9045029 100644
--- a/gremlin-test/features/branch/Branch.feature
+++ b/gremlin-test/features/branch/Branch.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassBranch @StepBranch
Feature: Step - branch()
Scenario: g_V_branchXlabel_eq_person__a_bX_optionXa__ageX_optionXb__langX_optionXb__nameX
diff --git a/gremlin-test/features/branch/Choose.feature b/gremlin-test/features/branch/Choose.feature
index fdd98c4..42d7257 100644
--- a/gremlin-test/features/branch/Choose.feature
+++ b/gremlin-test/features/branch/Choose.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassBranch @StepChoose
Feature: Step - choose()
Scenario: g_V_chooseXout_countX_optionX2L_nameX_optionX3L_ageX
diff --git a/gremlin-test/features/branch/Local.feature b/gremlin-test/features/branch/Local.feature
index a2464b8..e3e8099 100644
--- a/gremlin-test/features/branch/Local.feature
+++ b/gremlin-test/features/branch/Local.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassBranch @StepLocal
Feature: Step - local()
@MultiMetaProperties
diff --git a/gremlin-test/features/branch/Optional.feature b/gremlin-test/features/branch/Optional.feature
index 5d700ea..26d33b4 100644
--- a/gremlin-test/features/branch/Optional.feature
+++ b/gremlin-test/features/branch/Optional.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassBranch @StepChoose
Feature: Step - choose()
Scenario: g_VX2X_optionalXoutXknowsXX
diff --git a/gremlin-test/features/branch/Repeat.feature b/gremlin-test/features/branch/Repeat.feature
index e7243b6..bc2f520 100644
--- a/gremlin-test/features/branch/Repeat.feature
+++ b/gremlin-test/features/branch/Repeat.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassBranch @StepRepeat
Feature: Step - repeat()
Scenario: g_V_repeatXoutX_timesX2X_emit_path
diff --git a/gremlin-test/features/branch/Union.feature b/gremlin-test/features/branch/Union.feature
index 24d7e4d..0f60240 100644
--- a/gremlin-test/features/branch/Union.feature
+++ b/gremlin-test/features/branch/Union.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassBranch @StepUnion
Feature: Step - union()
Scenario: g_V_unionXout__inX_name
diff --git a/gremlin-test/features/filter/And.feature b/gremlin-test/features/filter/And.feature
index f137841..b368707 100644
--- a/gremlin-test/features/filter/And.feature
+++ b/gremlin-test/features/filter/And.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepAnd
Feature: Step - and()
Scenario: g_V_andXhasXage_gt_27X__outE_count_gte_2X_name
diff --git a/gremlin-test/features/filter/Coin.feature b/gremlin-test/features/filter/Coin.feature
index b9e8ac8..20e405e 100644
--- a/gremlin-test/features/filter/Coin.feature
+++ b/gremlin-test/features/filter/Coin.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepCoin
Feature: Step - coin()
Scenario: g_V_coinX1X
diff --git a/gremlin-test/features/filter/CyclicPath.feature b/gremlin-test/features/filter/CyclicPath.feature
index b49bf3b..8bdb7a2 100644
--- a/gremlin-test/features/filter/CyclicPath.feature
+++ b/gremlin-test/features/filter/CyclicPath.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepCyclicPath
Feature: Step - cyclicPath()
Scenario: g_VX1X_outXcreatedX_inXcreatedX_cyclicPath
diff --git a/gremlin-test/features/filter/Dedup.feature b/gremlin-test/features/filter/Dedup.feature
index a143cc2..228205f 100644
--- a/gremlin-test/features/filter/Dedup.feature
+++ b/gremlin-test/features/filter/Dedup.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepDedup
Feature: Step - dedup()
Scenario: g_V_out_in_valuesXnameX_fold_dedupXlocalX_unfold
diff --git a/gremlin-test/features/filter/Drop.feature b/gremlin-test/features/filter/Drop.feature
index 1ee97cc..7ae64e3 100644
--- a/gremlin-test/features/filter/Drop.feature
+++ b/gremlin-test/features/filter/Drop.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepDrop
Feature: Step - drop()
Scenario: g_V_drop
diff --git a/gremlin-test/features/filter/Filter.feature b/gremlin-test/features/filter/Filter.feature
index c85bb22..6aa368b 100644
--- a/gremlin-test/features/filter/Filter.feature
+++ b/gremlin-test/features/filter/Filter.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepFilter
Feature: Step - filter()
Scenario: g_V_filterXfalseX
diff --git a/gremlin-test/features/filter/Has.feature b/gremlin-test/features/filter/Has.feature
index 11fd48d..54b6e17 100644
--- a/gremlin-test/features/filter/Has.feature
+++ b/gremlin-test/features/filter/Has.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepHas
Feature: Step - has()
Scenario: g_V_outXcreatedX_hasXname__mapXlengthX_isXgtX3XXX_name
diff --git a/gremlin-test/features/filter/Is.feature b/gremlin-test/features/filter/Is.feature
index 9a68d18..04f8c5c 100644
--- a/gremlin-test/features/filter/Is.feature
+++ b/gremlin-test/features/filter/Is.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepIs
Feature: Step - coin()
Scenario: g_V_valuesXageX_isX32X
diff --git a/gremlin-test/features/filter/Or.feature b/gremlin-test/features/filter/Or.feature
index b294532..5cd4333 100644
--- a/gremlin-test/features/filter/Or.feature
+++ b/gremlin-test/features/filter/Or.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepOr
Feature: Step - or()
Scenario: g_V_orXhasXage_gt_27X__outE_count_gte_2X_name
diff --git a/gremlin-test/features/filter/Range.feature b/gremlin-test/features/filter/Range.feature
index 62f62a5..1bb9d53 100644
--- a/gremlin-test/features/filter/Range.feature
+++ b/gremlin-test/features/filter/Range.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepRange
Feature: Step - range()
Scenario: g_VX1X_out_limitX2X
diff --git a/gremlin-test/features/filter/Sample.feature b/gremlin-test/features/filter/Sample.feature
index eb7d3a3..70bb82f 100644
--- a/gremlin-test/features/filter/Sample.feature
+++ b/gremlin-test/features/filter/Sample.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepSample
Feature: Step - sample()
Scenario: g_E_sampleX1X
diff --git a/gremlin-test/features/filter/SimplePath.feature b/gremlin-test/features/filter/SimplePath.feature
index 97a1b9b..c97de36 100644
--- a/gremlin-test/features/filter/SimplePath.feature
+++ b/gremlin-test/features/filter/SimplePath.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepSimplePath
Feature: Step - simplePath()
Scenario: g_VX1X_outXcreatedX_inXcreatedX_simplePath
diff --git a/gremlin-test/features/filter/Tail.feature b/gremlin-test/features/filter/Tail.feature
index cfc6f69..95d5cb7 100644
--- a/gremlin-test/features/filter/Tail.feature
+++ b/gremlin-test/features/filter/Tail.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepTail
Feature: Step - tail()
Scenario: g_V_valuesXnameX_order_tailXglobal_2X
diff --git a/gremlin-test/features/filter/Where.feature b/gremlin-test/features/filter/Where.feature
index f4e8f9b..6266675 100644
--- a/gremlin-test/features/filter/Where.feature
+++ b/gremlin-test/features/filter/Where.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassFilter @StepWhere
Feature: Step - where()
Scenario: g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXa_eqXbXX
diff --git a/gremlin-test/features/map/AddEdge.feature b/gremlin-test/features/map/AddEdge.feature
index f721c12..8deb34e 100644
--- a/gremlin-test/features/map/AddEdge.feature
+++ b/gremlin-test/features/map/AddEdge.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepAddE
Feature: Step - addE()
Scenario: g_VX1X_asXaX_outXcreatedX_addEXcreatedByX_toXaX
diff --git a/gremlin-test/features/map/AddVertex.feature b/gremlin-test/features/map/AddVertex.feature
index 759817c..e4e676f 100644
--- a/gremlin-test/features/map/AddVertex.feature
+++ b/gremlin-test/features/map/AddVertex.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepAddV
Feature: Step - addV()
Scenario: g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX
diff --git a/gremlin-test/features/map/Coalesce.feature b/gremlin-test/features/map/Coalesce.feature
index 06688c0..028cd58 100644
--- a/gremlin-test/features/map/Coalesce.feature
+++ b/gremlin-test/features/map/Coalesce.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepCoalesce
Feature: Step - coalesce()
Scenario: g_V_coalesceXoutXfooX_outXbarXX
diff --git a/gremlin-test/features/map/ConnectedComponent.feature b/gremlin-test/features/map/ConnectedComponent.feature
index 0f95488..3933a6c 100644
--- a/gremlin-test/features/map/ConnectedComponent.feature
+++ b/gremlin-test/features/map/ConnectedComponent.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepConnectedComponent
Feature: Step - connectedComponent()
Scenario: g_V_connectedComponent_hasXcomponentX
diff --git a/gremlin-test/features/map/Constant.feature b/gremlin-test/features/map/Constant.feature
index ed25b25..ddbfa2a 100644
--- a/gremlin-test/features/map/Constant.feature
+++ b/gremlin-test/features/map/Constant.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepConstant
Feature: Step - constant()
Scenario: g_V_constantX123X
diff --git a/gremlin-test/features/map/Count.feature b/gremlin-test/features/map/Count.feature
index 6e47ab7..474233a 100644
--- a/gremlin-test/features/map/Count.feature
+++ b/gremlin-test/features/map/Count.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepCount
Feature: Step - count()
Scenario: g_V_count
diff --git a/gremlin-test/features/map/ElementMap.feature b/gremlin-test/features/map/ElementMap.feature
index 45720ac..1188783 100644
--- a/gremlin-test/features/map/ElementMap.feature
+++ b/gremlin-test/features/map/ElementMap.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepElementMap
Feature: Step - elementMap()
Scenario: g_V_elementMap
diff --git a/gremlin-test/features/map/FlatMap.feature b/gremlin-test/features/map/FlatMap.feature
index 7384ee3..6924a10 100644
--- a/gremlin-test/features/map/FlatMap.feature
+++ b/gremlin-test/features/map/FlatMap.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepFlatMap
Feature: Step - flatMap()
Scenario: g_V_asXaX_flatMapXselectXaXX
diff --git a/gremlin-test/features/map/Fold.feature b/gremlin-test/features/map/Fold.feature
index c4c0f80..d595472 100644
--- a/gremlin-test/features/map/Fold.feature
+++ b/gremlin-test/features/map/Fold.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepFold
Feature: Step - fold()
Scenario: g_V_fold
diff --git a/gremlin-test/features/map/Graph.feature b/gremlin-test/features/map/Graph.feature
index 3e017d1..d86ae75 100644
--- a/gremlin-test/features/map/Graph.feature
+++ b/gremlin-test/features/map/Graph.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepV
Feature: Step - V()
Scenario: g_VX1X_V_valuesXnameX
diff --git a/gremlin-test/features/map/Index.feature b/gremlin-test/features/map/Index.feature
index 04c190b..3886709 100644
--- a/gremlin-test/features/map/Index.feature
+++ b/gremlin-test/features/map/Index.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepIndex
Feature: Step - index()
Scenario: g_V_hasLabelXsoftwareX_index_unfold
diff --git a/gremlin-test/features/map/Loops.feature b/gremlin-test/features/map/Loops.feature
index d1c0b9e..9032180 100644
--- a/gremlin-test/features/map/Loops.feature
+++ b/gremlin-test/features/map/Loops.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepLoops
Feature: Step - loops()
Scenario: g_VX1X_repeatXboth_simplePathX_untilXhasXname_peterX_or_loops_isX3XX_hasXname_peterX_path_byXnameX
diff --git a/gremlin-test/features/map/Map.feature b/gremlin-test/features/map/Map.feature
index 58f5d37..cc2d8c7 100644
--- a/gremlin-test/features/map/Map.feature
+++ b/gremlin-test/features/map/Map.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepMap
Feature: Step - map()
Scenario: g_VX1X_mapXnameX
diff --git a/gremlin-test/features/map/Match.feature b/gremlin-test/features/map/Match.feature
index 65ee6b2..6ec49fd 100644
--- a/gremlin-test/features/map/Match.feature
+++ b/gremlin-test/features/map/Match.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepMatch
Feature: Step - match()
Scenario: g_V_valueMap_matchXa_selectXnameX_bX
diff --git a/gremlin-test/features/map/Math.feature b/gremlin-test/features/map/Math.feature
index 64ba078..b797425 100644
--- a/gremlin-test/features/map/Math.feature
+++ b/gremlin-test/features/map/Math.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepMath
Feature: Step - math()
Scenario: g_V_outE_mathX0_minus_itX_byXweightX
diff --git a/gremlin-test/features/map/Max.feature b/gremlin-test/features/map/Max.feature
index 4288563..0d85cce 100644
--- a/gremlin-test/features/map/Max.feature
+++ b/gremlin-test/features/map/Max.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepMax
Feature: Step - max()
Scenario: g_V_age_max
diff --git a/gremlin-test/features/map/Mean.feature b/gremlin-test/features/map/Mean.feature
index bb2617d..97352d6 100644
--- a/gremlin-test/features/map/Mean.feature
+++ b/gremlin-test/features/map/Mean.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepMean
Feature: Step - mean()
Scenario: g_V_age_mean
diff --git a/gremlin-test/features/map/Min.feature b/gremlin-test/features/map/Min.feature
index 8d90a64..acb5d04 100644
--- a/gremlin-test/features/map/Min.feature
+++ b/gremlin-test/features/map/Min.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepMin
Feature: Step - min()
Scenario: g_V_age_min
diff --git a/gremlin-test/features/map/Order.feature b/gremlin-test/features/map/Order.feature
index 89cf9da..fde6fec 100644
--- a/gremlin-test/features/map/Order.feature
+++ b/gremlin-test/features/map/Order.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepOrder
Feature: Step - order()
Scenario: g_V_name_order
diff --git a/gremlin-test/features/map/PageRank.feature b/gremlin-test/features/map/PageRank.feature
index 479a309..d80cab0 100644
--- a/gremlin-test/features/map/PageRank.feature
+++ b/gremlin-test/features/map/PageRank.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepPageRank
Feature: Step - pageRank()
Scenario: g_V_pageRank_hasXpageRankX
diff --git a/gremlin-test/features/map/Path.feature b/gremlin-test/features/map/Path.feature
index 1f49128..9dc86ba 100644
--- a/gremlin-test/features/map/Path.feature
+++ b/gremlin-test/features/map/Path.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepPath
Feature: Step - path()
Scenario: g_VX1X_name_path
diff --git a/gremlin-test/features/map/PeerPressure.feature b/gremlin-test/features/map/PeerPressure.feature
index 4b73300..29f5c13 100644
--- a/gremlin-test/features/map/PeerPressure.feature
+++ b/gremlin-test/features/map/PeerPressure.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepPeerPressure
Feature: Step - peerPressure()
Scenario: g_V_peerPressure_hasXclusterX
diff --git a/gremlin-test/features/map/Project.feature b/gremlin-test/features/map/Project.feature
index 1749693..bbcf9a4 100644
--- a/gremlin-test/features/map/Project.feature
+++ b/gremlin-test/features/map/Project.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepProject
Feature: Step - project()
Scenario: g_V_hasLabelXpersonX_projectXa_bX_byXoutE_countX_byXageX
diff --git a/gremlin-test/features/map/Properties.feature b/gremlin-test/features/map/Properties.feature
index 58daa6a..ddcfdad 100644
--- a/gremlin-test/features/map/Properties.feature
+++ b/gremlin-test/features/map/Properties.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepProperties
Feature: Step - properties()
Scenario: g_V_hasXageX_propertiesXnameX
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index 84d8971..485372d 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepSelect
Feature: Step - select()
Scenario: g_VX1X_asXaX_outXknowsX_asXbX_selectXa_bX
diff --git a/gremlin-test/features/map/ShortestPath.feature b/gremlin-test/features/map/ShortestPath.feature
index 2147985..bfe1925 100644
--- a/gremlin-test/features/map/ShortestPath.feature
+++ b/gremlin-test/features/map/ShortestPath.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepShortestPath
Feature: Step - shortestPath()
Scenario: g_V_shortestPath
diff --git a/gremlin-test/features/map/Sum.feature b/gremlin-test/features/map/Sum.feature
index f2993df..97165b8 100644
--- a/gremlin-test/features/map/Sum.feature
+++ b/gremlin-test/features/map/Sum.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepSum
Feature: Step - sum()
Scenario: g_V_age_sum
diff --git a/gremlin-test/features/map/Unfold.feature b/gremlin-test/features/map/Unfold.feature
index 5360471..68c295d 100644
--- a/gremlin-test/features/map/Unfold.feature
+++ b/gremlin-test/features/map/Unfold.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepUnfold
Feature: Step - unfold()
Scenario: g_V_localXoutE_foldX_unfold
diff --git a/gremlin-test/features/map/ValueMap.feature b/gremlin-test/features/map/ValueMap.feature
index 8be2d30..20a57b5 100644
--- a/gremlin-test/features/map/ValueMap.feature
+++ b/gremlin-test/features/map/ValueMap.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepValueMap
Feature: Step - valueMap()
Scenario: g_V_valueMap
diff --git a/gremlin-test/features/map/Vertex.feature b/gremlin-test/features/map/Vertex.feature
index 760ebb8..121a0d7 100644
--- a/gremlin-test/features/map/Vertex.feature
+++ b/gremlin-test/features/map/Vertex.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassMap @StepVertex
Feature: Step - V(), E(), out(), in(), both(), inE(), outE(), bothE()
Scenario: g_VXlistX1_2_3XX_name
diff --git a/gremlin-test/features/sideEffect/Aggregate.feature b/gremlin-test/features/sideEffect/Aggregate.feature
index 38a609a..1f00ba2 100644
--- a/gremlin-test/features/sideEffect/Aggregate.feature
+++ b/gremlin-test/features/sideEffect/Aggregate.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassSideEffect @StepAggregate
Feature: Step - aggregate()
Scenario: g_V_valueXnameX_aggregateXxX_capXxX
diff --git a/gremlin-test/features/sideEffect/Group.feature b/gremlin-test/features/sideEffect/Group.feature
index fde0c8d..54b0435 100644
--- a/gremlin-test/features/sideEffect/Group.feature
+++ b/gremlin-test/features/sideEffect/Group.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassSideEffect @StepGroup
Feature: Step - group()
Scenario: g_V_group_byXnameX
diff --git a/gremlin-test/features/sideEffect/GroupCount.feature b/gremlin-test/features/sideEffect/GroupCount.feature
index 53acd6d..98de286 100644
--- a/gremlin-test/features/sideEffect/GroupCount.feature
+++ b/gremlin-test/features/sideEffect/GroupCount.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassSideEffect @StepCount
Feature: Step - groupCount()
Scenario: g_V_outXcreatedX_groupCount_byXnameX
diff --git a/gremlin-test/features/sideEffect/Inject.feature b/gremlin-test/features/sideEffect/Inject.feature
index bf5a23f..5c13406 100644
--- a/gremlin-test/features/sideEffect/Inject.feature
+++ b/gremlin-test/features/sideEffect/Inject.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassSideEffect @StepInject
Feature: Step - inject()
Scenario: g_VX1X_out_injectXv2X_name
diff --git a/gremlin-test/features/sideEffect/Read.feature b/gremlin-test/features/sideEffect/Read.feature
index ae96102..924f85e 100644
--- a/gremlin-test/features/sideEffect/Read.feature
+++ b/gremlin-test/features/sideEffect/Read.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassSideEffect @StepRead
Feature: Step - read()
Scenario: g_io_readXkryoX
diff --git a/gremlin-test/features/sideEffect/Sack.feature b/gremlin-test/features/sideEffect/Sack.feature
index 6c4627d..5f243c2 100644
--- a/gremlin-test/features/sideEffect/Sack.feature
+++ b/gremlin-test/features/sideEffect/Sack.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassSideEffect @StepSack
Feature: Step - sack()
Scenario: g_withSackXhelloX_V_outE_sackXassignX_byXlabelX_inV_sack
diff --git a/gremlin-test/features/sideEffect/SideEffectCap.feature b/gremlin-test/features/sideEffect/SideEffectCap.feature
index dae07da..29f26eb 100644
--- a/gremlin-test/features/sideEffect/SideEffectCap.feature
+++ b/gremlin-test/features/sideEffect/SideEffectCap.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassSideEffect @StepCap
Feature: Step - cap()
Scenario: g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX
diff --git a/gremlin-test/features/sideEffect/Store.feature b/gremlin-test/features/sideEffect/Store.feature
index deb1264..bf20cea 100644
--- a/gremlin-test/features/sideEffect/Store.feature
+++ b/gremlin-test/features/sideEffect/Store.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassSideEffect @StepStore
Feature: Step - store()
Scenario: g_V_storeXa_nameX_out_capXaX
diff --git a/gremlin-test/features/sideEffect/Write.feature b/gremlin-test/features/sideEffect/Write.feature
index 9a774e8..79dc086 100644
--- a/gremlin-test/features/sideEffect/Write.feature
+++ b/gremlin-test/features/sideEffect/Write.feature
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+@StepClassSideEffect @StepWrite
Feature: Step - write()
Scenario: g_io_writeXkryoX