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 2023/09/07 17:17:55 UTC
[tinkerpop] branch master updated: TINKERPOP-2921 Fixed bug in labelled group() filtering CTR
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/master by this push:
new 191fb1510e TINKERPOP-2921 Fixed bug in labelled group() filtering CTR
new 65acd5dcbf Merge branch '3.6-dev'
191fb1510e is described below
commit 191fb1510e10da832f74319ef9664cea363a957d
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Sep 7 12:55:44 2023 -0400
TINKERPOP-2921 Fixed bug in labelled group() filtering CTR
---
CHANGELOG.asciidoc | 7 +-
.../step/sideEffect/GroupSideEffectStep.java | 14 ++-
.../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 21 ++--
gremlin-go/driver/cucumber/gremlin.go | 21 ++--
.../gremlin-javascript/test/cucumber/gremlin.js | 21 ++--
gremlin-python/src/main/python/radish/gremlin.py | 21 ++--
.../gremlin/test/features/sideEffect/Group.feature | 113 -------------------
.../test/features/sideEffect/SideEffectCap.feature | 124 +++++++++++++++++++++
8 files changed, 181 insertions(+), 161 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 3a4a338a34..6ee4818231 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,11 +25,12 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
This release also includes changes from <<release-3-5-8, 3.5.8>>.
-* Fix a javadoc comment in GraphTraversal.not method.
+* Fixed a javadoc comment in `GraphTraversal.not()` method.
* Allowed `gremlin-driver` to be used over HTTP for experimental purposes.
* Deprecated the `HandshakeInterceptor` in favor of a more generic `RequestInterceptor`.
-* Fix a bug in `StarGraph` where `EdgeFilter` did not remove associated Edge Properties
-* Added translator to the Go GLV
+* Fixed a bug in `StarGraph` where `EdgeFilter` did not remove associated Edge Properties.
+* Added translator to the Go GLV.
+* Fixed bug with filtering for `group()` when the side-effect label was defined for it.
[[release-3-6-5]]
=== TinkerPop 3.6.5 (Release Date: July 31, 2023)
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupSideEffectStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupSideEffectStep.java
index 94674672ee..f4cc2b0ee9 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupSideEffectStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupSideEffectStep.java
@@ -130,11 +130,15 @@ public final class GroupSideEffectStep<S, K, V> extends SideEffectStep<S>
resetBarrierForProfiling = false;
}
- if (null == this.barrierStep) {
- if (this.valueTraversal.hasNext())
- map.put(TraversalUtil.applyNullable(traverser, this.keyTraversal), (V) this.valueTraversal.next());
- } else if (this.barrierStep.hasNextBarrier())
- map.put(TraversalUtil.applyNullable(traverser, this.keyTraversal), (V) this.barrierStep.nextBarrier());
+ TraversalUtil.produce(traverser, this.keyTraversal).ifProductive(p -> {
+ if (null == this.barrierStep) {
+ if (this.valueTraversal.hasNext()) {
+ map.put((K) p, (V) this.valueTraversal.next());
+ }
+ } else if (this.barrierStep.hasNextBarrier())
+ map.put((K) p, (V) this.barrierStep.nextBarrier());
+ });
+
if (!map.isEmpty())
this.getTraversal().getSideEffects().add(this.sideEffectKey, map);
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
index 81240d933a..473c2a4908 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
@@ -1094,26 +1094,16 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_withStrategiesXProductiveByStrategyX_V_group_byXageX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new ProductiveByStrategy(productiveKeys: new List<object> {})).V().Group<object,object>().By("age")}},
{"g_V_group_byXnameX_byXageX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group<object,object>().By("name").By("age")}},
{"g_V_group_byXnameX_by", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group<object,object>().By("name").By()}},
- {"g_V_groupXaX_byXnameX_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group("a").By("name").Cap<object>("a")}},
- {"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().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")}},
{"g_V_group_byXname_substring_1X_byXconstantX1XX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group<object,object>().By((IFunction) p["l1"]).By(__.Constant<object>(1))}},
- {"g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group("a").By((IFunction) p["l1"]).By(__.Constant<object>(1)).Cap<object>("a")}},
{"g_V_out_group_byXlabelX_selectXpersonX_unfold_outXcreatedX_name_limitX2X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Out().Group<object,object>().By(T.Label).Select<object>("person").Unfold<object>().Out("created").Values<object>("name").Limit<object>(2)}},
{"g_V_hasLabelXsongX_group_byXnameX_byXproperties_groupCount_byXlabelXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("song").Group<object,object>().By("name").By(__.Properties<object>().GroupCount<object>().By(T.Label))}},
- {"g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("song").Group("a").By("name").By(__.Properties<object>().GroupCount<object>().By(T.Label)).Out().Cap<object>("a")}},
{"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_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())}},
- {"g_V_groupXmX_byXlabelX_byXlabel_countX_capXmX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group("m").By(__.Label()).By(__.Label().Count()).Cap<object>("m")}},
{"g_V_outXcreatedX_groupCount_byXnameX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Out("created").GroupCount<object>().By("name")}},
{"g_V_groupCount_byXageX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().GroupCount<object>().By("age")}},
{"g_withStrategiesXProductiveByStrategyX_V_groupCount_byXageX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new ProductiveByStrategy(productiveKeys: new List<object> {})).V().GroupCount<object>().By("age")}},
@@ -1157,6 +1147,17 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithSack(1.0,Operator.Sum).V(p["vid1"]).Local<object>(__.Out("knows").Barrier(Barrier.NormSack)).In("knows").Barrier().Sack<object>()}},
{"g_V_sackXassignX_byXageX_sack", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Sack(Operator.Assign).By("age").Sack<object>()}},
{"g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("age").GroupCount("a").By("name").Out().Cap<object>("a")}},
+ {"g_V_groupXaX_byXageX_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group("a").By("age").Cap<object>("a")}},
+ {"g_V_groupXaX_byXnameX_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group("a").By("name").Cap<object>("a")}},
+ {"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_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_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_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")}},
+ {"g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group("a").By((IFunction) p["l1"]).By(__.Constant<object>(1)).Cap<object>("a")}},
+ {"g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().HasLabel("song").Group("a").By("name").By(__.Properties<object>().GroupCount<object>().By(T.Label)).Out().Cap<object>("a")}},
+ {"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_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_groupXmX_byXlabelX_byXlabel_countX_capXmX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Group("m").By(__.Label()).By(__.Label().Count()).Cap<object>("m")}},
{"g_V_storeXa_nameX_out_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Store("a").By("name").Out().Cap<object>("a")}},
{"g_VX1X_storeXaX_byXnameX_out_storeXaX_byXnameX_name_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Store("a").By("name").Out().Store("a").By("name").Values<object>("name").Cap<object>("a")}},
{"g_withSideEffectXa_setX_V_both_name_storeXaX_capXaX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithSideEffect("a",p["xx1"]).V().Both().Values<object>("name").Store("a").Cap<object>("a")}},
diff --git a/gremlin-go/driver/cucumber/gremlin.go b/gremlin-go/driver/cucumber/gremlin.go
index 93219605f6..bfa5ac1c73 100644
--- a/gremlin-go/driver/cucumber/gremlin.go
+++ b/gremlin-go/driver/cucumber/gremlin.go
@@ -1065,26 +1065,16 @@ var translationMap = map[string][]func(g *gremlingo.GraphTraversalSource, p map[
"g_withStrategiesXProductiveByStrategyX_V_group_byXageX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.ProductiveByStrategy(gremlingo.ProductiveByStrategyConfig{ProductiveKeys: []string{}})).V().Group().By("age")}},
"g_V_group_byXnameX_byXageX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group().By("name").By("age")}},
"g_V_group_byXnameX_by": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group().By("name").By()}},
- "g_V_groupXaX_byXnameX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group("a").By("name").Cap("a")}},
- "g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Has("lang").Group("a").By("lang").By("name").Out().Cap("a")}},
"g_V_hasXlangX_group_byXlangX_byXcountX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Has("lang").Group().By("lang").By(gremlingo.T__.Count())}},
- "g_V_repeatXout_groupXaX_byXnameX_byXcountX_timesX2X_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Repeat(gremlingo.T__.Out().Group("a").By("name").By(gremlingo.T__.Count())).Times(2).Cap("a")}},
"g_V_group_byXoutE_countX_byXnameX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Order().By("name").Group().By(gremlingo.T__.OutE().Count()).By("name")}},
- "g_V_groupXaX_byXlabelX_byXoutE_weight_sumX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group("a").By(gremlingo.T.Label).By(gremlingo.T__.OutE().Values("weight").Sum()).Cap("a")}},
"g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byXcountX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Repeat(gremlingo.T__.Both("followedBy")).Times(2).Group().By("songType").By(gremlingo.T__.Count())}},
- "g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byXcountX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Repeat(gremlingo.T__.Both("followedBy")).Times(2).Group("a").By("songType").By(gremlingo.T__.Count()).Cap("a")}},
"g_V_group_byXname_substring_1X_byXconstantX1XX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group().By(p["l1"]).By(gremlingo.T__.Constant(1))}},
- "g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group("a").By(p["l1"]).By(gremlingo.T__.Constant(1)).Cap("a")}},
"g_V_out_group_byXlabelX_selectXpersonX_unfold_outXcreatedX_name_limitX2X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Out().Group().By(gremlingo.T.Label).Select("person").Unfold().Out("created").Values("name").Limit(2)}},
"g_V_hasLabelXsongX_group_byXnameX_byXproperties_groupCount_byXlabelXX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().HasLabel("song").Group().By("name").By(gremlingo.T__.Properties().GroupCount().By(gremlingo.T.Label))}},
- "g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().HasLabel("song").Group("a").By("name").By(gremlingo.T__.Properties().GroupCount().By(gremlingo.T.Label)).Out().Cap("a")}},
"g_V_outXfollowedByX_group_byXsongTypeX_byXbothE_group_byXlabelX_byXweight_sumXX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Out("followedBy").Group().By("songType").By(gremlingo.T__.BothE().Group().By(gremlingo.T.Label).By(gremlingo.T__.Values("weight").Sum()))}},
- "g_V_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group("m").By("name").By(gremlingo.T__.In("knows").Values("name")).Cap("m")}},
"g_V_group_byXlabelX_byXbothE_groupXaX_byXlabelX_byXweight_sumX_weight_sumX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group().By(gremlingo.T.Label).By(gremlingo.T__.BothE().Group("a").By(gremlingo.T.Label).By(gremlingo.T__.Values("weight").Sum()).Values("weight").Sum())}},
"g_V_hasLabelXpersonX_asXpX_outXcreatedX_group_byXnameX_byXselectXpX_valuesXageX_sumX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().HasLabel("person").As("p").Out("created").Group().By("name").By(gremlingo.T__.Select("p").Values("age").Sum())}},
- "g_V_hasLabelXpersonX_asXpX_outXcreatedX_groupXaX_byXnameX_byXselectXpX_valuesXageX_sumX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().HasLabel("person").As("p").Out("created").Group("a").By("name").By(gremlingo.T__.Select("p").Values("age").Sum()).Cap("a")}},
"g_V_group_byXlabelX_byXlabel_countX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group().By(gremlingo.T__.Label()).By(gremlingo.T__.Label().Count())}},
- "g_V_groupXmX_byXlabelX_byXlabel_countX_capXmX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group("m").By(gremlingo.T__.Label()).By(gremlingo.T__.Label().Count()).Cap("m")}},
"g_V_outXcreatedX_groupCount_byXnameX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Out("created").GroupCount().By("name")}},
"g_V_groupCount_byXageX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().GroupCount().By("age")}},
"g_withStrategiesXProductiveByStrategyX_V_groupCount_byXageX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.ProductiveByStrategy(gremlingo.ProductiveByStrategyConfig{ProductiveKeys: []string{}})).V().GroupCount().By("age")}},
@@ -1128,6 +1118,17 @@ var translationMap = map[string][]func(g *gremlingo.GraphTraversalSource, p map[
"g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithSack(1.0, gremlingo.Operator.Sum).V(p["vid1"]).Local(gremlingo.T__.Out("knows").Barrier(gremlingo.Barrier.NormSack)).In("knows").Barrier().Sack()}},
"g_V_sackXassignX_byXageX_sack": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Sack(gremlingo.Operator.Assign).By("age").Sack()}},
"g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Has("age").GroupCount("a").By("name").Out().Cap("a")}},
+ "g_V_groupXaX_byXageX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group("a").By("age").Cap("a")}},
+ "g_V_groupXaX_byXnameX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group("a").By("name").Cap("a")}},
+ "g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Has("lang").Group("a").By("lang").By("name").Out().Cap("a")}},
+ "g_V_repeatXout_groupXaX_byXnameX_byXcountX_timesX2X_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Repeat(gremlingo.T__.Out().Group("a").By("name").By(gremlingo.T__.Count())).Times(2).Cap("a")}},
+ "g_V_groupXaX_byXlabelX_byXoutE_weight_sumX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group("a").By(gremlingo.T.Label).By(gremlingo.T__.OutE().Values("weight").Sum()).Cap("a")}},
+ "g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byXcountX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Repeat(gremlingo.T__.Both("followedBy")).Times(2).Group("a").By("songType").By(gremlingo.T__.Count()).Cap("a")}},
+ "g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group("a").By(p["l1"]).By(gremlingo.T__.Constant(1)).Cap("a")}},
+ "g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().HasLabel("song").Group("a").By("name").By(gremlingo.T__.Properties().GroupCount().By(gremlingo.T.Label)).Out().Cap("a")}},
+ "g_V_hasLabelXpersonX_asXpX_outXcreatedX_groupXaX_byXnameX_byXselectXpX_valuesXageX_sumX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().HasLabel("person").As("p").Out("created").Group("a").By("name").By(gremlingo.T__.Select("p").Values("age").Sum()).Cap("a")}},
+ "g_V_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group("m").By("name").By(gremlingo.T__.In("knows").Values("name")).Cap("m")}},
+ "g_V_groupXmX_byXlabelX_byXlabel_countX_capXmX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Group("m").By(gremlingo.T__.Label()).By(gremlingo.T__.Label().Count()).Cap("m")}},
"g_V_storeXa_nameX_out_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Store("a").By("name").Out().Cap("a")}},
"g_VX1X_storeXaX_byXnameX_out_storeXaX_byXnameX_name_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V(p["vid1"]).Store("a").By("name").Out().Store("a").By("name").Values("name").Cap("a")}},
"g_withSideEffectXa_setX_V_both_name_storeXaX_capXaX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithSideEffect("a", p["xx1"]).V().Both().Values("name").Store("a").Cap("a")}},
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 4849cf7b52..ef2936d14f 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
@@ -1084,26 +1084,16 @@ const gremlins = {
g_withStrategiesXProductiveByStrategyX_V_group_byXageX: [function({g}) { return g.withStrategies(new ProductiveByStrategy({productiveKeys:[]})).V().group().by("age") }],
g_V_group_byXnameX_byXageX: [function({g}) { return g.V().group().by("name").by("age") }],
g_V_group_byXnameX_by: [function({g}) { return g.V().group().by("name").by() }],
- g_V_groupXaX_byXnameX_capXaX: [function({g}) { return g.V().group("a").by("name").cap("a") }],
- 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().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") }],
g_V_group_byXname_substring_1X_byXconstantX1XX: [function({g, l1}) { return g.V().group().by(l1).by(__.constant(1)) }],
- g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX: [function({g, l1}) { return g.V().group("a").by(l1).by(__.constant(1)).cap("a") }],
g_V_out_group_byXlabelX_selectXpersonX_unfold_outXcreatedX_name_limitX2X: [function({g}) { return g.V().out().group().by(T.label).select("person").unfold().out("created").values("name").limit(2) }],
g_V_hasLabelXsongX_group_byXnameX_byXproperties_groupCount_byXlabelXX: [function({g}) { return g.V().hasLabel("song").group().by("name").by(__.properties().groupCount().by(T.label)) }],
- g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX: [function({g}) { return g.V().hasLabel("song").group("a").by("name").by(__.properties().groupCount().by(T.label)).out().cap("a") }],
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_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()) }],
- g_V_groupXmX_byXlabelX_byXlabel_countX_capXmX: [function({g}) { return g.V().group("m").by(__.label()).by(__.label().count()).cap("m") }],
g_V_outXcreatedX_groupCount_byXnameX: [function({g}) { return g.V().out("created").groupCount().by("name") }],
g_V_groupCount_byXageX: [function({g}) { return g.V().groupCount().by("age") }],
g_withStrategiesXProductiveByStrategyX_V_groupCount_byXageX: [function({g}) { return g.withStrategies(new ProductiveByStrategy({productiveKeys:[]})).V().groupCount().by("age") }],
@@ -1147,6 +1137,17 @@ const gremlins = {
g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack: [function({g, vid1}) { return g.withSack(1.0,Operator.sum).V(vid1).local(__.out("knows").barrier(Barrier.normSack)).in_("knows").barrier().sack() }],
g_V_sackXassignX_byXageX_sack: [function({g}) { return g.V().sack(Operator.assign).by("age").sack() }],
g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX: [function({g}) { return g.V().has("age").groupCount("a").by("name").out().cap("a") }],
+ g_V_groupXaX_byXageX_capXaX: [function({g}) { return g.V().group("a").by("age").cap("a") }],
+ g_V_groupXaX_byXnameX_capXaX: [function({g}) { return g.V().group("a").by("name").cap("a") }],
+ 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_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_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_groupXaX_byXsongTypeX_byXcountX_capXaX: [function({g}) { return g.V().repeat(__.both("followedBy")).times(2).group("a").by("songType").by(__.count()).cap("a") }],
+ g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX: [function({g, l1}) { return g.V().group("a").by(l1).by(__.constant(1)).cap("a") }],
+ g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX: [function({g}) { return g.V().hasLabel("song").group("a").by("name").by(__.properties().groupCount().by(T.label)).out().cap("a") }],
+ 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_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX: [function({g}) { return g.V().group("m").by("name").by(__.in_("knows").values("name")).cap("m") }],
+ g_V_groupXmX_byXlabelX_byXlabel_countX_capXmX: [function({g}) { return g.V().group("m").by(__.label()).by(__.label().count()).cap("m") }],
g_V_storeXa_nameX_out_capXaX: [function({g}) { return g.V().store("a").by("name").out().cap("a") }],
g_VX1X_storeXaX_byXnameX_out_storeXaX_byXnameX_name_capXaX: [function({g, vid1}) { return g.V(vid1).store("a").by("name").out().store("a").by("name").values("name").cap("a") }],
g_withSideEffectXa_setX_V_both_name_storeXaX_capXaX: [function({g, xx1}) { return g.withSideEffect("a",xx1).V().both().values("name").store("a").cap("a") }],
diff --git a/gremlin-python/src/main/python/radish/gremlin.py b/gremlin-python/src/main/python/radish/gremlin.py
index 92a34e48ca..38eab569e9 100644
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -1066,26 +1066,16 @@ world.gremlins = {
'g_withStrategiesXProductiveByStrategyX_V_group_byXageX': [(lambda g:g.withStrategies(*[TraversalStrategy('ProductiveByStrategy',{'productiveKeys':[],'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ProductiveByStrategy'}, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ProductiveByStrategy')]).V().group().by('age'))],
'g_V_group_byXnameX_byXageX': [(lambda g:g.V().group().by('name').by('age'))],
'g_V_group_byXnameX_by': [(lambda g:g.V().group().by('name').by())],
- 'g_V_groupXaX_byXnameX_capXaX': [(lambda g:g.V().group('a').by('name').cap('a'))],
- '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().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'))],
'g_V_group_byXname_substring_1X_byXconstantX1XX': [(lambda g, l1=None:g.V().group().by(l1).by(__.constant(1)))],
- 'g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX': [(lambda g, l1=None:g.V().group('a').by(l1).by(__.constant(1)).cap('a'))],
'g_V_out_group_byXlabelX_selectXpersonX_unfold_outXcreatedX_name_limitX2X': [(lambda g:g.V().out().group().by(T.label).select('person').unfold().out('created').name[0:2])],
'g_V_hasLabelXsongX_group_byXnameX_byXproperties_groupCount_byXlabelXX': [(lambda g:g.V().hasLabel('song').group().by('name').by(__.properties().groupCount().by(T.label)))],
- 'g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX': [(lambda g:g.V().hasLabel('song').group('a').by('name').by(__.properties().groupCount().by(T.label)).out().cap('a'))],
'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_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()))],
- 'g_V_groupXmX_byXlabelX_byXlabel_countX_capXmX': [(lambda g:g.V().group('m').by(__.label()).by(__.label().count()).cap('m'))],
'g_V_outXcreatedX_groupCount_byXnameX': [(lambda g:g.V().out('created').groupCount().by('name'))],
'g_V_groupCount_byXageX': [(lambda g:g.V().groupCount().by('age'))],
'g_withStrategiesXProductiveByStrategyX_V_groupCount_byXageX': [(lambda g:g.withStrategies(*[TraversalStrategy('ProductiveByStrategy',{'productiveKeys':[],'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ProductiveByStrategy'}, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ProductiveByStrategy')]).V().groupCount().by('age'))],
@@ -1129,6 +1119,17 @@ world.gremlins = {
'g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack': [(lambda g, vid1=None:g.withSack(float(1.0),Operator.sum_).V(vid1).local(__.out('knows').barrier(Barrier.normSack)).in_('knows').barrier().sack())],
'g_V_sackXassignX_byXageX_sack': [(lambda g:g.V().sack(Operator.assign).by('age').sack())],
'g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX': [(lambda g:g.V().has('age').groupCount('a').by('name').out().cap('a'))],
+ 'g_V_groupXaX_byXageX_capXaX': [(lambda g:g.V().group('a').by('age').cap('a'))],
+ 'g_V_groupXaX_byXnameX_capXaX': [(lambda g:g.V().group('a').by('name').cap('a'))],
+ '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_repeatXout_groupXaX_byXnameX_byXcountX_timesX2X_capXaX': [(lambda g:g.V().repeat(__.out().group('a').by('name').by(__.count())).times(2).cap('a'))],
+ '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_groupXaX_byXsongTypeX_byXcountX_capXaX': [(lambda g:g.V().repeat(__.both('followedBy')).times(2).group('a').by('songType').by(__.count()).cap('a'))],
+ 'g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX': [(lambda g, l1=None:g.V().group('a').by(l1).by(__.constant(1)).cap('a'))],
+ 'g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX': [(lambda g:g.V().hasLabel('song').group('a').by('name').by(__.properties().groupCount().by(T.label)).out().cap('a'))],
+ '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_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX': [(lambda g:g.V().group('m').by('name').by(__.in_('knows').name).cap('m'))],
+ 'g_V_groupXmX_byXlabelX_byXlabel_countX_capXmX': [(lambda g:g.V().group('m').by(__.label()).by(__.label().count()).cap('m'))],
'g_V_storeXa_nameX_out_capXaX': [(lambda g:g.V().store('a').by('name').out().cap('a'))],
'g_VX1X_storeXaX_byXnameX_out_storeXaX_byXnameX_name_capXaX': [(lambda g, vid1=None:g.V(vid1).store('a').by('name').out().store('a').by('name').name.cap('a'))],
'g_withSideEffectXa_setX_V_both_name_storeXaX_capXaX': [(lambda g, xx1=None:g.withSideEffect('a',xx1).V().both().name.store('a').cap('a'))],
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/sideEffect/Group.feature b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/sideEffect/Group.feature
index 4d08e61a11..a149db6344 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/sideEffect/Group.feature
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/sideEffect/Group.feature
@@ -76,30 +76,6 @@ Feature: Step - group()
| result |
| m[{"ripple":"l[v[ripple]]", "peter":"l[v[peter]]", "vadas":"l[v[vadas]]", "josh": "l[v[josh]]", "lop":"l[v[lop]]", "marko":"l[v[marko]]"}] |
- Scenario: g_V_groupXaX_byXnameX_capXaX
- Given the modern graph
- And the traversal of
- """
- g.V().group("a").by("name").cap("a")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | m[{"ripple":"l[v[ripple]]", "peter":"l[v[peter]]", "vadas":"l[v[vadas]]", "josh": "l[v[josh]]", "lop":"l[v[lop]]", "marko":"l[v[marko]]"}] |
-
- Scenario: g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX
- Given the modern graph
- And the traversal of
- """
- g.V().has("lang").group("a").by("lang").by("name").out().cap("a")
- """
- When iterated to list
- Then the result should be of
- | result |
- | m[{"java":["lop","ripple"]}] |
- | m[{"java":["ripple","lop"]}] |
- And the result should have a count of 1
-
Scenario: g_V_hasXlangX_group_byXlangX_byXcountX
Given the modern graph
And the traversal of
@@ -111,17 +87,6 @@ Feature: Step - group()
| result |
| m[{"java":"d[2].l"}] |
- Scenario: g_V_repeatXout_groupXaX_byXnameX_byXcountX_timesX2X_capXaX
- Given the modern graph
- And the traversal of
- """
- g.V().repeat(__.out().group("a").by("name").by(__.count())).times(2).cap("a")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | m[{"ripple":"d[2].l", "vadas":"d[1].l", "josh":"d[1].l", "lop":"d[4].l"}] |
-
Scenario: g_V_group_byXoutE_countX_byXnameX
Given the modern graph
And the traversal of
@@ -139,17 +104,6 @@ Feature: Step - group()
| m[{"d[0].l":["ripple","lop","vadas"],"d[1].l":["peter"],"d[2].l":["josh"],"d[3].l":["marko"]}] |
And the result should have a count of 1
- Scenario: g_V_groupXaX_byXlabelX_byXoutE_weight_sumX_capXaX
- Given the modern graph
- And the traversal of
- """
- g.V().group("a").by(T.label).by(__.outE().values("weight").sum()).cap("a")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | m[{"person":"d[3.5].d"}] |
-
Scenario: g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byXcountX
Given the grateful graph
And the traversal of
@@ -161,17 +115,6 @@ Feature: Step - group()
| result |
| m[{"original":"d[771317].l", "":"d[160968].l", "cover":"d[368579].l"}] |
- Scenario: g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byXcountX_capXaX
- Given the grateful graph
- And the traversal of
- """
- g.V().repeat(__.both("followedBy")).times(2).group("a").by("songType").by(__.count()).cap("a")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | m[{"original":"d[771317].l", "":"d[160968].l", "cover":"d[368579].l"}] |
-
Scenario: g_V_group_byXname_substring_1X_byXconstantX1XX
Given the modern graph
And using the parameter l1 defined as "c[it.value('name').substring(0, 1)]"
@@ -184,18 +127,6 @@ Feature: Step - group()
| result |
| m[{"p":"d[1].i", "r":"d[1].i", "v":"d[1].i", "j":"d[1].i", "l":"d[1].i", "m":"d[1].i"}] |
- Scenario: g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX
- Given the modern graph
- And using the parameter l1 defined as "c[it.value('name').substring(0, 1)]"
- And the traversal of
- """
- g.V().group("a").by(l1).by(__.constant(1)).cap("a")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | m[{"p":"d[1].i", "r":"d[1].i", "v":"d[1].i", "j":"d[1].i", "l":"d[1].i", "m":"d[1].i"}] |
-
Scenario: g_V_out_group_byXlabelX_selectXpersonX_unfold_outXcreatedX_name_limitX2X
Given the modern graph
And the traversal of
@@ -217,15 +148,6 @@ Feature: Step - group()
When iterated next
Then the result should have a count of 584
- Scenario: g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX
- Given the grateful graph
- And the traversal of
- """
- g.V().hasLabel("song").group("a").by("name").by(__.properties().groupCount().by(T.label)).out().cap("a")
- """
- When iterated next
- Then the result should have a count of 584
-
Scenario: g_V_repeatXunionXoutXknowsX_groupXaX_byXageX__outXcreatedX_groupXbX_byXnameX_byXcountXX_groupXaX_byXnameXX_timesX2X_capXa_bX
Given an unsupported test
Then nothing should happen because
@@ -251,18 +173,6 @@ 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
- """
- g.V().group("m").by("name").by(__.in("knows").values("name")).cap("m")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | m[{"vadas":"marko", "josh":"marko"}] |
-
Scenario: g_V_group_byXlabelX_byXbothE_groupXaX_byXlabelX_byXweight_sumX_weight_sumX
Given the modern graph
And the traversal of
@@ -304,18 +214,6 @@ 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
- """
- g.V().hasLabel("person").as("p").out("created").group("a").by("name").by(__.select("p").values("age").sum()).cap("a")
- """
- When iterated to list
- Then the result should be unordered
- | result |
- | m[{"ripple":"d[32].l", "lop":"d[96].l"}] |
-
Scenario: g_V_group_byXlabelX_byXlabel_countX
Given the modern graph
@@ -324,17 +222,6 @@ Feature: Step - group()
g.V().group().by(__.label()).by(__.label().count())
"""
When iterated to list
- Then the result should be unordered
- | result |
- | m[{"software":"d[2].l", "person":"d[4].l"}] |
-
- Scenario: g_V_groupXmX_byXlabelX_byXlabel_countX_capXmX
- Given the modern graph
- And the traversal of
- """
- g.V().group("m").by(__.label()).by(__.label().count()).cap("m")
- """
- When iterated to list
Then the result should be unordered
| result |
| m[{"software":"d[2].l", "person":"d[4].l"}] |
\ No newline at end of file
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/sideEffect/SideEffectCap.feature b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/sideEffect/SideEffectCap.feature
index 29f26eb8df..3418f07925 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/sideEffect/SideEffectCap.feature
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/sideEffect/SideEffectCap.feature
@@ -29,6 +29,130 @@ Feature: Step - cap()
| result |
| m[{"peter":"d[1].l", "vadas":"d[1].l", "josh":"d[1].l", "marko": "d[1].l"}] |
+ Scenario: g_V_groupXaX_byXageX_capXaX
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().group("a").by("age").cap("a")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | m[{"d[35].i":"l[v[peter]]", "d[27].i":"l[v[vadas]]", "d[32].i": "l[v[josh]]", "d[29].i":"l[v[marko]]"}] |
+
+ Scenario: g_V_groupXaX_byXnameX_capXaX
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().group("a").by("name").cap("a")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | m[{"ripple":"l[v[ripple]]", "peter":"l[v[peter]]", "vadas":"l[v[vadas]]", "josh": "l[v[josh]]", "lop":"l[v[lop]]", "marko":"l[v[marko]]"}] |
+
+ Scenario: g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().has("lang").group("a").by("lang").by("name").out().cap("a")
+ """
+ When iterated to list
+ Then the result should be of
+ | result |
+ | m[{"java":["lop","ripple"]}] |
+ | m[{"java":["ripple","lop"]}] |
+ And the result should have a count of 1
+
+ Scenario: g_V_repeatXout_groupXaX_byXnameX_byXcountX_timesX2X_capXaX
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().repeat(__.out().group("a").by("name").by(__.count())).times(2).cap("a")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | m[{"ripple":"d[2].l", "vadas":"d[1].l", "josh":"d[1].l", "lop":"d[4].l"}] |
+
+ Scenario: g_V_groupXaX_byXlabelX_byXoutE_weight_sumX_capXaX
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().group("a").by(T.label).by(__.outE().values("weight").sum()).cap("a")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | m[{"person":"d[3.5].d"}] |
+
+ Scenario: g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byXcountX_capXaX
+ Given the grateful graph
+ And the traversal of
+ """
+ g.V().repeat(__.both("followedBy")).times(2).group("a").by("songType").by(__.count()).cap("a")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | m[{"original":"d[771317].l", "":"d[160968].l", "cover":"d[368579].l"}] |
+
+ Scenario: g_V_groupXaX_byXname_substring_1X_byXconstantX1XX_capXaX
+ Given the modern graph
+ And using the parameter l1 defined as "c[it.value('name').substring(0, 1)]"
+ And the traversal of
+ """
+ g.V().group("a").by(l1).by(__.constant(1)).cap("a")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | m[{"p":"d[1].i", "r":"d[1].i", "v":"d[1].i", "j":"d[1].i", "l":"d[1].i", "m":"d[1].i"}] |
+
+ Scenario: g_V_hasLabelXsongX_groupXaX_byXnameX_byXproperties_groupCount_byXlabelXX_out_capXaX
+ Given the grateful graph
+ And the traversal of
+ """
+ g.V().hasLabel("song").group("a").by("name").by(__.properties().groupCount().by(T.label)).out().cap("a")
+ """
+ When iterated next
+ Then the result should have a count of 584
+
+ @GraphComputerVerificationStarGraphExceeded
+ Scenario: g_V_hasLabelXpersonX_asXpX_outXcreatedX_groupXaX_byXnameX_byXselectXpX_valuesXageX_sumX_capXaX
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().hasLabel("person").as("p").out("created").group("a").by("name").by(__.select("p").values("age").sum()).cap("a")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | m[{"ripple":"d[32].l", "lop":"d[96].l"}] |
+
+ @GraphComputerVerificationStarGraphExceeded
+ Scenario: g_V_groupXmX_byXnameX_byXinXknowsX_nameX_capXmX
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().group("m").by("name").by(__.in("knows").values("name")).cap("m")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | m[{"vadas":"marko", "josh":"marko"}] |
+
+ Scenario: g_V_groupXmX_byXlabelX_byXlabel_countX_capXmX
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().group("m").by(__.label()).by(__.label().count()).cap("m")
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | m[{"software":"d[2].l", "person":"d[4].l"}] |
+
Scenario: g_V_chooseXlabel_person__age_groupCountXaX__name_groupCountXbXX_capXa_bX
Given an unsupported test
Then nothing should happen because