You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/11/11 00:27:28 UTC
[2/4] tinkerpop git commit: updated CHANGELOG and fixed a
MatchStep.clone() bug that exposes itself in OLAP traversals with OLTP
match() children.
updated CHANGELOG and fixed a MatchStep.clone() bug that exposes itself in OLAP traversals with OLTP match() children.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/56e113da
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/56e113da
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/56e113da
Branch: refs/heads/tp32
Commit: 56e113da4878eb4e082b8589d323cbfa4efd31ac
Parents: e6266b1
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Nov 8 11:56:30 2016 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Nov 8 11:56:30 2016 -0700
----------------------------------------------------------------------
CHANGELOG.asciidoc | 3 +++
.../process/traversal/step/map/MatchStep.java | 3 ++-
.../process/traversal/step/map/MatchTest.java | 16 ++--------------
3 files changed, 7 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/56e113da/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 43e4450..3c44f0f 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,9 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Fixed a OLAP `MatchStep.clone()`-bug that occurs when the `match()` is in a local child.
+* Fixed a bug in `RangeByIsCountStrategy` where labeled parents shouldn't have the strategy applied to their children.
+* Fixed a bug in `PathRetractionStrategy` where `MatchEndStep` labels were being dropped when they shouldn't be.
* Added `TinkerGraphCountStrategy` which translates `g.V().map*.count()` patterns into direct `Map.size()` calls in `TinkerGraph`.
* Added `Path.head()` and `Path.isEmpty()` with default method implementations.
* Improved ability to release resources in `GraphProvider` instances in the test suite.
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/56e113da/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
index d17a3ea..8a8237a 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
@@ -246,6 +246,7 @@ public final class MatchStep<S, E> extends ComputerAwareStep<S, Map<String, E>>
clone.matchTraversals.add(traversal.clone());
}
if (this.dedups != null) clone.dedups = new HashSet<>();
+ clone.standardAlgorithmBarrier = new TraverserSet();
return clone;
}
@@ -352,7 +353,7 @@ public final class MatchStep<S, E> extends ComputerAwareStep<S, Map<String, E>>
return this.referencedLabelsMap;
}
- private final TraverserSet standardAlgorithmBarrier = new TraverserSet();
+ private TraverserSet standardAlgorithmBarrier = new TraverserSet();
@Override
protected Iterator<Traverser.Admin<Map<String, E>>> standardAlgorithm() throws NoSuchElementException {
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/56e113da/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
index e83bd0e..b8bf1b6 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
@@ -18,7 +18,6 @@
*/
package org.apache.tinkerpop.gremlin.process.traversal.step.map;
-import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.tinkerpop.gremlin.LoadGraphWith;
import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
@@ -53,10 +52,8 @@ import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.or;
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.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.where;
-import static org.hamcrest.core.StringStartsWith.startsWith;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -304,7 +301,6 @@ public abstract class MatchTest extends AbstractGremlinProcessTest {
// TODO: this test requires Traversal.reverse()
@LoadGraphWith(MODERN)
- @Test
public void g_V_matchXa_knows_b__c_knows_bX() {
final Traversal<Vertex, Map<String, Vertex>> traversal = get_g_V_matchXa_knows_b__c_knows_bX();
try {
@@ -330,7 +326,6 @@ public abstract class MatchTest extends AbstractGremlinProcessTest {
}
// TODO: this test requires Traversal.reverse()
- @Test
@LoadGraphWith(MODERN)
public void g_V_matchXa_created_b__c_created_bX_selectXa_b_cX_byXnameX() throws Exception {
final Traversal<Vertex, Map<String, String>> traversal = get_g_V_matchXa_created_b__c_created_bX_selectXa_b_cX_byXnameX();
@@ -344,7 +339,6 @@ public abstract class MatchTest extends AbstractGremlinProcessTest {
}
}
- @Test
@LoadGraphWith(MODERN)
public void g_V_out_asXcX_matchXb_knows_a__c_created_eX_selectXcX() throws Exception {
final Traversal<Vertex, String> traversal = get_g_V_out_asXcX_matchXb_knows_a__c_created_eX_selectXcX();
@@ -556,7 +550,6 @@ public abstract class MatchTest extends AbstractGremlinProcessTest {
assertFalse(traversal.hasNext());
}
-
@Test
@LoadGraphWith(MODERN)
public void g_V_notXmatchXa_age_b__a_name_cX_whereXb_eqXcXX_selectXaXX_name() {
@@ -577,17 +570,12 @@ public abstract class MatchTest extends AbstractGremlinProcessTest {
@Before
public void setupTest() {
super.setupTest();
- g = graphProvider.traversal(graph, MatchAlgorithmStrategy.build().algorithm(MatchStep.GreedyMatchAlgorithm.class).create());
+ g = g.withStrategies(MatchAlgorithmStrategy.build().algorithm(MatchStep.GreedyMatchAlgorithm.class).create());
}
}
public static class CountMatchTraversals extends Traversals {
- // make sure default works -- i.e. CountMatchAlgorithm
- /*@Before
- public void setupTest() {
- super.setupTest();
- g = graphProvider.traversal(graph, MatchAlgorithmStrategy.build().algorithm(MatchStep.CountMatchAlgorithm.class).create());
- }*/
+
}
public abstract static class Traversals extends MatchTest {