Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ under the License.

image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/images/gremlin-zamfir.png[width=185]

[[release-3-7-7]]
=== TinkerPop 3.7.7 (NOT OFFICIALLY RELEASED YET)

* Fixed conjoin has incorrect null handling.

[[release-3-7-6]]
=== TinkerPop 3.7.6 (Release Date: April 1, 2026)

Expand Down
36 changes: 36 additions & 0 deletions docs/src/upgrade/release-3.7.x.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,42 @@ image::gremlin-zamfir.png[width=185]

*Gremfir Master of the Pan Flute*

== TinkerPop 3.7.7

*Release Date: NOT OFFICIALLY RELEASED YET*

Please see the link:https://github.com/apache/tinkerpop/blob/3.7.7/CHANGELOG.asciidoc#release-3-7-7[changelog] for a
complete list of all the modifications that are part of this release.

=== Upgrading for Users

==== conjoin() Step Null Handling

The `conjoin()` step previously returned `null` when elements in the incoming list are `null`. This behavior has
been changed so that `conjoin()` now returns an empty string (`""`) in that case.

[source,groovy]
----
// 3.7.6
gremlin> g.inject([null]).conjoin("-")
==>null
gremlin> g.inject([null, null]).conjoin("-")
==>null

// 3.7.7
gremlin> g.inject([null]).conjoin("+")
==>
gremlin> g.inject([null, null]).conjoin("+")
==>
----

Code that checks the result of `conjoin()` for lists that include `null` elements should be updated to check for
an empty string instead.

See: link:https://issues.apache.org/jira/browse/TINKERPOP-3225[TINKERPOP-3225]



== TinkerPop 3.7.6

*Release Date: April 1, 2026*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected String map(Traverser.Admin<S> traverser) {
joinResult.delete(joinResult.length() - delimiter.length(), joinResult.length());
return joinResult.toString();
} else {
return null;
return "";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public void testReturnTypes() {
assertEquals("5AA8AA10", __.__(new long[] {5L, 8L, 10L}).conjoin("AA").next());
assertEquals("715", __.__(1).constant(new Long[] {7L, 15L}).conjoin("").next());
assertEquals("5.5,8.0,10.1", __.__(new double[] {5.5, 8.0, 10.1}).conjoin(",").next());
assertNull(__.__(Arrays.asList(null, null)).conjoin(",").next());
assertEquals("", __.__(Arrays.asList(null, null)).conjoin(",").next());
assertEquals("1", __.__(Arrays.asList(null, 1, null)).conjoin(",").next());

final Set<Integer> set = new LinkedHashSet<>();
set.add(10); set.add(11); set.add(12);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,8 @@ private static IDictionary<string, List<Func<GraphTraversalSource, IDictionary<s
{"g_V_out_out_path_byXnameX_conjoinXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Out().Out().Path().By("name").Conjoin("")}},
{"g_injectXa_null_bX_conjoinXxyzX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Inject(p["xx1"]).Conjoin("xyz")}},
{"g_injectX3_threeX_conjoinX_X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Inject(p["xx1"]).Conjoin(";")}},
{"g_injectXnull_a_null_bX_fold_conjoinXplusX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Inject(p["xx1"]).Conjoin("+")}},
{"g_injectXnull_nullX_conjoinXplusX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Inject(p["xx1"]).Conjoin("+")}},
{"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")}},
Expand Down
2 changes: 2 additions & 0 deletions gremlin-go/driver/cucumber/gremlin.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,8 @@ var translationMap = map[string][]func(g *gremlingo.GraphTraversalSource, p map[
"g_V_out_out_path_byXnameX_conjoinXX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Out().Out().Path().By("name").Conjoin("")}},
"g_injectXa_null_bX_conjoinXxyzX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(p["xx1"]).Conjoin("xyz")}},
"g_injectX3_threeX_conjoinX_X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(p["xx1"]).Conjoin(";")}},
"g_injectXnull_a_null_bX_fold_conjoinXplusX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(p["xx1"]).Conjoin("+")}},
"g_injectXnull_nullX_conjoinXplusX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(p["xx1"]).Conjoin("+")}},
"g_V_connectedComponent_hasXcomponentX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().ConnectedComponent().Has("gremlin.connectedComponentVertexProgram.component")}},
"g_V_dedup_connectedComponent_hasXcomponentX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Dedup().ConnectedComponent().Has("gremlin.connectedComponentVertexProgram.component")}},
"g_V_hasLabelXsoftwareX_connectedComponent_project_byXnameX_byXcomponentX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().HasLabel("software").ConnectedComponent().Project("name", "component").By("name").By("gremlin.connectedComponentVertexProgram.component")}},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions gremlin-python/src/main/python/tests/feature/gremlin.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,8 @@
'g_V_out_out_path_byXnameX_conjoinXX': [(lambda g:g.V().out().out().path().by('name').conjoin(''))],
'g_injectXa_null_bX_conjoinXxyzX': [(lambda g, xx1=None:g.inject(xx1).conjoin('xyz'))],
'g_injectX3_threeX_conjoinX_X': [(lambda g, xx1=None:g.inject(xx1).conjoin(';'))],
'g_injectXnull_a_null_bX_fold_conjoinXplusX': [(lambda g, xx1=None:g.inject(xx1).conjoin('+'))],
'g_injectXnull_nullX_conjoinXplusX': [(lambda g, xx1=None:g.inject(xx1).conjoin('+'))],
'g_V_connectedComponent_hasXcomponentX': [(lambda g:g.V().connected_component().has('gremlin.connectedComponentVertexProgram.component'))],
'g_V_dedup_connectedComponent_hasXcomponentX': [(lambda g:g.V().dedup().connected_component().has('gremlin.connectedComponentVertexProgram.component'))],
'g_V_hasLabelXsoftwareX_connectedComponent_project_byXnameX_byXcomponentX': [(lambda g:g.V().has_label('software').connected_component().project('name','component').by('name').by('gremlin.connectedComponentVertexProgram.component'))],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,29 @@ Feature: Step - conjoin()
Then the result should be unordered
| result |
| 3;three |

@GraphComputerVerificationInjectionNotSupported
Scenario: g_injectXnull_a_null_bX_fold_conjoinXplusX
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Scenario: g_injectXnull_a_null_bX_fold_conjoinXplusX
Scenario: g_injectXnull_a_null_bX_conjoinXplusX

Given the empty graph
And using the parameter xx1 defined as "l[null,a,null,b]"
And the traversal of
"""
g.inject(xx1).conjoin("+")
"""
When iterated to list
Then the result should be unordered
| result |
| str[a+b] |

@GraphComputerVerificationInjectionNotSupported
Scenario: g_injectXnull_nullX_conjoinXplusX
Given the empty graph
And using the parameter xx1 defined as "l[null,null]"
And the traversal of
"""
g.inject(xx1).conjoin("+")
"""
When iterated to list
Then the result should be unordered
| result |
| str[] |
Loading