Skip to content

Commit 4a90f3d

Browse files
committed
Merge branch '3.8-dev'
2 parents ecd7f77 + 4fa0324 commit 4a90f3d

File tree

8 files changed

+29
-2
lines changed

8 files changed

+29
-2
lines changed

CHANGELOG.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,10 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
266266
267267
[[release-3-7-6]]
268268
=== TinkerPop 3.7.6 (NOT OFFICIALLY RELEASED YET)
269+
269270
* Integrated Python driver examples into automated build process to ensure examples remain functional.
271+
* Fixed bug in `SubgraphStrategy` where specifying `edges` and `vertices` filters that had `map`-type steps could generate an error.
272+
* Added `closeSessionPostGraphOp` to the Gremlin Server settings to indicate that the `Session` should be closed on either a successful commit or rollback.
270273
271274
[[release-3-7-5]]
272275
=== TinkerPop 3.7.5 (Release Date: November 12, 2025)

docs/src/reference/the-traversal.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6451,6 +6451,9 @@ g.V().outE().inV().
64516451
by('name')
64526452
----
64536453
6454+
WARNING: It is not advisable to provide filtering traversals that do more than just filter (e.g. mutation steps,
6455+
side-effects, etc.) - prefer use of the standard `has()` step variations for best results.
6456+
64546457
=== VertexProgramDenyStrategy
64556458
64566459
Like the `ReadOnlyStrategy`, the `VertexProgramDenyStrategy` denies the execution of specific traversals. A `Traversal`

gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.apache.tinkerpop.gremlin.process.traversal.Step;
2323
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
2424
import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
25+
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal;
2526
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
2627
import org.apache.tinkerpop.gremlin.process.traversal.lambda.ValueTraversal;
2728
import org.apache.tinkerpop.gremlin.process.traversal.step.GValue;
@@ -285,7 +286,8 @@ public void apply(final Traversal.Admin<?, ?> traversal) {
285286
TraversalHelper.applyTraversalRecursively(t -> t.getStartStep().addLabel(MARKER), vertexPredicate);
286287
return Optional.of(vertexPredicate);
287288
} else {
288-
final Traversal.Admin<Edge, ?> ec = edgeCriterion.clone();
289+
final Traversal.Admin<Edge, ?> ec = new DefaultGraphTraversal<>();
290+
ec.addStep(new TraversalFilterStep<>(ec, edgeCriterion.clone()));
289291
ec.addStep(new TraversalFilterStep<>(ec, vertexPredicate));
290292
TraversalHelper.applyTraversalRecursively(t -> t.getStartStep().addLabel(MARKER), ec);
291293
return Optional.of(ec);

gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ private static IDictionary<string, List<Func<GraphTraversalSource, IDictionary<s
877877
{"g_withStrategiesXSubgraphStrategyXsubgraphDXX_EX12X_bothV", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new SubgraphStrategy(checkAdjacentVertices: false, vertices: __.Has("name", P.Within("josh", "lop", "ripple")), edges: __.Or(__.Has("weight", 0.4).HasLabel("created"), __.Has("weight", 1.0).HasLabel("created")))).E(p["eid12"]).BothV()}},
878878
{"g_withStrategiesXSubgraphStrategyXsubgraphDXX_EX9X_bothV", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new SubgraphStrategy(checkAdjacentVertices: false, vertices: __.Has("name", P.Within("josh", "lop", "ripple")), edges: __.Or(__.Has("weight", 0.4).HasLabel("created"), __.Has("weight", 1.0).HasLabel("created")))).E(p["eid9"]).BothV()}},
879879
{"g_withStrategiesXSubgraphStrategyXcheckAdjacentVertices_subgraphDXX_EX9X_bothV", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new SubgraphStrategy(checkAdjacentVertices: true, vertices: __.Has("name", P.Within("josh", "lop", "ripple")), edges: __.Or(__.Has("weight", 0.4).HasLabel("created"), __.Has("weight", 1.0).HasLabel("created")))).E(p["eid9"]).BothV()}},
880+
{"g_withStrategiesXSubgraphStrategyXuseMapStepsInFilterX_E", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new SubgraphStrategy(edges: __.Label().Is(P.Eq("created")), vertices: __.Values<object>("name").Is(P.Within("lop", "josh")), checkAdjacentVertices: true)).E()}},
880881
{"g_withStrategiesXVertexProgramRestrictionStrategyX_withoutStrategiesXVertexProgramStrategyX_V", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramRestrictionStrategy()).WithoutStrategies(typeof(VertexProgramStrategy)).V()}},
881882
{"g_withStrategiesXVertexProgramRestrictionStrategy_VertexProgramStrategyX_V", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new VertexProgramRestrictionStrategy(), new VertexProgramStrategy()).V()}},
882883
{"g_withoutStrategiesXVertexProgramRestrictionStrategyX_V", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithoutStrategies(typeof(VertexProgramRestrictionStrategy)).WithStrategies(new VertexProgramStrategy()).V()}},

