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/10 14:51:08 UTC

[tinkerpop] branch TINKERPOP-2124-master updated (95dbdca -> d042421)

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

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


    omit 95dbdca  Merge branch 'TINKERPOP-2124' into TINKERPOP-2124-master
    omit e21f31d  TINKERPOP-2124 Fixed and/or folding in `InlineFilterStrategy`.
     add 71a58ce  Added link to .NET docs on compendium page CTR
     add 12381ae  Minor grammatical fix in error message CTR
     add dc92a3c  Added js/.net api docs to the vote thread email template CTR
     add 3f02660  Added Gremlin.Net.Template to the nuget links to check during release CTR
     add 6588e10  Fix minor grammatical error in release docs CTR
     add c806510  Replaced deprecated <tasks> tag in antrun plugins CTR
     add 4d73ce4  Merge branch 'tp33'
     add c0779e2  Massively cut down log output with new radish feature CTR
     add 4b5837e  Merge branch 'tp33'
     add fa0afb5  Fixed warnings related to nuget around the license CTR
     add b49078f  Merge branch 'tp33'
     add 8c70d17  Added link to verify downloads and updated sha1 to sha512 CTR
     add 02a7af3  Mask security secret or password
     add db0fd41  Merge branch 'tp33'
     add fec33a2  Fix table rendering in Sparql reference docs.
     add 872f597  Merge pull request #1037 from newkek/docs-fix
     add c8d5a54  Added anti-pattern logo CTR
     add 6314fbe  Added anti-pattern logo to recipe docs CTR
     add 42bdff0  TINKERPOP-2126 Made `TraverserSet` internals thread-safe
     add 93cd399  Merge branch 'TINKERPOP-2126' into tp33
     add a8cccad  Merge branch 'tp33'
     new d042421  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   (95dbdca)
            \
             N -- N -- N   refs/heads/TINKERPOP-2124-master (d042421)

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                                 |   2 ++
 docs/preprocessor/preprocess.sh                    |   2 +-
 docs/site/home/downloads.html                      |   6 ++++--
 docs/src/dev/developer/release.asciidoc            |  11 ++++++++---
 docs/src/index.asciidoc                            |   5 +++--
 docs/src/recipes/index.asciidoc                    |   2 ++
 docs/src/reference/compilers.asciidoc              |   2 +-
 docs/static/images/gremlin-anti-gremlin.png        | Bin 0 -> 41066 bytes
 gremlin-console/pom.xml                            |   4 ++--
 .../traversal/traverser/util/TraverserSet.java     |   2 +-
 .../io/gryo/kryoshim/KryoShimServiceLoader.java    |  21 ++++++++++++++++++---
 .../glv/Gremlin.Net.Template.nuspec.template       |   2 +-
 gremlin-dotnet/glv/Gremlin.Net.csproj.template     |   2 +-
 .../Gremlin.Net.Template.nuspec                    |   2 +-
 gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj  |   2 +-
 gremlin-dotnet/src/pom.xml                         |   8 ++++----
 gremlin-python/pom.xml                             |  12 ++++++------
 pom.xml                                            |   5 +++++
 18 files changed, 61 insertions(+), 29 deletions(-)
 create mode 100644 docs/static/images/gremlin-anti-gremlin.png


[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-master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit d0424217f3ce9e04d9ef2c4a5db9b83b8a132f28
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                                                | 2 ++
 .../traversal/strategy/optimization/InlineFilterStrategy.java     | 8 ++++++--
 .../traversal/strategy/optimization/InlineFilterStrategyTest.java | 1 +
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 52af532..1c88119 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -278,12 +278,14 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 * Masked sensitive configuration options in the logs of `KryoShimServiceLoader`.
 * Fixed a concurrency issue in `TraverserSet`
+* 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 512f6e5..cf54f50 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
@@ -107,6 +107,7 @@ public class InlineFilterStrategyTest {
                 {or(has("name", "marko"), filter(has("name", "bob"))), has("name", eq("marko").or(eq("bob"))), Collections.emptyList()},
                 {or(has("name", "marko"), filter(or(filter(has("name", "bob")), has("name", "stephen")))), has("name", eq("marko").or(eq("bob").or(eq("stephen")))), Collections.emptyList()},
                 {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"), Collections.emptyList()},
+                {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)))), Collections.emptyList()},
                 //
                 {has("name", "marko").and().has("name", "marko").and().has("name", "marko"), has("name", "marko").has("name", "marko").has("name", "marko"), Collections.emptyList()},
                 {filter(has("name", "marko")).and().filter(has("name", "marko")).and().filter(has("name", "marko")), has("name", "marko").has("name", "marko").has("name", "marko"), Collections.emptyList()},