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 2019/01/08 22:04:04 UTC

[tinkerpop] branch TINKERPOP-2124 updated (eb87f727 -> e21f31d)

This is an automated email from the ASF dual-hosted git repository.

dkuppitz pushed a change to branch TINKERPOP-2124
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


 discard eb87f727 TINKERPOP-2124 Fixed and/or folding in `InlineFilterStrategy`.
     add 277194c  TinkerPop 3.2.11 release
     add 437b0f6  Fixed 2018 nonsense for release date CTR
     add b75a703  fixed link - CTR
     add 28b6322  Override the apache-release profile
     add dfc88b4  CTR: create .glv files before building project in validation script
     add a21001a  Add .glv to gremlin-javascript for docker builds CTR
     add 82f0590  Remove latest tag from tp33 TINKERPOP-1980 CTR
     add 60fd135  Bump to 3.3.6-SNAPSHOT
     new e21f31d  TINKERPOP-2124 Fixed and/or folding in `InlineFilterStrategy`.

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   (eb87f727)
            \
             N -- N -- N   refs/heads/TINKERPOP-2124 (e21f31d)

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 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                                 |  45 ++++++++-
 bin/validate-distribution.sh                       |   1 +
 docker/scripts/build.sh                            |   4 +-
 docs/src/upgrade/release-3.3.x.asciidoc            |   8 +-
 giraph-gremlin/pom.xml                             |   2 +-
 gremlin-archetype/gremlin-archetype-dsl/pom.xml    |   2 +-
 gremlin-archetype/gremlin-archetype-server/pom.xml |   2 +-
 .../gremlin-archetype-tinkergraph/pom.xml          |   2 +-
 gremlin-archetype/pom.xml                          |   2 +-
 gremlin-console/bin/gremlin.sh                     |   2 +-
 gremlin-console/pom.xml                            |  23 +----
 gremlin-core/pom.xml                               |   2 +-
 gremlin-dotnet/pom.xml                             |   2 +-
 .../Gremlin.Net.Template.csproj                    |   2 +-
 .../Gremlin.Net.Template.nuspec                    |   2 +-
 gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj  |   4 +-
 gremlin-dotnet/src/pom.xml                         |   2 +-
 gremlin-dotnet/test/pom.xml                        |   2 +-
 gremlin-driver/pom.xml                             |   2 +-
 gremlin-groovy/pom.xml                             |   2 +-
 gremlin-javascript/pom.xml                         |   2 +-
 .../javascript/gremlin-javascript/package.json     |   2 +-
 gremlin-python/pom.xml                             |   2 +-
 gremlin-server/pom.xml                             |  23 +----
 gremlin-shaded/pom.xml                             |   2 +-
 gremlin-test/pom.xml                               |   2 +-
 gremlin-tools/gremlin-benchmark/pom.xml            |   2 +-
 gremlin-tools/gremlin-coverage/pom.xml             |   2 +-
 gremlin-tools/gremlin-io-test/pom.xml              |   2 +-
 gremlin-tools/pom.xml                              |   2 +-
 hadoop-gremlin/pom.xml                             |   2 +-
 neo4j-gremlin/pom.xml                              |   2 +-
 pom.xml                                            |  57 +++++++++++-
 source-release.xml                                 | 101 +++++++++++++++++++++
 spark-gremlin/pom.xml                              |   2 +-
 tinkergraph-gremlin/pom.xml                        |   2 +-
 36 files changed, 241 insertions(+), 79 deletions(-)
 create mode 100644 source-release.xml


[tinkerpop] 01/01: TINKERPOP-2124 Fixed and/or folding in `InlineFilterStrategy`.

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dkuppitz pushed a commit to branch TINKERPOP-2124
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit e21f31dc894db69c5575d23187ad7fcac76687dc
Author: Daniel Kuppitz <da...@hotmail.com>
AuthorDate: Wed Jan 2 15:01:31 2019 -0700

    TINKERPOP-2124 Fixed and/or folding in `InlineFilterStrategy`.
---
 CHANGELOG.asciidoc                                                | 3 ++-
 .../traversal/strategy/optimization/InlineFilterStrategy.java     | 8 ++++++--
 .../traversal/strategy/optimization/InlineFilterStrategyTest.java | 1 +
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 7f41374..7ce26c1 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,13 +23,14 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-3-6]]
 === TinkerPop 3.3.6 (Release Date: NOT OFFICIALLY RELEASED YET)
 
-
+* Fixed a bug in `InlineFilterStrategy` that mixed up and's and or's when folding merging conditions together.
 
 [[release-3-3-5]]
 === TinkerPop 3.3.5 (Release Date: January 2, 2019)
 
 This release also includes changes from <<release-3-2-11, 3.2.11>>.
 
+* Fixed and/or folding in `InlineFilterStrategy`.
 * Fixed configuration and serialization of `SubgraphStrategy` which was missing the `checkAdjacentVertices` flag.
 * Captured `TraversalInterruptionException` and converted to `TimeoutException` for `GremlinExecutor`.
 * Fixed a bug in `CoalesceStep` which squared the bulk if the step followed a `Barrier` step.
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategy.java
index 17d1032..e2f154e 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategy.java
@@ -195,6 +195,7 @@ public final class InlineFilterStrategy extends AbstractTraversalStrategy<Traver
             InlineFilterStrategy.instance().apply(childTraversal); // todo: this may be a bad idea, but I can't seem to find a test case to break it
             for (final Step<?, ?> childStep : childTraversal.getSteps()) {
                 if (childStep instanceof HasStep) {
+                    P p = null;
                     for (final HasContainer hasContainer : ((HasStep<?>) childStep).getHasContainers()) {
                         if (null == key)
                             key = hasContainer.getKey();
@@ -202,9 +203,12 @@ public final class InlineFilterStrategy extends AbstractTraversalStrategy<Traver
                             process = false;
                             break;
                         }
-                        predicate = null == predicate ?
+                        p = null == p ?
                                 hasContainer.getPredicate() :
-                                predicate.or(hasContainer.getPredicate());
+                                p.and(hasContainer.getPredicate());
+                    }
+                    if (process) {
+                        predicate = null == predicate ? p : predicate.or(p);
                     }
                     labels.addAll(childStep.getLabels());
                 } else {
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategyTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategyTest.java
index 924182b..6fffef0 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategyTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategyTest.java
@@ -95,6 +95,7 @@ public class InlineFilterStrategyTest {
                 {or(has("name", "marko"), filter(has("name", "bob"))), has("name", eq("marko").or(eq("bob")))},
                 {or(has("name", "marko"), filter(or(filter(has("name", "bob")), has("name", "stephen")))), has("name", eq("marko").or(eq("bob").or(eq("stephen"))))},
                 {or(has("name", "marko").as("a"), filter(or(filter(has("name", "bob")).as("b"), has("name", "stephen").as("c")))), has("name", eq("marko").or(eq("bob").or(eq("stephen")))).as("a", "b", "c")},
+                {or(and(has("age",gt(20)), has("age",lt(30))), and(has("age",gt(35)), has("age",lt(40)))), has("age", gt(20).and(lt(30)).or(gt(35).and(lt(40))))},
                 //
                 {and(has("age", gt(10)), filter(has("age", 22))), addHas(__.start(), "age", gt(10), "age", eq(22))},
                 {and(has("age", gt(10)).as("a"), filter(has("age", 22).as("b")).as("c")).as("d"), addHas(__.start(), "age", gt(10), "age", eq(22)).as("a", "b", "c", "d")},