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 2024/04/09 22:40:10 UTC

(tinkerpop) 09/09: rebase

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-3028
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 22352da3e997b0080af6b02aeefe895ee430b977
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Tue Apr 9 18:39:27 2024 -0400

    rebase
---
 .../test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs        |  2 +-
 gremlin-go/build/generate.groovy                               |  1 +
 gremlin-go/driver/cucumber/gremlin.go                          |  2 +-
 .../javascript/gremlin-javascript/test/cucumber/gremlin.js     | 10 +++++-----
 gremlin-python/src/main/python/radish/gremlin.py               |  2 +-
 5 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
index a3204a3111..fe52fe46fb 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
@@ -1181,7 +1181,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
                {"g_withStrategiesXProductiveByStrategyX_V_asXaX_selectXaX_byXageX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new ProductiveByStrategy()).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<object>("x").Select<object>("k")}}, 
                {"g_V_out_in_selectXall_a_a_aX_byXunfold_name_foldX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("A").Property("name", "a1").As("a1").AddV("A").Property("name", "a2").As("a2").AddV("A").Property("name", "a3").As("a3").AddV("B").Property("name", "b1").As("b1").AddV("B").Property("name", "b2").As("b2").AddV("B").Property("name", "b3").As("b3").AddE("ab").From("a1").To("b1").AddE("ab").From("a2").To("b2").AddE("ab").From("a3" [...]
-               {"g_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().As("label").Aggregate(Scope.Local, "x").Select<object>("x").Select<object>("label")}}, 
+               {"g_withoutStrategiesXLazyBarrierStrategyX_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithoutStrategies(typeof(LazyBarrierStrategy)).V().As("label").Aggregate(Scope.Local, "x").Select<object>("x").Select<object>("label")}}, 
                {"g_V_shortestPath", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().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().ShortestPath().With("~tinkerpop.shortestPath.includeEdges")}}, 
diff --git a/gremlin-go/build/generate.groovy b/gremlin-go/build/generate.groovy
index 74e7927d82..760c959839 100644
--- a/gremlin-go/build/generate.groovy
+++ b/gremlin-go/build/generate.groovy
@@ -75,6 +75,7 @@ radishGremlinFile.withWriter('UTF-8') { Writer writer ->
     // solution may become necessary as testing of nulls expands.
     def staticTranslate = [
             g_withoutStrategiesXCountStrategyX_V_count: "  \"g_withoutStrategiesXCountStrategyX_V_count\": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(6)}}, ", // syntax is all bad for withoutStrategies and who knows what else is causing failures - just do a dummy translation
+            g_withoutStrategiesXLazyBarrierStrategyX_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX: "  \"g_withoutStrategiesXLazyBarrierStrategyX_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX\": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V()}}, ",
             g_injectXnull_nullX: "  \"g_injectXnull_nullX\": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(nil, nil)}}, ",
             g_VX1X_valuesXageX_injectXnull_nullX: "  \"g_VX1X_valuesXageX_injectXnull_nullX\": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V(p[\"xx1\"]).Values(\"age\").Inject(nil, nil)}}, "
     ]
diff --git a/gremlin-go/driver/cucumber/gremlin.go b/gremlin-go/driver/cucumber/gremlin.go
index 9957b5fac4..052b91531c 100644
--- a/gremlin-go/driver/cucumber/gremlin.go
+++ b/gremlin-go/driver/cucumber/gremlin.go
@@ -1152,7 +1152,7 @@ var translationMap = map[string][]func(g *gremlingo.GraphTraversalSource, p map[
     "g_withStrategiesXProductiveByStrategyX_V_asXaX_selectXaX_byXageX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.ProductiveByStrategy()).V().As("a").Select("a").By("age")}}, 
     "g_withSideEffectXk_nullX_injectXxX_selectXkX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithSideEffect("k", nil).Inject("x").Select("k")}}, 
     "g_V_out_in_selectXall_a_a_aX_byXunfold_name_foldX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("A").Property("name", "a1").As("a1").AddV("A").Property("name", "a2").As("a2").AddV("A").Property("name", "a3").As("a3").AddV("B").Property("name", "b1").As("b1").AddV("B").Property("name", "b2").As("b2").AddV("B").Property("name", "b3").As("b3").AddE("ab").From("a1").To("b1").AddE("ab").From("a2").To("b2").AddE("ab").From("a [...]
-    "g_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().As("label").Aggregate(gremlingo.Scope.Local, "x").Select("x").Select("label")}}, 
+  "g_withoutStrategiesXLazyBarrierStrategyX_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V()}}, 
     "g_V_shortestPath": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().ShortestPath()}}, 
     "g_V_both_dedup_shortestPath": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Both().Dedup().ShortestPath()}}, 
     "g_V_shortestPath_edgesIncluded": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().ShortestPath().With("~tinkerpop.shortestPath.includeEdges")}}, 
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 448ab18c9a..2767fa0e51 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
@@ -24,9 +24,9 @@
 //********************************************************************************
 
 
