[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15941147#comment-15941147
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user twilmes closed the pull request at:

https://github.com/apache/tinkerpop/pull/572


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.4
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15941148#comment-15941148
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user twilmes commented on the issue:

https://github.com/apache/tinkerpop/pull/572
  
Merged into tp32 and closed


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.4
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-24 Thread Ted Wilmes (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15940784#comment-15940784
 ] 

Ted Wilmes commented on TINKERPOP-1652:
---

Thanks for the test, I was thinking this wouldn't fix that.  That'll be next on 
the list.

> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.4
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15940628#comment-15940628
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/572
  
Ok, just tested, the TODO is still valid.


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.4
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15940485#comment-15940485
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/572
  
Sorry, I currently have integration tests running on another branch and 
thus can't test it, but the changes in this PR also fixed this `TODO`: 
https://github.com/apache/tinkerpop/blob/TINKERPOP-1652/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/ComplexTest.java#L263
Right?


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.4
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15940466#comment-15940466
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/572
  
VOTE +1


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.4
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15938248#comment-15938248
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/572
  
`docker/build.sh -t -i` succeeded.

VOTE: +1


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.4
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15938210#comment-15938210
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user twilmes commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/572#discussion_r107657353
  
--- Diff: CHANGELOG.asciidoc ---
@@ -26,6 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* Updated PathRetractionStrategy to not run if the provided traversal 
contains a VertexProgramStep that has a LABELED_PATH requirement.
--- End diff --

Good catch, fixed.


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.4
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15938166#comment-15938166
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/572#discussion_r107650323
  
--- Diff: CHANGELOG.asciidoc ---
@@ -26,6 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* Updated PathRetractionStrategy to not run if the provided traversal 
contains a VertexProgramStep that has a LABELED_PATH requirement.
--- End diff --

Minor formatting thing - just need to add backticks to 
`PathRetractionStrategy` and `VertexProgramStep`


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>  Components: process
>Affects Versions: 3.2.4
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15929950#comment-15929950
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user twilmes commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/572#discussion_r106646659
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
 ---
@@ -72,7 +73,11 @@ public static PathRetractionStrategy instance() {
 public void apply(final Traversal.Admin traversal) {
 // do not apply this strategy if there are lambdas as you can't 
introspect to know what path information the lambdas are using
 // do not apply this strategy if a PATH requirement step is being 
used (in the future, we can do PATH requirement lookhead to be more intelligent 
about its usage)
-if (TraversalHelper.anyStepRecursively(step -> step instanceof 
LambdaHolder || step.getRequirements().contains(TraverserRequirement.PATH), 
TraversalHelper.getRootTraversal(traversal)))
+// do not apply this strategy if a VertexProgramStep is present 
with LABELLED_PATH requirements
--- End diff --

Fixed


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15929103#comment-15929103
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user dkuppitz commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/572#discussion_r106551449
  
--- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategy.java
 ---
@@ -72,7 +73,11 @@ public static PathRetractionStrategy instance() {
 public void apply(final Traversal.Admin traversal) {
 // do not apply this strategy if there are lambdas as you can't 
introspect to know what path information the lambdas are using
 // do not apply this strategy if a PATH requirement step is being 
used (in the future, we can do PATH requirement lookhead to be more intelligent 
about its usage)
-if (TraversalHelper.anyStepRecursively(step -> step instanceof 
LambdaHolder || step.getRequirements().contains(TraverserRequirement.PATH), 
TraversalHelper.getRootTraversal(traversal)))
+// do not apply this strategy if a VertexProgramStep is present 
with LABELLED_PATH requirements
--- End diff --

`LABELED_PATH`


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15928779#comment-15928779
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/572#discussion_r106519004
  
--- Diff: 
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java
 ---
@@ -191,6 +200,58 @@ public void doTest() {
 {__.V().as("a").optional(bothE().dedup().as("b")).
 choose(select("b"), select("a","b"), 
project("a").by(select("a"))),
 "[[[a, b]], [[a, b]], [[a, b]], [[[a, b]]], [[a, 
b]]]", null},
+{__.V().as("a").out().select("a").program(new 
MockVertexProgram(
+new 
HashSet<>(Arrays.asList(TraverserRequirement.LABELED_PATH, "[]", null}
 });
 }
-}
+
+// do nothing mock vertex program for traverser requirement testing
+private static class MockVertexProgram implements VertexProgram 
{
--- End diff --

thanks - unless the concrete mock ends up being generally useful to lots of 
tests or the mockito mock is insanely complicated to the point where no one 
will understand it, i tend to prefer mockito mocks.


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15928773#comment-15928773
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user twilmes commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/572#discussion_r106518558
  
--- Diff: 
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java
 ---
@@ -191,6 +200,58 @@ public void doTest() {
 {__.V().as("a").optional(bothE().dedup().as("b")).
 choose(select("b"), select("a","b"), 
project("a").by(select("a"))),
 "[[[a, b]], [[a, b]], [[a, b]], [[[a, b]]], [[a, 
b]]]", null},
+{__.V().as("a").out().select("a").program(new 
MockVertexProgram(
+new 
HashSet<>(Arrays.asList(TraverserRequirement.LABELED_PATH, "[]", null}
 });
 }
-}
+
+// do nothing mock vertex program for traverser requirement testing
+private static class MockVertexProgram implements VertexProgram 
{
--- End diff --

Yes, I'll do that.  I saw some use of mockito but wasn't sure if it was the 
preferred method.  I'll make that update. 


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15928740#comment-15928740
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/572#discussion_r106516160
  
--- Diff: 
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java
 ---
@@ -191,6 +200,58 @@ public void doTest() {
 {__.V().as("a").optional(bothE().dedup().as("b")).
 choose(select("b"), select("a","b"), 
project("a").by(select("a"))),
 "[[[a, b]], [[a, b]], [[a, b]], [[[a, b]]], [[a, 
b]]]", null},
+{__.V().as("a").out().select("a").program(new 
MockVertexProgram(
+new 
HashSet<>(Arrays.asList(TraverserRequirement.LABELED_PATH, "[]", null}
 });
 }
-}
+
+// do nothing mock vertex program for traverser requirement testing
+private static class MockVertexProgram implements VertexProgram 
{
--- End diff --

can't this be replaced with a mockito mock? 

```java
VertexProgram mock = mock(MockVertexProgram.class);
when(mock.getTraverserRequirements()).
  thenReturn(new 
HashSet<>(Arrays.asList(TraverserRequirement.LABELED_PATH
```


> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (TINKERPOP-1652) Disable PathRetractionStrategy strategy if VertexProgramStep has LABELLED_PATH requirement

2017-03-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15928168#comment-15928168
 ] 

ASF GitHub Bot commented on TINKERPOP-1652:
---

GitHub user twilmes opened a pull request:

https://github.com/apache/tinkerpop/pull/572

TINKERPOP-1652 Disable PathRetractionStrategy strategy if VertexProgamStep 
has LABELLED_PATH requirement

This PR updates `PathRetractionStrategy` to not run if the provided 
traversal has `VertexProgramStep` with a `LABELED_PATH` requirement.  I created 
a custom mock VertexProgram to test this out.  I saw a few uses of Mockito 
throughout the codebase but seem to remember that not being the preferred 
approach but if that is preferable, I can update to use it.

```
[INFO] 

[INFO] Reactor Summary:
[INFO] 
[INFO] Apache TinkerPop ... SUCCESS [  
3.083 s]
[INFO] Apache TinkerPop :: Gremlin Shaded . SUCCESS [  
2.043 s]
[INFO] Apache TinkerPop :: Gremlin Core ... SUCCESS [ 
57.388 s]
[INFO] Apache TinkerPop :: Gremlin Test ... SUCCESS [  
8.661 s]
[INFO] Apache TinkerPop :: Gremlin Groovy . SUCCESS [ 
53.662 s]
[INFO] Apache TinkerPop :: Gremlin Groovy Test  SUCCESS [  
4.362 s]
[INFO] Apache TinkerPop :: TinkerGraph Gremlin  SUCCESS [02:06 
min]
[INFO] Apache TinkerPop :: Gremlin Benchmark .. SUCCESS [  
3.511 s]
[INFO] Apache TinkerPop :: Gremlin Driver . SUCCESS [  
9.088 s]
[INFO] Apache TinkerPop :: Neo4j Gremlin .. SUCCESS [  
2.324 s]
[INFO] Apache TinkerPop :: Gremlin Server . SUCCESS [ 
42.555 s]
[INFO] Apache TinkerPop :: Gremlin Python . SUCCESS [  
7.699 s]
[INFO] Apache TinkerPop :: Hadoop Gremlin . SUCCESS [02:50 
min]
[INFO] Apache TinkerPop :: Spark Gremlin .. SUCCESS [01:03 
min]
[INFO] Apache TinkerPop :: Giraph Gremlin . SUCCESS [  
4.378 s]
[INFO] Apache TinkerPop :: Gremlin Console  SUCCESS [ 
16.988 s]
[INFO] Apache TinkerPop :: Gremlin Archetype .. SUCCESS [  
0.044 s]
[INFO] Apache TinkerPop :: Archetype - TinkerGraph  SUCCESS [  
4.036 s]
[INFO] Apache TinkerPop :: Archetype - Server . SUCCESS [  
9.915 s]
[INFO] 

[INFO] BUILD SUCCESS
[INFO] 

[INFO] Total time: 09:50 min
[INFO] Finished at: 2017-03-16T09:18:16-05:00
[INFO] Final Memory: 219M/3705M
[INFO] 

```

VOTE: +1

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/tinkerpop TINKERPOP-1652

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tinkerpop/pull/572.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #572


commit a5e3c4f33642043d2f7c7a473cd4024c956d6f28
Author: Ted Wilmes 
Date:   2017-03-16T14:23:29Z

TINKERPOP-1652 Disable PathRetractionStrategy strategy if VertexProgramStep 
has LABELLED_PATH requirement

If traversal has a VertexProgramStep with a LABELED_PATH, 
PathRetractionStrategy is not run.




> Disable PathRetractionStrategy strategy if VertexProgramStep has 
> LABELLED_PATH requirement
> --
>
> Key: TINKERPOP-1652
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1652
> Project: TinkerPop
>  Issue Type: Bug
>Reporter: Ted Wilmes
>Assignee: Ted Wilmes
>
> [~dkuppitz] notified me that there is an issue where 
> {{PathRetractionStrategy}} is incorrectly dropping path elements when a 
> {{VertexProgramStep}} is present that has a {{LABELLED_PATH}} requirement.  
> We already handle the case where path is required but this issue will also 
> disable the strategy if a vertex program is present that requires 
> {{LABELLED_PATH}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)