You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2018/02/27 17:18:42 UTC

[31/50] tinkerpop git commit: Merge branch 'tp32'

Merge branch 'tp32'

Conflicts:
	gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
	gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
	gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
	gremlin-server/src/test/scripts/test-server-start.groovy


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1c49c274
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1c49c274
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1c49c274

Branch: refs/heads/TINKERPOP-1777
Commit: 1c49c274fdb24acbfed3697e85dbf09509d3e57b
Parents: 9043744 d42d54d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 14:06:43 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 14:06:43 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                |  22 +-
 .../Gherkin/IgnoreException.cs                  |  12 +-
 .../Gherkin/ScenarioData.cs                     |   2 +-
 .../lib/driver/driver-remote-connection.js      |  35 ++
 .../test/cucumber/feature-steps.js              |   7 +
 .../gremlin-javascript/test/cucumber/world.js   |   2 +-
 gremlin-python/glv/TraversalSource.template     |  14 +-
 .../jython/gremlin_python/process/traversal.py  |  14 +-
 .../src/main/jython/radish/feature_steps.py     | 105 +++-
 .../src/main/jython/radish/terrain.py           |   9 +-
 .../src/test/scripts/generate-all.groovy        |   4 +-
 .../src/test/scripts/test-server-start.groovy   |   2 +
 gremlin-test/features/branch/Repeat.feature     |  16 +
 gremlin-test/features/branch/Union.feature      |  16 +-
 gremlin-test/features/filter/Filter.feature     |  24 +
 gremlin-test/features/filter/Has.feature        | 479 ++++++++++++++++++-
 gremlin-test/features/filter/Range.feature      |   4 +-
 gremlin-test/features/filter/Where.feature      | 221 +++++++++
 gremlin-test/features/map/AddVertex.feature     | 165 ++++++-
 gremlin-test/features/map/Match.feature         | 315 ++++++++++++
 gremlin-test/features/map/Min.feature           |  11 +
 gremlin-test/features/map/Order.feature         | 193 ++++++++
 gremlin-test/features/map/Properties.feature    |  16 +-
 gremlin-test/features/map/Select.feature        | 195 +++++++-
 gremlin-test/features/sideEffect/Inject.feature |  17 +
 gremlin-test/features/sideEffect/Sack.feature   |  42 +-
 .../features/sideEffect/SideEffectCap.feature   |   8 +-
 .../traversal/step/branch/LocalTest.java        |   2 +-
 .../traversal/step/branch/RepeatTest.java       |   2 +-
 .../traversal/step/branch/UnionTest.java        |   4 +-
 .../process/traversal/step/filter/AndTest.java  |   4 +-
 .../traversal/step/filter/FilterTest.java       |   9 +-
 .../process/traversal/step/filter/HasTest.java  |  43 +-
 .../traversal/step/filter/WhereTest.java        |  10 +-
 .../traversal/step/map/AddVertexTest.java       |  27 +-
 .../process/traversal/step/map/MatchTest.java   |   4 +-
 .../process/traversal/step/map/SelectTest.java  |   2 +-
 .../gremlin/process/FeatureCoverageTest.java    | 120 ++++-
 38 files changed, 2036 insertions(+), 141 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index e3c92f3,69af86f..5f331cb
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@@ -37,12 -37,28 +37,32 @@@ namespace Gremlin.Net.IntegrationTest.G
  {
      public class GherkinTestRunner
      {
 -        private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios = new Dictionary<string, IgnoreReason> {
 -            { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasIdXwithinXemptyXX_count", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX", IgnoreReason.NeedsFurtherInvestigation }
 -        };
 +        private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios =
 +            new Dictionary<string, IgnoreReason>
 +            {
 +                { "g_V_valueMapXtrueX", IgnoreReason.TraversalTDeserializationNotSupported },
-                 { "g_V_valueMapXtrue_name_ageX", IgnoreReason.TraversalTDeserializationNotSupported }
++                { "g_V_valueMapXtrue_name_ageX", IgnoreReason.TraversalTDeserializationNotSupported },
++                { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasIdXwithinXemptyXX_count", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX", IgnoreReason.NeedsFurtherInvestigation }
 +            };
          
          private static class Keywords
          {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index 915a069,0179994..7733f34
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@@ -43,9 -43,9 +43,12 @@@ namespace Gremlin.Net.IntegrationTest.G
                  case IgnoreReason.LambdaNotSupported:
                      reasonSuffix = " because lambdas are not supported in Gremlin.NET";
                      break;
 +                case IgnoreReason.TraversalTDeserializationNotSupported:
 +                    reasonSuffix = " as deserialization of g:T on GraphSON3 is not supported";
 +                    break;
+                 case IgnoreReason.NeedsFurtherInvestigation:
+                     reasonSuffix = " as further investigation is required";
+                     break;
              }
              return $"Scenario ignored" + reasonSuffix;
          }
@@@ -53,14 -53,7 +56,19 @@@
      
      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
++        TraversalTDeserializationNotSupported,
++
++        /// <summary>
++        /// Problem not yet classified and needs additional review.
++        /// </summary>
+         NeedsFurtherInvestigation
      }
  }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --cc gremlin-python/src/main/jython/radish/feature_steps.py
