tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ok...@apache.org
Subject incubator-tinkerpop git commit: tada -- fixed my groupCount()...groupCount()... bug. Added a crazy asynchronous traversal to groupCount() that demonstrates that the timing is correct for OLAP to OLTP to OLAP conversion. I went through all the test case t
Date Fri, 26 Feb 2016 16:33:39 GMT
Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1166 42b725450 -> efc1739f1


tada -- fixed my groupCount()...groupCount()... bug. Added a crazy asynchronous traversal
to groupCount() that demonstrates that the timing is correct for OLAP to OLTP to OLAP conversion.
I went through all the test case that have Ignore over a test and remove lots of them. Some
didnt even make sense why we had them Ignored. There are only a few Ignore(COMPUTER) and they
make sense... (not related to this PR, but in general issues with serialization or whatnot).
This new OLAP work is sooooo slammin.


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

Branch: refs/heads/TINKERPOP-1166
Commit: efc1739f183ff8f30be54b53c393e3ba8d03ced9
Parents: 42b7254
Author: Marko A. Rodriguez <okrammarko@gmail.com>
Authored: Fri Feb 26 09:33:33 2016 -0700
Committer: Marko A. Rodriguez <okrammarko@gmail.com>
Committed: Fri Feb 26 09:33:33 2016 -0700

----------------------------------------------------------------------
 .../traversal/TraversalVertexProgram.java       | 18 ++++++++------
 .../step/sideEffect/GroovyGroupCountTest.groovy |  5 ++++
 .../process/traversal/step/filter/HasTest.java  |  1 -
 .../traversal/step/filter/WhereTest.java        |  3 ---
 .../process/traversal/step/map/GraphTest.java   |  2 --
 .../traversal/step/map/MapValuesTest.java       |  1 -
 .../process/traversal/step/map/OrderTest.java   |  1 -
 .../process/traversal/step/map/SelectTest.java  | 14 +++++------
 .../step/sideEffect/GroupCountTest.java         | 26 ++++++++++++++++++--
 .../structure/TinkerGraphPlayTest.java          |  2 +-
 10 files changed, 47 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/efc1739f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/TraversalVertexProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/TraversalVertexProgram.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/TraversalVertexProgram.java
index ee66c52..26790ed 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/TraversalVertexProgram.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/TraversalVertexProgram.java
@@ -273,7 +273,7 @@ public final class TraversalVertexProgram implements VertexProgram<TraverserSet<
                             ((ReducingBarrierStep) graphComputing).next(); // or else you
will get a seed
                         traverser.setStepId(((Step) graphComputing).getNextStep().getId());
// should really for ReducingBarrierStep seed.
                         traverserSet.add(traverser);
-                       // memory.set(graphComputing.getMemoryComputeKey().get().getKey(),
((ReducingBarrierStep) graphComputing).getSeedSupplier().get());
+                        memory.set(key, ((ReducingBarrierStep) graphComputing).getSeedSupplier().get());
                     } else {
                         memory.set(key, graphComputing.generateFinalResult(memory.get(key)));
// XXXSideEffectSteps (may need to relocate this to post HALT)
                     }
