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 2e206deda7 TINKERPOP-2699 Enabled a test
2e206deda7 is described below

commit 2e206deda78f861c31fd2b19de3502a9dcec47ab
Author: Stephen Mallette <[email protected]>
AuthorDate: Wed Feb 4 14:22:05 2026 -0500

    TINKERPOP-2699 Enabled a test
    
    Seems we can handle this test now with improved Map handling in the 
grammar. CTR
---
 gremlin-go/driver/cucumber/gremlin.go              |  1 +
 .../gremlin-javascript/test/cucumber/gremlin.js    |  1 +
 gremlin-python/src/main/python/radish/gremlin.py   |  1 +
 .../gremlin/test/features/sideEffect/Group.feature | 33 +++++++++++-----------
 4 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/gremlin-go/driver/cucumber/gremlin.go 
b/gremlin-go/driver/cucumber/gremlin.go
index 12d3da007d..c17af41268 100644
--- a/gremlin-go/driver/cucumber/gremlin.go
+++ b/gremlin-go/driver/cucumber/gremlin.go
@@ -1979,6 +1979,7 @@ var translationMap = map[string][]func(g 
*gremlingo.GraphTraversalSource, p map[
     "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_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_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_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX":
 {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) 
*gremlingo.GraphTraversal {return g.WithSideEffect("a", 
map[interface{}]interface{}{"marko": []interface{}{"666"}, "noone": 
[]interface{}{"blah"} 
}).V().Group("a").By("name").By(gremlingo.T__.OutE().Label().Fold()).Cap("a").Unfold().Group().By(gremlingo.Column.Keys).By(gremlingo.T__.Select(gremlingo.Column.Values).Order(gremlin
 [...]
     
"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_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_hasXperson_name_withinXvadas_peterXX_group_by_byXout_order_foldX": 
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) 
*gremlingo.GraphTraversal {return g.V().Has("person", "name", 
gremlingo.P.Within("vadas", 
"peter")).Group().By().By(gremlingo.T__.Out().Order().Fold())}}, 
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 69afb8b299..1db90d051b 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
@@ -2010,6 +2010,7 @@ const gremlins = {
     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_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_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}) { return g.withSideEffect("a", new Map([["marko", ["666"]], 
["noone", 
["blah"]]])).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_group_byXlabelX_byXlabel_countX: [function({g}) { return 
g.V().group().by(__.label()).by(__.label().count()) }], 
     g_V_hasXperson_name_withinXvadas_peterXX_group_by_byXout_order_foldX: 
[function({g}) { return g.V().has("person", "name", P.within("vadas", 
"peter")).group().by().by(__.out().order().fold()) }], 
diff --git a/gremlin-python/src/main/python/radish/gremlin.py 
b/gremlin-python/src/main/python/radish/gremlin.py
index 44b348c180..43b96bcd2c 100644
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -1982,6 +1982,7 @@ world.gremlins = {
     'g_V_hasLabelXsongX_group_byXnameX_byXproperties_groupCount_byXlabelXX': 
[(lambda 
g:g.V().has_label('song').group().by('name').by(__.properties().group_count().by(T.label)))],
 
     
'g_V_outXfollowedByX_group_byXsongTypeX_byXbothE_group_byXlabelX_byXweight_sumXX':
 [(lambda 
g:g.V().out('followedBy').group().by('songType').by(__.both_e().group().by(T.label).by(__.values('weight').sum_())))],
 
     
'g_V_group_byXlabelX_byXbothE_groupXaX_byXlabelX_byXweight_sumX_weight_sumX': 
[(lambda 
g:g.V().group().by(T.label).by(__.both_e().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':
 [(lambda g:g.with_side_effect('a', { 'marko': ['666'], 'noone': ['blah'] 
}).V().group('a').by('name').by(__.out_e().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().has_label('person').as_('p').out('created').group().by('name').by(__.select('p').values('age').sum_()))],
 
     'g_V_group_byXlabelX_byXlabel_countX': [(lambda 
g:g.V().group().by(__.label()).by(__.label().count()))], 
     'g_V_hasXperson_name_withinXvadas_peterXX_group_by_byXout_order_foldX': 
[(lambda g:g.V().has('person', 'name', P.within('vadas', 
'peter')).group().by().by(__.out().order().fold()))], 
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 1afa38e3d4..75d44dae9e 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
@@ -183,23 +183,22 @@ Feature: Step - group()
       | result |
       | m[{"software":"d[2.0].d", "person":"d[5.0].d"}] |
 
-  # This test works, but the test frameworks don't all support it well because 
of how parameters are now processed
-  # in 3.6.0 where we need more than just simple JSON processing. would be 
nice to "ignore" it somehow as it does
-  # work in some situations but not all test frameworks have that ability 
either (i.e. to ignore prior to parsing
-  # the parameter). TINKERPOP-2699
-  #
-  # 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\":\"l[\"666\"]\", 
\"noone\":\"l[\"blah\"]\"}]"
-#    And the traversal of
-#      """
-#      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))
-#      """
-#    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"]}] |
+  Scenario: 
g_withSideEffectXa__marko_666_noone_blahX_V_groupXaX_byXnameX_byXoutE_label_foldX_capXaX
+    Given the modern graph
+    And the traversal of
+      """
+      g.withSideEffect("a", [marko:["666"],noone:["blah"]]).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))
+      """
+    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"]}] |
 
   @GraphComputerVerificationStarGraphExceeded
   Scenario: 
g_V_hasLabelXpersonX_asXpX_outXcreatedX_group_byXnameX_byXselectXpX_valuesXageX_sumX

Reply via email to