index 3de641e,3ba88a2..e29607d
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@@ -36,10 -36,20 +36,22 @@@ regex_or = re.compile(r"([(.,\s])or\("
  regex_true = re.compile(r"(true)")
  regex_false = re.compile(r"(false)")
  
+ outV = __.outV
+ label = __.label
+ inV = __.inV
+ project = __.project
+ tail = __.tail
  
  ignores = [
-     "g.V(v1Id).out().inject(v2).values(\"name\")"  # bug in attachment won't connect v2
-            ]
+     "g.V(v1Id).out().inject(v2).values(\"name\")",  # bug in attachment won't connect v2
+     # TINKERPOP-1859 - for the following...seems to be related to P.not processing
+     "g.V().hasLabel(\"person\").has(\"age\", P.not(P.lte(d10).and(P.not(P.between(d11, d20)))).and(P.lt(d29).or(P.eq(d35)))).values(\"name\")",
+     "g.V(v1Id).out().aggregate(\"x\").out().where(P.not(P.within(\"x\")))",
+     "g.V().as(\"a\").out().as(\"b\").where(__.and(__.as(\"a\").out(\"knows\").as(\"b\"), __.or(__.as(\"b\").out(\"created\").has(\"name\", \"ripple\"), __.as(\"b\").in(\"knows\").count().is(P.not(P.eq(0)))))).select(\"a\", \"b\")",
 -    "g.V().as(\"a\").out(\"created\").as(\"b\").in(\"created\").as(\"c\").both(\"knows\").both(\"knows\").as(\"d\").where(\"c\", P.not(P.eq(\"a\").or(P.eq(\"d\")))).select(\"a\", \"b\", \"c\", \"d\")"
 -           ]
++    "g.V().as(\"a\").out(\"created\").as(\"b\").in(\"created\").as(\"c\").both(\"knows\").both(\"knows\").as(\"d\").where(\"c\", P.not(P.eq(\"a\").or(P.eq(\"d\")))).select(\"a\", \"b\", \"c\", \"d\")",
++    # not sure yet
++    "g.V(v1).hasLabel(\"person\").map(l1).order(Scope.local).by(Column.values, Order.decr).by(Column.keys, Order.incr)"
++    ]
  
  
  @given("the {graph_name:w} graph")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-python/src/main/jython/radish/terrain.py
----------------------------------------------------------------------
diff --cc gremlin-python/src/main/jython/radish/terrain.py
index d5a4c16,4db443e..ba8f372
--- a/gremlin-python/src/main/jython/radish/terrain.py
+++ b/gremlin-python/src/main/jython/radish/terrain.py
@@@ -17,10 -17,8 +17,9 @@@ specific language governing permission
  under the License.
  '''
  
- import re
  from gremlin_python.structure.graph import Graph
  from gremlin_python.process.graph_traversal import __
 +from gremlin_python.driver import serializer
  from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
  from radish import before, after, world
  

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-server/src/test/scripts/test-server-start.groovy
----------------------------------------------------------------------
diff --cc gremlin-server/src/test/scripts/test-server-start.groovy
index 00ebb59,1cb2c53..1e2b012
--- a/gremlin-server/src/test/scripts/test-server-start.groovy
+++ b/gremlin-server/src/test/scripts/test-server-start.groovy
@@@ -30,7 -30,8 +30,8 @@@ settings.graphs.classic = gremlinServer
  settings.graphs.modern = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settings.graphs.crew = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settings.graphs.grateful = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
+ settings.graphs.sink = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 -settings.scriptEngines["gremlin-groovy"].scripts = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
 +settings.scriptEngines["gremlin-groovy"].plugins["org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin"].files = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
  if (Boolean.parseBoolean(python)) {
      settings.scriptEngines["gremlin-python"] = new Settings.ScriptEngineSettings()
      settings.scriptEngines["gremlin-jython"] = new Settings.ScriptEngineSettings()
@@@ -58,7 -50,8 +59,8 @@@ settingsSecure.graphs.classic = gremlin
  settingsSecure.graphs.modern = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settingsSecure.graphs.crew = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settingsSecure.graphs.grateful = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
+ settingsSecure.graphs.sink = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 -settingsSecure.scriptEngines["gremlin-groovy"].scripts = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
 +settingsSecure.scriptEngines["gremlin-groovy"].plugins["org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin"].files = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
  if (Boolean.parseBoolean(python)) {
      settingsSecure.scriptEngines["gremlin-python"] = new Settings.ScriptEngineSettings()
      settingsSecure.scriptEngines["gremlin-jython"] = new Settings.ScriptEngineSettings()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-test/features/filter/Range.feature
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
----------------------------------------------------------------------