@@ -298,6 +298,8 @@ public final class TraversalVertexProgram implements VertexProgram<TraverserSet<
             } else {
                 final Step<?, ?> currentStep = this.traversalMatrix.getStepById(traverser.getStepId());
                 if (!currentStep.getId().equals(previousStep.getId()) && !(previousStep
instanceof EmptyStep)) {
+                    if (currentStep instanceof GraphComputing)
+                        ((GraphComputing<?>) currentStep).getMemoryComputeKey().ifPresent(memoryComputeKey
-> this.neverTouchedMemoryKeys.remove(memoryComputeKey.getKey()));
                     currentStep.forEachRemaining(result -> {
                         if (result.asAdmin().isHalted())
                             haltedTraversers.add((Traverser.Admin) result);
@@ -313,14 +315,16 @@ public final class TraversalVertexProgram implements VertexProgram<TraverserSet<
                 previousStep = currentStep;
             }
         }
-        previousStep.forEachRemaining(result -> {
-            if (result.asAdmin().isHalted())
-                haltedTraversers.add((Traverser.Admin) result);
+        if (previousStep instanceof GraphComputing)
+            ((GraphComputing<?>) previousStep).getMemoryComputeKey().ifPresent(memoryComputeKey
-> this.neverTouchedMemoryKeys.remove(memoryComputeKey.getKey()));
+        previousStep.forEachRemaining(traverser -> {
+            if (traverser.asAdmin().isHalted())
+                haltedTraversers.add((Traverser.Admin) traverser);
             else {
-                if (result.get() instanceof Attachable)
-                    remoteAliveTraversers.add((Traverser.Admin) result);
+                if (traverser.get() instanceof Attachable)
+                    remoteAliveTraversers.add((Traverser.Admin) traverser);
                 else
-                    localAliveTraversers.add((Traverser.Admin) result);
+                    localAliveTraversers.add((Traverser.Admin) traverser);
             }
         });
     }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/efc1739f/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroovyGroupCountTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroovyGroupCountTest.groovy
b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroovyGroupCountTest.groovy
index 71bd88d..0ba8323 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroovyGroupCountTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroovyGroupCountTest.groovy
@@ -82,5 +82,10 @@ public abstract class GroovyGroupCountTest {
         public Traversal<Vertex, Map<Long, Long>> get_g_V_groupCount_byXbothE_countX()
{
             new ScriptTraversal<>(g, "gremlin-groovy", "g.V.groupCount.by(bothE().count)")
         }
+
+        @Override
+        public Traversal<Vertex, Long> get_g_V_unionXoutXknowsX__outXcreatedX_inXcreatedXX_groupCount_selectXvaluesX_unfold_sum()
{
+            new ScriptTraversal<>(g, "gremlin-groovy", "g.V.union(out('knows'), out('created').in('created')).groupCount.select(values).unfold.sum");
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/efc1739f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
index e5f2281..1cc642f 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
@@ -172,7 +172,6 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    @IgnoreEngine(TraversalEngine.Type.COMPUTER)
     public void g_VXv1X_hasXage_gt_30X() {
         final Traversal<Vertex,Vertex> traversalMarko = get_g_VXv1X_hasXage_gt_30X(convertToVertexId("marko"));
         printTraversalForm(traversalMarko);

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/efc1739f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
index 6045c93..eb6300b 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
@@ -138,7 +138,6 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    @IgnoreEngine(TraversalEngine.Type.COMPUTER)
     public void g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXb_hasXname_markoXX()
{
         final Traversal<Vertex, Map<String, Object>> traversal = get_g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXb_hasXname_markoXX();
         printTraversalForm(traversal);
@@ -163,7 +162,6 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    @IgnoreEngine(TraversalEngine.Type.COMPUTER)
     public void g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXa_outXknowsX_bX()
{
         final Traversal<Vertex, Map<String, Object>> traversal = get_g_V_hasXageX_asXaX_out_in_hasXageX_asXbX_selectXa_bX_whereXa_outXknowsX_bX();
         printTraversalForm(traversal);
@@ -229,7 +227,6 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    @IgnoreEngine(TraversalEngine.Type.COMPUTER)
     public void g_withSideEffectXa_g_VX2XX_VX1X_out_whereXneqXaXX() {
         final Traversal<Vertex, Vertex> traversal = get_g_withSideEffectXa_graph_verticesX2XX_VX1X_out_whereXneqXaXX(convertToVertexId("marko"),
convertToVertexId("vadas"));
         printTraversalForm(traversal);

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/efc1739f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
index 97c1f9b..31ad3e8 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphTest.java
@@ -64,7 +64,6 @@ public abstract class GraphTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(GRATEFUL)
-    @IgnoreEngine(TraversalEngine.Type.COMPUTER)
     public void g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name()
{
         final Traversal<Vertex, String> traversal = get_g_V_hasXname_GarciaX_inXsungByX_asXsongX_V_hasXname_Willie_DixonX_inXwrittenByX_whereXeqXsongXX_name();
         printTraversalForm(traversal);
@@ -73,7 +72,6 @@ public abstract class GraphTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    @IgnoreEngine(TraversalEngine.Type.COMPUTER)
     @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
     public void g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX() {
         final Traversal<Vertex, Edge> traversal = get_g_V_hasLabelXpersonX_asXpX_VXsoftwareX_addInEXuses_pX();

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/efc1739f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MapValuesTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MapValuesTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MapValuesTest.java
index 5be1907..4e18fd6 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MapValuesTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MapValuesTest.java
@@ -62,7 +62,6 @@ public abstract class MapValuesTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    @Ignore // TODO
     public void g_V_outE_valuesXweightX_groupCount_mapValues_groupCount_mapValues() {
         final Traversal<Vertex, Long> traversal = get_g_V_outE_valuesXweightX_groupCount_mapValues_groupCount_mapValues();
         printTraversalForm(traversal);

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/efc1739f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
index 7975d83..80c3a74 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderTest.java
@@ -312,7 +312,6 @@ public abstract class OrderTest extends AbstractGremlinProcessTest {
     }
 
     @Test
-    @IgnoreEngine(TraversalEngine.Type.COMPUTER) // FOLD NEEDS TO BE SEEDED
     @LoadGraphWith(MODERN)
     public void g_V_hasLabelXpersonX_fold_orderXlocalX_byXageX() {
         final Traversal<Vertex, List<Vertex>> traversal = get_g_V_hasLabelXpersonX_fold_orderXlocalX_byXageX();

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/efc1739f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
index 788a530..34b6a43 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
@@ -21,16 +21,13 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map;
 import org.apache.tinkerpop.gremlin.LoadGraphWith;
 import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
 import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
-import org.apache.tinkerpop.gremlin.process.IgnoreEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.Order;
 import org.apache.tinkerpop.gremlin.process.traversal.Pop;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -45,11 +42,14 @@ import java.util.Set;
 
 import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.CREW;
 import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
-import static org.apache.tinkerpop.gremlin.structure.Column.keys;
-import static org.apache.tinkerpop.gremlin.structure.Column.values;
 import static org.apache.tinkerpop.gremlin.process.traversal.Scope.local;
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.as;
-import static org.junit.Assert.*;
+import static org.apache.tinkerpop.gremlin.structure.Column.keys;
+import static org.apache.tinkerpop.gremlin.structure.Column.values;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -280,7 +280,6 @@ public abstract class SelectTest extends AbstractGremlinProcessTest {
     }
 
     @Test
-    @IgnoreEngine(TraversalEngine.Type.COMPUTER)
     @LoadGraphWith(MODERN)
     public void g_V_hasLabelXpersonX_asXpX_mapXbothE_label_groupCountX_asXrX_selectXp_rX()
{
         final Traversal<Vertex, Map<String, Object>> traversal = get_g_V_hasLabelXpersonX_asXpX_mapXbothE_label_groupCountX_asXrX_selectXp_rX();
@@ -604,7 +603,6 @@ public abstract class SelectTest extends AbstractGremlinProcessTest {
     }
 
     @Test
-    @Ignore // TODO
     @LoadGraphWith(MODERN)
     public void g_V_outE_weight_groupCount_selectXvaluesX_unfold_groupCount_selectXvaluesX_unfold()
{
         final Traversal<Vertex, Long> traversal = get_g_V_outE_weight_groupCount_selectXvaluesX_unfold_groupCount_selectXvaluesX_unfold();

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/efc1739f/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupCountTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupCountTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupCountTest.java
index a8ccb19..69e5fa8 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupCountTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/GroupCountTest.java
@@ -22,6 +22,7 @@ import org.apache.tinkerpop.gremlin.LoadGraphWith;
 import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
 import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.structure.Column;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -30,8 +31,13 @@ import java.util.HashMap;
 import java.util.Map;
 
 import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
-import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.*;
-import static org.junit.Assert.*;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.bothE;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.in;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.out;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.repeat;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -60,6 +66,8 @@ public abstract class GroupCountTest extends AbstractGremlinProcessTest
{
 
     public abstract Traversal<Vertex, Map<Long, Long>> get_g_V_groupCount_byXbothE_countX();
 
+    public abstract Traversal<Vertex, Long> get_g_V_unionXoutXknowsX__outXcreatedX_inXcreatedXX_groupCount_selectXvaluesX_unfold_sum();
+
     @Test
     @LoadGraphWith(MODERN)
     public void g_V_outXcreatedX_groupCount_byXnameX() {
@@ -195,6 +203,15 @@ public abstract class GroupCountTest extends AbstractGremlinProcessTest
{
         }}, traversal.next());
     }
 
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_V_unionXoutXknowsX__outXcreatedX_inXcreatedXX_groupCount_selectXvaluesX_unfold_sum()
{
+        final Traversal<Vertex, Long> traversal = get_g_V_unionXoutXknowsX__outXcreatedX_inXcreatedXX_groupCount_selectXvaluesX_unfold_sum();
+        printTraversalForm(traversal);
+        assertEquals(12l, traversal.next().longValue());
+        assertFalse(traversal.hasNext());
+    }
+
     public static class Traversals extends GroupCountTest {
 
         @Override
@@ -248,5 +265,10 @@ public abstract class GroupCountTest extends AbstractGremlinProcessTest
{
         public Traversal<Vertex, Map<Long, Long>> get_g_V_groupCount_byXbothE_countX()
{
             return g.V().<Long>groupCount().by(bothE().count());
         }
+
+        @Override
+        public Traversal<Vertex, Long> get_g_V_unionXoutXknowsX__outXcreatedX_inXcreatedXX_groupCount_selectXvaluesX_unfold_sum()
{
+            return g.V().union(out("knows"), out("created").in("created")).groupCount().select(Column.values).unfold().sum();
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/efc1739f/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
index 2cc4030..37f2587 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphPlayTest.java
@@ -71,7 +71,7 @@ public class TinkerGraphPlayTest {
         GraphTraversalSource g = graph.traversal().withComputer(); //GraphTraversalSource.computer());
         //System.out.println(g.V().outE("knows").identity().inV().count().is(P.eq(5)).explain());
         //System.out.println(g.V().hasLabel("person").fold().order(Scope.local).by("age").toList());
-        final Traversal<?,?> traversal = g.V().outE().values("weight").groupCount().select(Column.values).unfold().groupCount().select(Column.values).unfold();
// unfold.select(values)
+        final Traversal<?,?> traversal = g.V().union(out("knows"), out("created").in("created")).groupCount().select(Column.values).unfold().sum();
// unfold.select(values)
 
         System.out.println(traversal.asAdmin().clone().toString());
         final Traversal<?,?> clone = traversal.asAdmin().clone();


Mime
View raw message