-const graphTraversalModule = require('../../lib/process/graph-traversal');
-const traversalModule = require('../../lib/process/traversal');
-const { TraversalStrategies, VertexProgramStrategy, OptionsStrategy, PartitionStrategy, ReadOnlyStrategy, SeedStrategy, SubgraphStrategy, ProductiveByStrategy } = require('../../lib/process/traversal-strategy');
+import * as graphTraversalModule from '../../lib/process/graph-traversal.js';
+import * as traversalModule from '../../lib/process/traversal.js';
+import { TraversalStrategies, VertexProgramStrategy, OptionsStrategy, PartitionStrategy, ReadOnlyStrategy, SeedStrategy, SubgraphStrategy, ProductiveByStrategy } from '../../lib/process/traversal-strategy.js';
 const __ = graphTraversalModule.statics;
 const Barrier = traversalModule.barrier
 const Cardinality = traversalModule.cardinality
@@ -1173,7 +1173,7 @@ const gremlins = {
     g_withStrategiesXProductiveByStrategyX_V_asXaX_selectXaX_byXageX: [function({g}) { return g.withStrategies(new ProductiveByStrategy()).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_out_in_selectXall_a_a_aX_byXunfold_name_foldX: [function({g}) { return g.addV("A").property("name", "a1").as("a1").addV("A").property("name", "a2").as("a2").addV("A").property("name", "a3").as("a3").addV("B").property("name", "b1").as("b1").addV("B").property("name", "b2").as("b2").addV("B").property("name", "b3").as("b3").addE("ab").from_("a1").to("b1").addE("ab").from_("a2").to("b2").addE("ab").from_("a3").to("b3") }, function({g}) { return g.V().as("a").out().as("a").in_().as( [...]
-    g_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX: [function({g}) { return g.V().as("label").aggregate(Scope.local, "x").select("x").select("label") }], 
+    g_withoutStrategiesXLazyBarrierStrategyX_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX: [function({g}) { return g.withoutStrategies(LazyBarrierStrategy).V().as("label").aggregate(Scope.local, "x").select("x").select("label") }], 
     g_V_shortestPath: [function({g}) { return g.V().shortestPath() }], 
     g_V_both_dedup_shortestPath: [function({g}) { return g.V().both().dedup().shortestPath() }], 
     g_V_shortestPath_edgesIncluded: [function({g}) { return g.V().shortestPath().with_("~tinkerpop.shortestPath.includeEdges") }], 
@@ -1515,4 +1515,4 @@ const gremlins = {
     g_V_storeXaX_byXoutEXcreatedX_countX_out_out_storeXaX_byXinEXcreatedX_weight_sumX: [function({g}) { return g.V().store("a").by(__.outE("created").count()).out().out().store("a").by(__.inE("created").values("weight").sum()).cap("a") }], 
 }
 
-exports.gremlin = gremlins
+export const gremlin = gremlins
diff --git a/gremlin-python/src/main/python/radish/gremlin.py b/gremlin-python/src/main/python/radish/gremlin.py
index abf2fd39ab..58d94de046 100644
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -1155,7 +1155,7 @@ world.gremlins = {
     'g_withStrategiesXProductiveByStrategyX_V_asXaX_selectXaX_byXageX': [(lambda g:g.with_strategies(ProductiveByStrategy()).V().as_('a').select('a').by('age'))], 
     'g_withSideEffectXk_nullX_injectXxX_selectXkX': [(lambda g:g.with_side_effect('k', None).inject('x').select('k'))], 
     'g_V_out_in_selectXall_a_a_aX_byXunfold_name_foldX': [(lambda g:g.add_v('A').property('name', 'a1').as_('a1').add_v('A').property('name', 'a2').as_('a2').add_v('A').property('name', 'a3').as_('a3').add_v('B').property('name', 'b1').as_('b1').add_v('B').property('name', 'b2').as_('b2').add_v('B').property('name', 'b3').as_('b3').add_e('ab').from_('a1').to('b1').add_e('ab').from_('a2').to('b2').add_e('ab').from_('a3').to('b3')), (lambda g:g.V().as_('a').out().as_('a').in_().as_('a').se [...]
-    'g_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX': [(lambda g:g.V().as_('label').aggregate(Scope.local, 'x').select('x').select('label'))], 
+    'g_withoutStrategiesXLazyBarrierStrategyX_V_asXlabelX_aggregateXlocal_xX_selectXxX_selectXlabelX': [(lambda g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy')]).V().as_('label').aggregate(Scope.local, 'x').select('x').select('label'))], 
     'g_V_shortestPath': [(lambda g:g.V().shortest_path())], 
     'g_V_both_dedup_shortestPath': [(lambda g:g.V().both().dedup().shortest_path())], 
     'g_V_shortestPath_edgesIncluded': [(lambda g:g.V().shortest_path().with_('~tinkerpop.shortestPath.includeEdges'))],