gremlin-go/driver/cucumber/gremlin.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,7 @@ var translationMap = map[string][]func(g *gremlingo.GraphTraversalSource, p map[
848848
"g_withStrategiesXSubgraphStrategyXsubgraphDXX_EX12X_bothV": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.SubgraphStrategy(gremlingo.SubgraphStrategyConfig{CheckAdjacentVertices: false, Vertices: gremlingo.T__.Has("name", gremlingo.P.Within("josh", "lop", "ripple")), Edges: gremlingo.T__.Or(gremlingo.T__.Has("weight", 0.4).HasLabel("created"), gremlingo.T__.Has("weight", 1.0).HasLabel("created"))})).E(p["eid12"]).BothV()}},
849849
"g_withStrategiesXSubgraphStrategyXsubgraphDXX_EX9X_bothV": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.SubgraphStrategy(gremlingo.SubgraphStrategyConfig{CheckAdjacentVertices: false, Vertices: gremlingo.T__.Has("name", gremlingo.P.Within("josh", "lop", "ripple")), Edges: gremlingo.T__.Or(gremlingo.T__.Has("weight", 0.4).HasLabel("created"), gremlingo.T__.Has("weight", 1.0).HasLabel("created"))})).E(p["eid9"]).BothV()}},
850850
"g_withStrategiesXSubgraphStrategyXcheckAdjacentVertices_subgraphDXX_EX9X_bothV": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.SubgraphStrategy(gremlingo.SubgraphStrategyConfig{CheckAdjacentVertices: true, Vertices: gremlingo.T__.Has("name", gremlingo.P.Within("josh", "lop", "ripple")), Edges: gremlingo.T__.Or(gremlingo.T__.Has("weight", 0.4).HasLabel("created"), gremlingo.T__.Has("weight", 1.0).HasLabel("created"))})).E(p["eid9"]).BothV()}},
851+
"g_withStrategiesXSubgraphStrategyXuseMapStepsInFilterX_E": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.SubgraphStrategy(gremlingo.SubgraphStrategyConfig{Edges: gremlingo.T__.Label().Is(gremlingo.P.Eq("created")), Vertices: gremlingo.T__.Values("name").Is(gremlingo.P.Within("lop", "josh")), CheckAdjacentVertices: true})).E()}},
851852
"g_withStrategiesXVertexProgramRestrictionStrategyX_withoutStrategiesXVertexProgramStrategyX_V": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.VertexProgramRestrictionStrategy()).WithoutStrategies(gremlingo.VertexProgramStrategy()).V()}},
852853
"g_withStrategiesXVertexProgramRestrictionStrategy_VertexProgramStrategyX_V": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.VertexProgramRestrictionStrategy(), gremlingo.VertexProgramStrategy()).V()}},
853854
"g_withoutStrategiesXVertexProgramRestrictionStrategyX_V": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithoutStrategies(gremlingo.VertexProgramRestrictionStrategy()).WithStrategies(gremlingo.VertexProgramStrategy()).V()}},

gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gremlin-python/src/main/python/radish/gremlin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,7 @@
851851
'g_withStrategiesXSubgraphStrategyXsubgraphDXX_EX12X_bothV': [(lambda g, eid12=None:g.with_strategies(SubgraphStrategy(check_adjacent_vertices=False, vertices=__.has('name', P.within('josh', 'lop', 'ripple')), edges=__.or_(__.has('weight', 0.4).has_label('created'), __.has('weight', 1.0).has_label('created')))).E(eid12).both_v())],
852852
'g_withStrategiesXSubgraphStrategyXsubgraphDXX_EX9X_bothV': [(lambda g, eid9=None:g.with_strategies(SubgraphStrategy(check_adjacent_vertices=False, vertices=__.has('name', P.within('josh', 'lop', 'ripple')), edges=__.or_(__.has('weight', 0.4).has_label('created'), __.has('weight', 1.0).has_label('created')))).E(eid9).both_v())],
853853
'g_withStrategiesXSubgraphStrategyXcheckAdjacentVertices_subgraphDXX_EX9X_bothV': [(lambda g, eid9=None:g.with_strategies(SubgraphStrategy(check_adjacent_vertices=True, vertices=__.has('name', P.within('josh', 'lop', 'ripple')), edges=__.or_(__.has('weight', 0.4).has_label('created'), __.has('weight', 1.0).has_label('created')))).E(eid9).both_v())],
854+
'g_withStrategiesXSubgraphStrategyXuseMapStepsInFilterX_E': [(lambda g:g.with_strategies(SubgraphStrategy(edges=__.label().is_(P.eq('created')), vertices=__.values('name').is_(P.within('lop', 'josh')), check_adjacent_vertices=True)).E())],
854855
'g_withStrategiesXVertexProgramRestrictionStrategyX_withoutStrategiesXVertexProgramStrategyX_V': [(lambda g:g.with_strategies(VertexProgramRestrictionStrategy()).without_strategies(VertexProgramStrategy).V())],
855856
'g_withStrategiesXVertexProgramRestrictionStrategy_VertexProgramStrategyX_V': [(lambda g:g.with_strategies(VertexProgramRestrictionStrategy(), VertexProgramStrategy()).V())],
856857
'g_withoutStrategiesXVertexProgramRestrictionStrategyX_V': [(lambda g:g.without_strategies(VertexProgramRestrictionStrategy).with_strategies(VertexProgramStrategy()).V())],

gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/integrated/SubgraphStrategy.feature

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,4 +943,19 @@ Feature: Step - SubgraphStrategy
943943
__.has("weight", 1.0).hasLabel("created")))).E(eid9).bothV()
944944
"""
945945
When iterated to list
946-
Then the result should be empty
946+
Then the result should be empty
947+
948+
@WithSubgraphStrategy @GraphComputerVerificationStarGraphExceeded
949+
Scenario: g_withStrategiesXSubgraphStrategyXuseMapStepsInFilterX_E
950+
Given the modern graph
951+
And the traversal of
952+
"""
953+
g.withStrategies(new SubgraphStrategy(edges: __.label().is(P.eq("created")),
954+
vertices: __.values("name").is(P.within("lop","josh")),
955+
checkAdjacentVertices: true)).
956+
E()
957+
"""
958+
When iterated to list
959+
Then the result should be unordered
960+
| result |
961+
| e[josh-created->lop] |

0 commit comments

Comments
 (0)