You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2020/05/08 17:16:25 UTC

[tinkerpop] 02/03: Merge branch '3.3-dev' into 3.4-dev

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

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 0fba9971d08da0141ecbc2c346a2dce2af88894c
Merge: 693953f 4cc4d8f
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Fri May 8 13:15:58 2020 -0400

    Merge branch '3.3-dev' into 3.4-dev

 CHANGELOG.asciidoc                                          |  4 +++-
 .../strategy/optimization/LazyBarrierStrategy.java          | 13 +++++++++----
 .../strategy/optimization/LazyBarrierStrategyTest.java      |  7 ++++++-
 .../gremlin/process/traversal/step/map/ProfileTest.java     | 10 +++++++++-
 4 files changed, 27 insertions(+), 7 deletions(-)

diff --cc gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/LazyBarrierStrategy.java
index 1e2257f,0f30e33..b942d8f
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/LazyBarrierStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/LazyBarrierStrategy.java
@@@ -75,14 -65,8 +75,12 @@@ public final class LazyBarrierStrategy 
  
      @Override
      public void apply(final Traversal.Admin<?, ?> traversal) {
 +        // drop() is a problem for bulked edge/meta properties because of Property equality changes in TINKERPOP-2318
 +        // which made it so that a Property is equal if the key/value is equal. as a result, they bulk together which
 +        // is fine for almost all cases except when you wish to drop the property.
          if (TraversalHelper.onGraphComputer(traversal) ||
-                 TraversalHelper.hasStepOfAssignableClass(DropStep.class, traversal) ||
 -                traversal.getTraverserRequirements().contains(TraverserRequirement.PATH))
 +                traversal.getTraverserRequirements().contains(TraverserRequirement.PATH) ||
-                 (IS_TESTING && ((TraversalHelper.hasStepOfAssignableClass(ProfileStep.class, TraversalHelper.getRootTraversal(traversal)) ||
-                         TraversalHelper.hasStepOfAssignableClass(ProfileSideEffectStep.class, TraversalHelper.getRootTraversal(traversal)))))) // necessary cause ProfileTest analyzes counts
++                TraversalHelper.hasStepOfAssignableClass(DropStep.class, traversal))
              return;
  
          boolean foundFlatMap = false;
diff --cc gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/LazyBarrierStrategyTest.java
index 100ba8b,760a0d0..77655dd
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/LazyBarrierStrategyTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/LazyBarrierStrategyTest.java
@@@ -101,13 -101,10 +101,18 @@@ public class LazyBarrierStrategyTest 
                  {__.out().as("a").out().as("b").in().where(P.neq("a")).out().select("b").out().out(), __.out().as("a").out().as("b").in().where(P.neq("a")).barrier(PATH_SIZE).out().select("b").barrier(PATH_SIZE).out().barrier(LAZY_SIZE).out(), Collections.singletonList(PathRetractionStrategy.instance())},
                  {__.V().out().out().groupCount().by(__.out().out().out()).out(), __.V().out().barrier(LAZY_SIZE).out().groupCount().by(__.out().out().barrier(LAZY_SIZE).out()).out(), Collections.emptyList()},
                  {__.V().out().out().groupCount().by(__.out().out().out()).out().as("a"), __.V().out().barrier(LAZY_SIZE).out().groupCount().by(__.out().out().barrier(LAZY_SIZE).out()).out().as("a"), Collections.emptyList()},
 +                {__.out().drop(), __.out().drop(), Collections.emptyList()},
 +                {__.out().properties().drop(), __.out().properties().drop(), Collections.emptyList()},
 +                {__.out().properties().properties().drop(), __.out().properties().properties().drop(), Collections.emptyList()},
 +                {__.out().out().properties().drop(), __.out().out().properties().drop(), Collections.emptyList()},
 +                {__.out().out().values().is(true), __.out().out().barrier(LAZY_SIZE).values().barrier(LAZY_SIZE).is(true), Collections.emptyList()},
 +                {__.outE().drop(), __.outE().drop(), Collections.emptyList()},
-                 {__.outE().properties().drop(), __.outE().properties().drop(), Collections.emptyList()}
++                {__.outE().properties().drop(), __.outE().properties().drop(), Collections.emptyList()},
++                {__.V().out().out().groupCount().by(__.out().out().out()).out().as("a"), __.V().out().barrier(LAZY_SIZE).out().groupCount().by(__.out().out().barrier(LAZY_SIZE).out()).out().as("a"), Collections.emptyList()},
+                 {__.V().both().profile(), __.V().both().profile(), Collections.emptyList() },
+                 {__.V().both().both().profile(), __.V().both().barrier(LAZY_SIZE).both().profile(), Collections.emptyList() },
+                 {__.V().both().local(__.both().both().out()).profile(), __.V().both().barrier(LAZY_SIZE).local(__.both().both().barrier(LAZY_SIZE).out()).profile(), Collections.emptyList() },
 -                {__.V().both().local(__.both().both().out()).in().profile(), __.V().both().barrier(LAZY_SIZE).local(__.both().both().barrier(LAZY_SIZE).out()).in().profile(), Collections.emptyList() },
++                {__.V().both().local(__.both().both().out()).in().profile(), __.V().both().barrier(LAZY_SIZE).local(__.both().both().barrier(LAZY_SIZE).out()).in().profile(), Collections.emptyList() }
          });
      }
  }