(tinkerpop) 01/01: Merge branch '3.7-dev'
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 2dbdd310391482effba77ea750a547b9520fdf5a Merge: 3015f37043 e39ef4fcce Author: Cole-Greer AuthorDate: Fri Mar 22 14:00:01 2024 -0700 Merge branch '3.7-dev' CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(tinkerpop) branch master updated (3015f37043 -> 2dbdd31039)
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 3015f37043 TINKERPOP-3056 Consistently promoting matched/created edge/vertex add dd7cb24669 CTR touchup docs and comments add e39ef4fcce Merge branch '3.6-dev' into 3.7-dev new 2dbdd31039 Merge branch '3.7-dev' The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(tinkerpop) branch 3.7-dev updated (20443b0d7b -> e39ef4fcce)
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a change to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 20443b0d7b Merge branch '3.6-dev' into 3.7-dev add dd7cb24669 CTR touchup docs and comments new e39ef4fcce Merge branch '3.6-dev' into 3.7-dev The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc| 2 +- .../tinkerpop/gremlin/process/traversal/step/map/MergeVertexStep.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
(tinkerpop) 01/01: Merge branch '3.6-dev' into 3.7-dev
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit e39ef4fcce713dc26a28d451475fad27c622b99d Merge: 20443b0d7b dd7cb24669 Author: Cole-Greer AuthorDate: Fri Mar 22 13:57:48 2024 -0700 Merge branch '3.6-dev' into 3.7-dev CHANGELOG.asciidoc| 2 +- .../tinkerpop/gremlin/process/traversal/step/map/MergeVertexStep.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
(tinkerpop) branch 3.6-dev updated: CTR touchup docs and comments
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch 3.6-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/3.6-dev by this push: new dd7cb24669 CTR touchup docs and comments dd7cb24669 is described below commit dd7cb2466986b9a2665ee6f3bdc917e76c9f691e Author: Cole-Greer AuthorDate: Fri Mar 22 13:57:16 2024 -0700 CTR touchup docs and comments --- CHANGELOG.asciidoc| 2 +- .../tinkerpop/gremlin/process/traversal/step/map/MergeVertexStep.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index b813d15ae7..eceb847c17 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -29,7 +29,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Fixed bug in bytecode translation of `g.tx().commit()` and `g.tx().rollback()` in all languages. * Improved error message from `JavaTranslator` by including exception source. * Added missing `short` serialization (`gx:Int16`) to GraphSONV2 and GraphSONV3 in `gremlin-python`. -* Added tests for error handling for GLV's if `tx.commit()`` is called remotely for graphs without transactions support. +* Added tests for error handling for GLV's if `tx.commit()` is called remotely for graphs without transactions support. * Introduced multi-architecture AMD64/ARM64 docker images for gremlin-console. * Fixed bug in `JavaTranslator` where `has(String, null)` could call `has(String, Traversal)` to generate an error. * Fixed issue where server errors weren't being properly parsed when sending bytecode over HTTP. diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeVertexStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeVertexStep.java index 132adf3e7c..70eca71f64 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeVertexStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MergeVertexStep.java @@ -93,10 +93,10 @@ public class MergeVertexStep extends MergeStep { // attach the onMatch properties vertices = IteratorUtils.peek(vertices, v -> { -// override current traverser with the matched Edge so that the option() traversal can operate +// override current traverser with the matched Vertex so that the option() traversal can operate // on it properly. this should only work this way for the start step form to retain the original // behavior for 3.6.0 where you might do g.inject(Map).mergeV() and want that Map to pass through. -// in 4.x this will be rectified such that the edge will always be promoted and you will be forced +// in 4.x this will be rectified such that the vertex will always be promoted and you will be forced // to select() the map if you did want the behavior. if (isStart) traverser.set((S) v);
(tinkerpop) 02/08: groovy
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 23bcd9600015af0071991d6e7dcc151b1afe6224 Author: Stephen Mallette AuthorDate: Wed Jan 3 08:32:02 2024 -0500 groovy --- .../translator/GroovyTranslateVisitor.java | 116 +++ .../language/translator/JavaTranslateVisitor.java | 2 + .../translator/JavascriptTranslateVisitor.java | 10 ++ .../translator/PythonTranslateVisitor.java | 1 + .../language/translator/TranslateVisitor.java | 5 +- .../gremlin/language/translator/Translator.java| 5 + .../language/translator/GremlinTranslatorTest.java | 128 +++-- .../tinkerpop/gremlin/features/StepDefinition.java | 8 +- 8 files changed, 262 insertions(+), 13 deletions(-) diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GroovyTranslateVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GroovyTranslateVisitor.java new file mode 100644 index 00..44e7d2d56f --- /dev/null +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GroovyTranslateVisitor.java @@ -0,0 +1,116 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.language.translator; + +import org.apache.tinkerpop.gremlin.language.grammar.GremlinParser; + +/** + * Converts a Gremlin traversal string into a Groovy source code representation of that traversal with an aim at + * sacrificing some formatting for the ability to compile correctly. The translations may require use of TinkerPop's + * sugar syntax and therefore requires use of the {@code GremlinLoader} in the gremlin-groovy module unless you are + * specifically certain that your translations will not result in the use of that syntax. If in doubt, prefer the + * {@link JavaTranslateVisitor} instead. + * + * Normalize numeric suffixes to lower case + * If floats are not suffixed they will translate as BigDecimal + * Makes anonymous traversals explicit with double underscore + * Makes enums explicit with their proper name + * + */ +public class GroovyTranslateVisitor extends TranslateVisitor { +public GroovyTranslateVisitor() { +this("g"); +} + +public GroovyTranslateVisitor(final String graphTraversalSourceName) { +super(graphTraversalSourceName); +} + +@Override +public Void visitStructureVertex(final GremlinParser.StructureVertexContext ctx) { +sb.append("new DetachedVertex("); +visit(ctx.getChild(3)); // id +sb.append(", "); +visit(ctx.getChild(5)); // label +sb.append(")"); +return null; +} + +@Override +public Void visitIntegerLiteral(final GremlinParser.IntegerLiteralContext ctx) { +final String integerLiteral = ctx.getText().toLowerCase(); + +// check suffix +final int lastCharIndex = integerLiteral.length() - 1; +final char lastCharacter = integerLiteral.charAt(lastCharIndex); +switch (lastCharacter) { +case 'b': +// parse B/b as byte +sb.append("new Byte("); +sb.append(integerLiteral, 0, lastCharIndex); +sb.append(")"); +break; +case 's': +// parse S/s as short +sb.append("new Short("); +sb.append(integerLiteral, 0, lastCharIndex); +sb.append(")"); +break; +case 'i': +case 'l': +// parse I/i and L/l as Integer and Long respectively +sb.append(integerLiteral, 0, lastCharIndex).append(lastCharacter); +break; +case 'n': +// parse N/n as BigInteger which for groovy is "g" shorthand +sb.append(integerLiteral, 0, lastCharIndex).append("g"); +break; +default: +// everything else just goes as specified +sb.append(integerLiteral); +break; +
(tinkerpop) 05/08: update golang translation
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 0e8acbb02e430a5c54d6538020b87d783d06b4b8 Author: Valentyn Kahamlyk AuthorDate: Thu Jan 25 16:55:18 2024 -0800 update golang translation --- .../translator/DotNetTranslateVisitor.java | 2 +- .../language/translator/GoTranslateVisitor.java| 19 + .../language/translator/JavaTranslateVisitor.java | 2 +- .../language/translator/GremlinTranslatorTest.java | 13 ++- gremlin-go/driver/cucumber/gremlin.go | 94 +++--- gremlin-go/driver/strategies.go| 6 +- gremlin-go/driver/traversal.go | 19 + gremlin-go/go.mod | 1 - 8 files changed, 102 insertions(+), 54 deletions(-) diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/DotNetTranslateVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/DotNetTranslateVisitor.java index 273008e9e8..fc027ab3be 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/DotNetTranslateVisitor.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/DotNetTranslateVisitor.java @@ -191,7 +191,7 @@ public class DotNetTranslateVisitor extends AbstractTranslateVisitor { public Void visitStringLiteralList(final GremlinParser.StringLiteralListContext ctx) { sb.append("new List { "); for (int ix = 0; ix < ctx.getChild(1).getChildCount(); ix++) { -if (ctx.getChild(ix).getChild(ix) instanceof TerminalNode) +if (ctx.getChild(1).getChild(ix) instanceof TerminalNode) continue; visit(ctx.getChild(1).getChild(ix)); if (ix < ctx.getChild(1).getChildCount() - 1) diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GoTranslateVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GoTranslateVisitor.java index 0835643099..12f60296f9 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GoTranslateVisitor.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/GoTranslateVisitor.java @@ -195,6 +195,23 @@ public class GoTranslateVisitor extends AbstractTranslateVisitor { return null; } +@Override +public Void visitTraversalStrategyArgs_PartitionStrategy(final GremlinParser.TraversalStrategyArgs_PartitionStrategyContext ctx) { +appendStrategyArguments(ctx); + +if (ctx.getChild(0).getText().equals("readPartitions")) { +final int ix = sb.lastIndexOf("ReadPartitions: ["); +if (ix > 0) { +final int endIx = sb.indexOf("\"]", ix); +sb.replace(endIx, endIx + 2, "\")"); +sb.replace(ix, ix + 17, "ReadPartitions: gremlingo.NewSimpleSet("); +} + +} + +return null; +} + @Override public Void visitTraversalCardinality(final GremlinParser.TraversalCardinalityContext ctx) { // handle the enum style of cardinality if there is one child, otherwise it's the function call style @@ -251,6 +268,8 @@ public class GoTranslateVisitor extends AbstractTranslateVisitor { TO_GO_MAP.put("OUT", "Out"); TO_GO_MAP.put("IN", "In"); TO_GO_MAP.put("BOTH", "Both"); +TO_GO_MAP.put("WithOptions", GO_PACKAGE_NAME + "WithOptions"); +TO_GO_MAP.put("IO", GO_PACKAGE_NAME + "IO"); TO_GO_MAP.put("__", GO_PACKAGE_NAME + "T__"); TO_GO_MAP.forEach((k, v) -> FROM_GO_MAP.put(v, k)); } diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/JavaTranslateVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/JavaTranslateVisitor.java index 2fd5a349fb..480a1b5fa3 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/JavaTranslateVisitor.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/JavaTranslateVisitor.java @@ -227,7 +227,7 @@ public class JavaTranslateVisitor extends AbstractTranslateVisitor { public Void visitStringLiteralList(final GremlinParser.StringLiteralListContext ctx) { sb.append("new ArrayList() {{ "); for (int ix = 0; ix < ctx.getChild(1).getChildCount(); ix++) { -if (ctx.getChild(ix).getChild(ix) instanceof TerminalNode) +if (ctx.getChild(1).getChild(ix) instanceof TerminalNode) continue; sb.append("add("); visit(ctx.getChild(1).getChild(ix)); diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/language/translator/GremlinTranslatorTest
(tinkerpop) branch TINKERPOP-3028 updated (bcbed02f53 -> afdf357543)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch TINKERPOP-3028 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git discard bcbed02f53 Refactored after rebase of withoutStrategies addition discard b0e59f679d Removed breaking change on SeedStrategy and tucked in some javadoc discard 97c2711a12 update golang translation discard e959e96335 wip for Go discard e81230cbc5 .NET discard f37cd7ce5d groovy discard bde8c26b83 TINKERPOP-3028 Translators using grammar add aa90f77595 Bump Polly from 8.3.0 to 8.3.1 in /gremlin-dotnet add 936dd8137a Merge branch '3.6-dev' into 3.7-dev add cc43fbf57a Merge branch '3.7-dev' add f5d8225ca8 Bump System.Text.Json from 8.0.2 to 8.0.3 in /gremlin-dotnet add 8a71161877 Merge branch '3.6-dev' into 3.7-dev add bd5d4f77ad Merge branch '3.7-dev' add 196d61920c Added test for select() semantics CTR add cfbeb304cc Merge branch '3.6-dev' into 3.7-dev add 6c01291d06 Merge branch '3.7-dev' add f7c64dabf0 TINKERPOP-3056 Follow-on fix for mid-traversal mergeE/V add 20443b0d7b Merge branch '3.6-dev' into 3.7-dev add 0771f34afc Merge branch '3.7-dev' add 3015f37043 TINKERPOP-3056 Consistently promoting matched/created edge/vertex new 5269740a97 TINKERPOP-3028 Translators using grammar new 23bcd96000 groovy new d6836cb483 .NET new ba47795442 wip for Go new 0e8acbb02e update golang translation new 564b2a2437 Removed breaking change on SeedStrategy and tucked in some javadoc new 9afe7a4fdf Refactored after rebase of withoutStrategies addition new afdf357543 rebased This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (bcbed02f53) \ N -- N -- N refs/heads/TINKERPOP-3028 (afdf357543) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 8 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 7 +- docs/src/reference/the-traversal.asciidoc | 16 ++--- .../process/traversal/step/map/MergeEdgeStep.java | 6 +- .../process/traversal/step/map/MergeStep.java | 1 + .../traversal/step/map/MergeVertexStep.java| 9 ++- gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj | 4 +- .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 9 ++- gremlin-go/driver/cucumber/gremlin.go | 9 ++- .../gremlin-javascript/test/cucumber/gremlin.js| 9 ++- gremlin-python/src/main/python/radish/gremlin.py | 9 ++- .../gremlin/test/features/map/MergeEdge.feature| 74 +- .../gremlin/test/features/map/MergeVertex.feature | 46 +- .../gremlin/test/features/map/Select.feature | 16 + 13 files changed, 185 insertions(+), 30 deletions(-)
(tinkerpop) 06/08: Removed breaking change on SeedStrategy and tucked in some javadoc
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 564b2a24376067162fe62bea6dcae9665f20e213 Author: Stephen Mallette AuthorDate: Fri Jan 26 08:00:20 2024 -0500 Removed breaking change on SeedStrategy and tucked in some javadoc --- CHANGELOG.asciidoc | 3 +-- .../language/translator/TranslateVisitor.java | 1 - .../gremlin/language/translator/Translator.java| 2 +- .../language/translator/TranslatorException.java | 3 +++ .../strategy/decoration/SeedStrategy.java | 13 +++- gremlin-go/driver/cucumber/gremlin.go | 24 +++--- 6 files changed, 29 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 77d2f418bb..513473a185 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -24,8 +24,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima === TinkerPop 4.0.0 (NOT OFFICIALLY RELEASED YET) * Added support for deserialization of `Set` for `gremlin-javascript`. -* Made `SeedStrategy` construction consistent with the builder pattern and removed the public constructor. -* Added grammar-based `Translator`. +* Added grammar-based `Translator` for all languages including explicit ones for Java and anonymization. * Added integer overflow checks for `sum()`. * Gremlin Server only supports instantiation of `authentication.authenticationHandler` with three-arg constructor. * Removed previously deprecated two-arg constructors for `authentication.authenticationHandler` implementations. diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/TranslateVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/TranslateVisitor.java index 41d0849dd3..27e68d818f 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/TranslateVisitor.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/TranslateVisitor.java @@ -49,7 +49,6 @@ import java.util.Set; * Makes anonymous traversals explicit with double underscore * Makes enums explicit with their proper name * - * */ public class TranslateVisitor extends AbstractParseTreeVisitor implements GremlinVisitor { diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/Translator.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/Translator.java index fdf6d35073..0712599835 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/Translator.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/Translator.java @@ -64,7 +64,7 @@ public enum Translator { * Translates to gremlin-python. */ PYTHON("Python", PythonTranslateVisitor::new), -//GROOVY("Groovy", "org.apache.tinkerpop.gremlin.language.translator.GroovyTranslateVisitor"), + ; private final String name; diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/TranslatorException.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/TranslatorException.java index da59614876..524aa8a81a 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/TranslatorException.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/TranslatorException.java @@ -18,6 +18,9 @@ */ package org.apache.tinkerpop.gremlin.language.translator; +/** + * Exception produced by the {@link Translator} when it encounters an error. + */ public class TranslatorException extends RuntimeException { public TranslatorException(final String message) { super(message); diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SeedStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SeedStrategy.java index 15f6f3c7e5..3584cc69c0 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SeedStrategy.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SeedStrategy.java @@ -44,7 +44,11 @@ public class SeedStrategy extends AbstractTraversalStrategy
(tinkerpop) 08/08: rebased
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 afdf357543e7f5363f7a3137b1cbd447db46fb5c Author: Stephen Mallette AuthorDate: Fri Mar 22 13:39:01 2024 -0400 rebased --- .../test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 9 +++-- gremlin-go/driver/cucumber/gremlin.go| 9 +++-- .../main/javascript/gremlin-javascript/test/cucumber/gremlin.js | 9 +++-- gremlin-python/src/main/python/radish/gremlin.py | 9 +++-- 4 files changed, 28 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 1ee5f5052f..a3204a3111 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs @@ -929,8 +929,10 @@ namespace Gremlin.Net.IntegrationTest.Gherkin {"g_mergeV_mergeE_combination_new_vertices", new List, ITraversal>> {(g,p) =>g.MergeV((IDictionary) p["xx1"]).As("outV").MergeV((IDictionary) p["xx2"]).As("inV").MergeE((IDictionary) p["xx3"]).Option(Merge.OutV, (ITraversal) __.Select("outV")).Option(Merge.InV, (ITraversal) __.Select("inV")), (g,p) =>g.V(), (g,p) =>g.E(), (g,p) =>g.V().Has("name", "marko") [...] {"g_mergeV_mergeE_combination_existing_vertices", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name", "marko").AddV("person").Property("name", "vadas"), (g,p) =>g.MergeV((IDictionary) p["xx1"]).As("outV").MergeV((IDictionary) p["xx2"]).As("inV").MergeE((IDictionary) p["xx3"]).Option(Merge.OutV, (ITraversal) __.Select("outV")).Option(Merge.InV, (ITrav [...] {"g_V_asXvX_mergeEXxx1X_optionXMerge_onMatch_xx2X_optionXMerge_outV_selectXvXX_optionXMerge_inV_selectXvXX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name", "marko").Property("age", 29), (g,p) =>g.V().As("v").MergeE((IDictionary) p["xx1"]).Option(Merge.OnMatch, (IDictionary) p["xx2"]).Option(Merge.OutV, (ITraversal) __.Select("v")).Option(Merge.InV, (ITraversal) [...] - {"g_V_mergeEXlabel_knows_out_marko_in_vadasX_optionXonMatch_sideEffectXpropertyXweight_0XX_constantXemptyXX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name", "marko").As("a").AddV("person").Property("name", "vadas").As("b").AddE("knows").Property("weight", 1).From("a").To("b"), (g,p) =>g.V().MergeE((IDictionary) p["xx1"]).Option(Merge.OnMatch, (ITraversal) __.SideEffect(__.Property("we [...] + {"g_V_mergeEXlabel_knows_out_marko_in_vadasX_optionXonMatch_sideEffectXpropertyXweight_0XX_constantXemptyXX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name", "marko").As("a").AddV("person").Property("name", "vadas").As("b").AddE("knows").Property("weight", 1).From("a").To("b"), (g,p) =>g.V().MergeE((IDictionary) p["xx1"]).Option(Merge.OnMatch, (ITraversal) __.SideEffect(__.Property("we [...] {"g_mergeEXlabel_knows_out_marko_in_vadasX_optionXonMatch_sideEffectXpropertyXweight_0XX_constantXemptyXX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name", "marko").As("a").AddV("person").Property("name", "vadas").As("b").AddE("knows").Property("weight", 1).From("a").To("b"), (g,p) =>g.MergeE((IDictionary) p["xx1"]).Option(Merge.OnMatch, (ITraversal) __.SideEffect(__.Property("weight", [...] + {"g_injectXlist1_list2X_mergeEXlimitXlocal_1XX_optionXonCreate_rangeXlocal_1_2XX_optionXonMatch_tailXlocalXX_to_match", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name", "marko").Property("age", 29).As("marko").AddV("person").Property("name", "vadas").Property("age", 27).As("vadas").AddV("software").Property("name", "lop").Property("lang", "java").As("lop").AddV("person").Property("name", "josh").Proper [...] + {"g_injectXlist1_list2X_mergeEXlimitXlocal_1XX_optionXonCreate_rangeXlocal_1_2XX_optionXonMatch_tailXlocalXX_to_create", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name", "marko").Property("age", 29).As("marko").AddV("person").Property("name", "vadas").Property("age", 27).As("vadas").AddV("software").Property("name", "lop").Property("lang", "java").As("lop").AddV("person").Property("name", "josh").Prope [...] {"g_mergeVXemptyX_optionXonMatch_nullX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name", "marko").Property("age", 29), (g,p) =>g.MergeV((IDictionary) new Dictionary {}).Option(Merge.OnMatch, (IDictionary) null), (g,p) =>g.V().Has("person", "name", "marko").Has("age", 29)}}, {"g_V_mergeVXemptyX_optionXonMatch_nullX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name", "marko").Property("age", 29), (g,p) =>g.V().MergeV((IDict
(tinkerpop) branch master updated: TINKERPOP-3056 Consistently promoting matched/created edge/vertex
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 3015f37043 TINKERPOP-3056 Consistently promoting matched/created edge/vertex 3015f37043 is described below commit 3015f370431aa890492c33f94fa31138a0099d92 Author: Stephen Mallette AuthorDate: Fri Mar 22 11:13:06 2024 -0400 TINKERPOP-3056 Consistently promoting matched/created edge/vertex --- CHANGELOG.asciidoc | 1 + docs/src/reference/the-traversal.asciidoc | 30 +-- .../process/traversal/step/map/MergeEdgeStep.java | 10 +++ .../process/traversal/step/map/MergeStep.java | 34 -- .../traversal/step/map/MergeVertexStep.java| 12 .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 12 gremlin-go/driver/cucumber/gremlin.go | 12 .../gremlin-javascript/test/cucumber/gremlin.js| 12 gremlin-python/src/main/python/radish/gremlin.py | 12 .../gremlin/test/features/map/MergeEdge.feature| 21 +++-- .../gremlin/test/features/map/MergeVertex.feature | 20 +++-- 11 files changed, 67 insertions(+), 109 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index becc49c1ce..119d5cd987 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -35,6 +35,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Removed the deprecated `withGraph()` option from `AnonymousTraversalSource`. * Removed the `gremlin-archetype` module in favor of newer sample applications in each GLV's `examples` folder. * Bumped to `commons-collection4`. +* Made `mergeE()` and `mergeV()` consistent in their use as a start step and as mid-traversal by always promoting the currently created or matched `Element` to the `onCreate` or `onMatch` child traversal. * Added `withoutStrategies()` syntax to the Gremlin ANTLR grammar. * Modified the Gremlin ANTLR grammar to more dynamically interact with any strategies registered globally to the `TraversalStrategies` cache sets. * Made `new` keyword optional in the Gremlin grammar. diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index c75cdc9180..99d51b24f3 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -2886,13 +2886,6 @@ g.E().elementMap() <1> Create three dogs. <2> Stream the edge maps into `mergeE()` steps. -WARNING: There is a bit of an inconsistency present when `mergeE()` is used as a start step versus when it is used -mid-traversal. As a start step, `mergeE()` will promote the currently created or matched `Edge` to the child traversal, -allowing you to directly update it like `option(onMatch, property('k', 'v').constant([:]))`. However, when `mergeE()` is -used mid-traversal, the `Edge` is not promoted to the child traversal and the incoming traverser is used instead. Such -behavior is essentially blocked to prevent accidental misuse and will result in an exception at execution time that will -have a message like, "The incoming traverser for MergeEdgeStep cannot be an Element". - The `mergeE` step can be combined with the `mergeV` step (or any other step producing a `Vertex`) using the `Merge.outV` and `Merge.inV` option modulators. These options can be used to "late-bind" the `OUT` and `IN` vertices in the main merge argument and in the `onCreate` argument: @@ -3105,15 +3098,15 @@ contains additional information that will be applied if an existing vertex is fo [gremlin-groovy] -g.inject([[(T.id):400],[(T.label):'Dog',name:'Pixel',age:1],[updated:'2022-02-1']]). - mergeV(limit(local,1)). <1> - option(Merge.onCreate,range(local,1,2)). <2> - option(Merge.onMatch,tail(local)) <3> +g.inject([[(T.id):400],[(T.label):'Dog',name:'Pixel',age:1],[updated:'2022-02-1']]).as('m'). + mergeV(select('m').limit(local,1)). <1> + option(Merge.onCreate, select('m').range(local,1,2)). <2> + option(Merge.onMatch, select('m').tail(local)) <3> g.V(400).valueMap().with(WithOptions.tokens) -g.inject([[(T.id):400],[(T.label):'Dog',name:'Pixel',age:1],[updated:'2022-02-1']]). - mergeV(limit(local,1)). - option(Merge.onCreate,range(local,1,2)). - option(Merge.onMatch,tail(local)) <4> +g.inject([[(T.id):400],[(T.label):'Dog',name:'Pixel',age:1],[updated:'2022-02-1']]).as('m'). + mergeV(select('m').limit(local,1)). + option(Merge.onCreate, select('m').range(local,1,2)). + option(Merge.onMatch, select('m').tail(local)) <4> g.V(400).valueMap().with(WithOptions.tokens) <5> @@ -3123,13 +3116,6 @@ g.V(400).valueMap().with(WithOptions.tokens) <5> <4> Pixel exists now, so we will take this option. <5> The `updated` property has now been added. -WARNING: There is a bit of an inco
(tinkerpop) branch 3.6-dev updated (196d61920c -> f7c64dabf0)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch 3.6-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 196d61920c Added test for select() semantics CTR add f7c64dabf0 TINKERPOP-3056 Follow-on fix for mid-traversal mergeE/V No new revisions were added by this update. Summary of changes: CHANGELOG.asciidoc | 6 +- docs/src/reference/the-traversal.asciidoc | 14 .../process/traversal/step/map/MergeEdgeStep.java | 8 ++- .../process/traversal/step/map/MergeStep.java | 35 ++ .../traversal/step/map/MergeVertexStep.java| 7 +- .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 8 ++- gremlin-go/driver/cucumber/gremlin.go | 8 ++- .../gremlin-javascript/test/cucumber/gremlin.js| 8 ++- gremlin-python/src/main/python/radish/gremlin.py | 8 ++- .../gremlin/test/features/map/MergeEdge.feature| 77 -- .../gremlin/test/features/map/MergeVertex.feature | 46 - 11 files changed, 201 insertions(+), 24 deletions(-)
(tinkerpop) branch 3.7-dev updated (cfbeb304cc -> 20443b0d7b)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from cfbeb304cc Merge branch '3.6-dev' into 3.7-dev add f7c64dabf0 TINKERPOP-3056 Follow-on fix for mid-traversal mergeE/V add 20443b0d7b Merge branch '3.6-dev' into 3.7-dev No new revisions were added by this update. Summary of changes: CHANGELOG.asciidoc | 6 +- docs/src/reference/the-traversal.asciidoc | 14 .../process/traversal/step/map/MergeEdgeStep.java | 8 ++- .../process/traversal/step/map/MergeStep.java | 35 ++ .../traversal/step/map/MergeVertexStep.java| 7 +- .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 8 ++- gremlin-go/driver/cucumber/gremlin.go | 8 ++- .../gremlin-javascript/test/cucumber/gremlin.js| 8 ++- gremlin-python/src/main/python/radish/gremlin.py | 8 ++- .../gremlin/test/features/map/MergeEdge.feature| 77 -- .../gremlin/test/features/map/MergeVertex.feature | 48 -- 11 files changed, 202 insertions(+), 25 deletions(-)
(tinkerpop) 01/03: TINKERPOP-3056 Follow-on fix for mid-traversal mergeE/V
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 commit f7c64dabf07f6d5008bf457690b85b6a86d2c924 Author: Stephen Mallette AuthorDate: Fri Mar 22 09:03:26 2024 -0400 TINKERPOP-3056 Follow-on fix for mid-traversal mergeE/V Prevents child traversals to option() from having an Element in it so that you can't mistakenly update the wrong thing CTR --- CHANGELOG.asciidoc | 6 +- docs/src/reference/the-traversal.asciidoc | 14 .../process/traversal/step/map/MergeEdgeStep.java | 8 ++- .../process/traversal/step/map/MergeStep.java | 35 ++ .../traversal/step/map/MergeVertexStep.java| 7 +- .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 8 ++- gremlin-go/driver/cucumber/gremlin.go | 8 ++- .../gremlin-javascript/test/cucumber/gremlin.js| 8 ++- gremlin-python/src/main/python/radish/gremlin.py | 8 ++- .../gremlin/test/features/map/MergeEdge.feature| 77 -- .../gremlin/test/features/map/MergeVertex.feature | 46 - 11 files changed, 201 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 27fde68afd..b813d15ae7 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -29,13 +29,13 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Fixed bug in bytecode translation of `g.tx().commit()` and `g.tx().rollback()` in all languages. * Improved error message from `JavaTranslator` by including exception source. * Added missing `short` serialization (`gx:Int16`) to GraphSONV2 and GraphSONV3 in `gremlin-python`. -* Added tests for error handling for GLV's if tx.commit() is called remotely for graphs without transactions support. +* Added tests for error handling for GLV's if `tx.commit()`` is called remotely for graphs without transactions support. * Introduced multi-architecture AMD64/ARM64 docker images for gremlin-console. * Fixed bug in `JavaTranslator` where `has(String, null)` could call `has(String, Traversal)` to generate an error. * Fixed issue where server errors weren't being properly parsed when sending bytecode over HTTP. -* Improved bulkset contains check for elements if all elements in bulkset are of the same type. +* Improved `Bulkset` contains check for elements if all elements in `Bulkset` are of the same type. * Fixed bug in `EarlyLimitStrategy` which was too aggressive when promoting `limit()` before `map()`. -* Fixed bug in mid-traversal `mergeE()` where mutations in `sideEffect()` were being applied to the current traverser rather than a `onMatch` edge. +* Prevented mid-traversal `mergeE()` and `mergeV()` from operating on an incoming `Traverser` that contains an `Element`. * Improved performance of the application of `FilterRankingStrategy` for large traversals with deeply nested traversals by improving the cache operation. [[release-3-6-6]] diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index ef1192d0ad..ca89014eef 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -2515,6 +2515,13 @@ g.E().elementMap() <1> Create three dogs. <2> Stream the edge maps into `mergeE()` steps. +WARNING: There is a bit of an inconsistency present when `mergeE()` is used as a start step versus when it is used +mid-traversal. As a start step, `mergeE()` will promote the currently created or matched `Edge` to the child traversal, +allowing you to directly update it like `option(onMatch, property('k', 'v').constant([:]))`. However, when `mergeE()` is +used mid-traversal, the `Edge` is not promoted to the child traversal and the incoming traverser is used instead. Such +behavior is essentially blocked to prevent accidental misuse and will result in an exception at execution time that will +have a message like, "The incoming traverser for MergeEdgeStep cannot be an Element". + The `mergeE` step can be combined with the `mergeV` step (or any other step producing a `Vertex`) using the `Merge.outV` and `Merge.inV` option modulators. These options can be used to "late-bind" the `OUT` and `IN` vertices in the main merge argument and in the `onCreate` argument: @@ -2732,6 +2739,13 @@ g.V(400).valueMap().with(WithOptions.tokens) <5> <4> Pixel exists now, so we will take this option. <5> The `updated` property has now been added. +WARNING: There is a bit of an inconsistency present when `mergeV()` is used as a start step versus when it is used +mid-traversal. As a start step, `mergeV()` will promote the currently created or matched `Vertex` to the child +traversal, allowing you to directly update it like `option(onMatch, property('k', 'v').constant([:]))`. However, when +`mergeV()` is used mid-traversal, the `Vertex` is not promoted to
(tinkerpop) 03/03: Merge branch '3.7-dev'
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 commit 0771f34afcc0436f144ec56a2d96154ec5668bba Merge: 6c01291d06 20443b0d7b Author: Stephen Mallette AuthorDate: Fri Mar 22 09:36:17 2024 -0400 Merge branch '3.7-dev' CHANGELOG.asciidoc | 6 +- docs/src/reference/the-traversal.asciidoc | 14 .../process/traversal/step/map/MergeEdgeStep.java | 8 ++- .../process/traversal/step/map/MergeStep.java | 35 ++ .../traversal/step/map/MergeVertexStep.java| 7 +- .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 8 ++- gremlin-go/driver/cucumber/gremlin.go | 8 ++- .../gremlin-javascript/test/cucumber/gremlin.js| 8 ++- gremlin-python/src/main/python/radish/gremlin.py | 8 ++- .../gremlin/test/features/map/MergeEdge.feature| 77 -- .../gremlin/test/features/map/MergeVertex.feature | 48 -- 11 files changed, 202 insertions(+), 25 deletions(-)
(tinkerpop) branch master updated (6c01291d06 -> 0771f34afc)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 6c01291d06 Merge branch '3.7-dev' new f7c64dabf0 TINKERPOP-3056 Follow-on fix for mid-traversal mergeE/V new 20443b0d7b Merge branch '3.6-dev' into 3.7-dev new 0771f34afc Merge branch '3.7-dev' The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 6 +- docs/src/reference/the-traversal.asciidoc | 14 .../process/traversal/step/map/MergeEdgeStep.java | 8 ++- .../process/traversal/step/map/MergeStep.java | 35 ++ .../traversal/step/map/MergeVertexStep.java| 7 +- .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 8 ++- gremlin-go/driver/cucumber/gremlin.go | 8 ++- .../gremlin-javascript/test/cucumber/gremlin.js| 8 ++- gremlin-python/src/main/python/radish/gremlin.py | 8 ++- .../gremlin/test/features/map/MergeEdge.feature| 77 -- .../gremlin/test/features/map/MergeVertex.feature | 48 -- 11 files changed, 202 insertions(+), 25 deletions(-)
(tinkerpop) 02/03: Merge branch '3.6-dev' into 3.7-dev
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 commit 20443b0d7b241f121a53ae98d8fc3ed343ddedbd Merge: cfbeb304cc f7c64dabf0 Author: Stephen Mallette AuthorDate: Fri Mar 22 09:06:03 2024 -0400 Merge branch '3.6-dev' into 3.7-dev CHANGELOG.asciidoc | 6 +- docs/src/reference/the-traversal.asciidoc | 14 .../process/traversal/step/map/MergeEdgeStep.java | 8 ++- .../process/traversal/step/map/MergeStep.java | 35 ++ .../traversal/step/map/MergeVertexStep.java| 7 +- .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 8 ++- gremlin-go/driver/cucumber/gremlin.go | 8 ++- .../gremlin-javascript/test/cucumber/gremlin.js| 8 ++- gremlin-python/src/main/python/radish/gremlin.py | 8 ++- .../gremlin/test/features/map/MergeEdge.feature| 77 -- .../gremlin/test/features/map/MergeVertex.feature | 48 -- 11 files changed, 202 insertions(+), 25 deletions(-) diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs index 873667a1a2,bf7e01c810..e520b2b328 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs @@@ -962,17 -741,9 +964,19 @@@ namespace Gremlin.Net.IntegrationTest.G {"g_mergeV_hidden_label_value_onCreate_prohibited", new List, ITraversal>> {(g,p) =>g.MergeV((IDictionary) new Dictionary {}).Option(Merge.OnCreate, (IDictionary) p["xx1"])}}, {"g_mergeV_hidden_id_key_onMatch_matched_prohibited", new List, ITraversal>> {(g,p) =>g.AddV("vertex"), (g,p) =>g.MergeV((IDictionary) new Dictionary {}).Option(Merge.OnMatch, (IDictionary) p["xx1"])}}, {"g_mergeV_hidden_label_key_matched_onMatch_matched_prohibited", new List, ITraversal>> {(g,p) =>g.AddV("vertex"), (g,p) =>g.MergeV((IDictionary) new Dictionary {}).Option(Merge.OnMatch, (IDictionary) p["xx1"])}}, + {"g_mergeVXname_markoX_optionXonMatch_age_listX33XX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property(Cardinality.List,"age",29).Property(Cardinality.List,"age",31).Property(Cardinality.List,"age",32), (g,p) =>g.MergeV((IDictionary) new Dictionary {{"name", "marko"}}).Option(Merge.OnMatch, (IDictionary) new Dictionary {{"age [...] + {"g_mergeVXname_markoX_optionXonMatch_age_setX33XX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property(Cardinality.List,"age",29).Property(Cardinality.List,"age",31).Property(Cardinality.List,"age",32), (g,p) =>g.MergeV((IDictionary) new Dictionary {{"name", "marko"}}).Option(Merge.OnMatch, (IDictionary) new Dictionary {{"age" [...] + {"g_mergeVXname_markoX_optionXonMatch_age_setX31XX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property(Cardinality.List,"age",29).Property(Cardinality.List,"age",31).Property(Cardinality.List,"age",32), (g,p) =>g.MergeV((IDictionary) new Dictionary {{"name", "marko"}}).Option(Merge.OnMatch, (IDictionary) new Dictionary {{"age" [...] + {"g_mergeVXname_markoX_optionXonMatch_age_singleX33XX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property(Cardinality.List,"age",29).Property(Cardinality.List,"age",31).Property(Cardinality.List,"age",32), (g,p) =>g.MergeV((IDictionary) new Dictionary {{"name", "marko"}}).Option(Merge.OnMatch, (IDictionary) new Dictionary {{"a [...] + {"g_mergeVXname_markoX_optionXonMatch_age_33_singleX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property(Cardinality.List,"age",29).Property(Cardinality.List,"age",31).Property(Cardinality.List,"age",32), (g,p) =>g.MergeV((IDictionary) new Dictionary {{"name", "marko"}}).Option(Merge.OnMatch,new Dictionary {{"age", 33}},Cardinality.Single), [...] + {"g_mergeVXname_markoX_optionXonMatch_name_allen_age_setX31X_singleX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property(Cardinality.List,"age",29).Property(Cardinality.List,"age",31).Property(Cardinality.List,"age",32), (g,p) =>g.MergeV((IDictionary) new Dictionary {{"name", "marko"}}).Option(Merge.OnMatch,new Dictionary {{"name", "allen"}, [...] + {"g_mergeVXname_markoX_optionXonMatch_name_allen_age_singleX31X_singleX", new List, ITraversal>> {(g,p) =>g.AddV("person").Property("name","marko").Property(Cardinality.List,"age",29).Property(Cardinality.List,"age",31).Property(Cardinality.List,"age",32), (g,p) =>g.MergeV((IDictionary) new Dictionary {{"name", "marko"}}).Option(Merge.OnMatch,new Dictionary {{"name", "allen [...] + {"g_mergeVXname_aliceX_optionXonCreate_age_singleX81XX", new List, ITraversa