You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by fl...@apache.org on 2018/03/18 12:03:50 UTC
[17/18] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/2fd0f255
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/2fd0f255
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/2fd0f255
Branch: refs/heads/master
Commit: 2fd0f2558ddb37304628bdcf0637bb7a8ae5bf6a
Parents: b8eb8a0 eeea869
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sun Mar 18 12:53:12 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sun Mar 18 12:53:12 2018 +0100
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
docs/src/reference/gremlin-variants.asciidoc | 29 ++++++--
.../upgrade/release-3.2.x-incubating.asciidoc | 7 ++
gremlin-dotnet/glv/generate.groovy | 4 +-
.../Process/Traversal/GraphTraversalSource.cs | 52 +++++++++++++-
.../Gremlin.Net/Process/Traversal/ISupplier.cs | 32 +++++++++
.../Process/Traversal/IUnaryOperator.cs | 33 +++++++++
.../src/Gremlin.Net/Process/Traversal/Lambda.cs | 73 ++++++++++++++++++++
.../Process/Traversal/StringBasedLambda.cs | 42 +++++++++++
.../Structure/IO/GraphSON/GraphSONWriter.cs | 3 +-
.../Structure/IO/GraphSON/LambdaSerializer.cs | 43 ++++++++++++
.../Gherkin/CommonSteps.cs | 2 +-
.../Gherkin/IgnoreException.cs | 9 ---
.../TraversalEvaluation/TraversalParser.cs | 2 +-
.../IO/GraphSON/GraphSONWriterTests.cs | 13 ++++
15 files changed, 325 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2fd0f255/CHANGELOG.asciidoc
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2fd0f255/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2fd0f255/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2fd0f255/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2fd0f255/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2fd0f255/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2fd0f255/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
index 7e793ca,dd96474..4bb83ae
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
@@@ -234,14 -233,9 +234,14 @@@ namespace Gremlin.Net.IntegrationTest.G
private static object ToLambda(string stringLambda, string graphName)
{
- throw new IgnoreException(IgnoreReason.LambdaNotSupported);
+ return Lambda.Groovy(stringLambda);
}
+ private static object ToT(string enumName, string graphName)
+ {
+ return Enum.Parse(typeof(T), TraversalParser.GetCsharpName(enumName));
+ }
+
private static object ToNumber(string stringNumber, string graphName)
{
return NumericParsers[stringNumber[stringNumber.Length - 1]](
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2fd0f255/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index 56984d9,9aa5213..9bcb860
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@@ -40,12 -40,6 +40,9 @@@ namespace Gremlin.Net.IntegrationTest.G
string reasonSuffix = null;
switch (reason)
{
- case IgnoreReason.LambdaNotSupported:
- reasonSuffix = " because lambdas are not supported in Gremlin.NET (TINKERPOP-1854)";
- break;
+ case IgnoreReason.TraversalTDeserializationNotSupported:
+ reasonSuffix = " as deserialization of g:T on GraphSON3 is not supported";
+ break;
case IgnoreReason.PWithinWrapsArgumentsInArray:
reasonSuffix = " because P.Within() arguments are incorrectly wrapped in an array (TINKERPOP-1920)";
break;
@@@ -59,16 -53,6 +56,10 @@@
public enum IgnoreReason
{
+ /// <summary>
- /// Lambdas are not supported on Gremlin.NET yet.
- /// </summary>
- LambdaNotSupported,
-
- /// <summary>
+ /// Deserialization of g:T on GraphSON3 is not supported.
+ /// </summary>
+ TraversalTDeserializationNotSupported,
-
PWithinWrapsArgumentsInArray,
PNotDeserializationProblem
}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2fd0f255/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
index 0898c1c,54dc8f3..9f62abe
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
@@@ -393,6 -333,19 +393,19 @@@ namespace Gremlin.Net.UnitTest.Structur
const string expected = "{\"@type\":\"g:SubgraphStrategy\",\"@value\":{}}";
Assert.Equal(expected, graphSon);
}
+
- [Fact]
- public void ShouldSerializeLambda()
++ [Theory, MemberData(nameof(Versions))]
++ public void ShouldSerializeLambda(int version)
+ {
- var writer = CreateStandardGraphSONWriter();
++ var writer = CreateGraphSONWriter(version);
+ var lambda = Lambda.Groovy("{ it.get() }");
+
+ var graphSon = writer.WriteObject(lambda);
+
+ const string expected =
+ "{\"@type\":\"g:Lambda\",\"@value\":{\"script\":\"{ it.get() }\",\"language\":\"gremlin-groovy\",\"arguments\":-1}}";
+ Assert.Equal(expected, graphSon);
+ }
}
internal class TestGraphSONSerializer : IGraphSONSerializer