[jira] [Commented] (TINKERPOP-2481) IdentityRemovalStrategy not installed

2021-01-22 Thread ASF GitHub Bot (Jira)


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

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

spmallette merged pull request #1378:
URL: https://github.com/apache/tinkerpop/pull/1378


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IdentityRemovalStrategy not installed
> -
>
> Key: TINKERPOP-2481
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2481
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.8
>Reporter: Stephen Mallette
>Priority: Minor
>  Labels: breaking
>
> I'm not sure why but {{IdentityRemovalStrategy}} is not in play and almost 
> looks like it never has been, yet I fairly certain we've gone about life 
> thinking it was one of our standard strategies. Perhaps this issue title will 
> shift once this is given more thought but I came to [notice this 
> issue|https://groups.google.com/g/gremlin-users/c/HVtldzV0Xk8/m/saCBYsEQBgAJ] 
> with this example:
> {code}
> gremlin> g.V().match(__.as("a").out("knows").as("b")).identity()
> ==>[]
> ==>[]
> gremlin> 
> g.withStrategies(IdentityRemovalStrategy.instance()).V().match(__.as("a").out("knows").as("b")).identity()
> ==>[a:v[1],b:v[2]]
> ==>[a:v[1],b:v[4]]
> {code}
> So if the strategy had been in play, {{PathRetractionStrategy}} wouldn't have 
> trimmed the history. Or, perhaps {{PathRetractionStrategy}} should have been 
> smarter



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2481) IdentityRemovalStrategy not installed

2021-01-07 Thread ASF GitHub Bot (Jira)


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

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

bechbd commented on pull request #1378:
URL: https://github.com/apache/tinkerpop/pull/1378#issuecomment-756476302


   +1
   
   I took a look at this and I think that change makes a lot of sense from a 
usability perspective.  Honestly, I didn't know that was how `match` worked and 
would have been confused



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IdentityRemovalStrategy not installed
> -
>
> Key: TINKERPOP-2481
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2481
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.8
>Reporter: Stephen Mallette
>Priority: Minor
>  Labels: breaking
>
> I'm not sure why but {{IdentityRemovalStrategy}} is not in play and almost 
> looks like it never has been, yet I fairly certain we've gone about life 
> thinking it was one of our standard strategies. Perhaps this issue title will 
> shift once this is given more thought but I came to [notice this 
> issue|https://groups.google.com/g/gremlin-users/c/HVtldzV0Xk8/m/saCBYsEQBgAJ] 
> with this example:
> {code}
> gremlin> g.V().match(__.as("a").out("knows").as("b")).identity()
> ==>[]
> ==>[]
> gremlin> 
> g.withStrategies(IdentityRemovalStrategy.instance()).V().match(__.as("a").out("knows").as("b")).identity()
> ==>[a:v[1],b:v[2]]
> ==>[a:v[1],b:v[4]]
> {code}
> So if the strategy had been in play, {{PathRetractionStrategy}} wouldn't have 
> trimmed the history. Or, perhaps {{PathRetractionStrategy}} should have been 
> smarter



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2481) IdentityRemovalStrategy not installed

2021-01-07 Thread ASF GitHub Bot (Jira)


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

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

spmallette opened a new pull request #1378:
URL: https://github.com/apache/tinkerpop/pull/1378


   https://issues.apache.org/jira/browse/TINKERPOP-2481
   https://issues.apache.org/jira/browse/TINKERPOP-2499
   
   Before:
   
   ```text
   gremlin> g.V().match(__.as("a").out("knows").as("b"))
   ==>[a:v[1],b:v[2]]
   ==>[a:v[1],b:v[4]]
   gremlin> g.V().match(__.as("a").out("knows").as("b")).unfold()
   gremlin> g.V().match(__.as("a").out("knows").as("b")).identity()
   ==>[]
   ==>[]
   ```
   
   After:
   
   ```text
   gremlin> g.V().match(__.as("a").out("knows").as("b"))
   ==>[a:v[1],b:v[2]]
   ==>[a:v[1],b:v[4]]
   gremlin> g.V().match(__.as("a").out("knows").as("b")).identity()
   ==>[a:v[1],b:v[2]]
   ==>[a:v[1],b:v[4]]
   gremlin> g.V().match(__.as("a").out("knows").as("b")).unfold()
   ==>a=v[1]
   ==>b=v[2]
   ==>a=v[1]
   ==>b=v[4]
   ```
   
   This change goes for consistency of output over optimization avoiding a 
situation where the addition of a step alters its behavior in some unexpected 
way. This is effectively a breaking change as it modifies the output of 
traversal output.
   
   All tests pass with `docker/build.sh -t -n -i`
   
   VOTE +1



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> IdentityRemovalStrategy not installed
> -
>
> Key: TINKERPOP-2481
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2481
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.8
>Reporter: Stephen Mallette
>Priority: Minor
>
> I'm not sure why but {{IdentityRemovalStrategy}} is not in play and almost 
> looks like it never has been, yet I fairly certain we've gone about life 
> thinking it was one of our standard strategies. Perhaps this issue title will 
> shift once this is given more thought but I came to [notice this 
> issue|https://groups.google.com/g/gremlin-users/c/HVtldzV0Xk8/m/saCBYsEQBgAJ] 
> with this example:
> {code}
> gremlin> g.V().match(__.as("a").out("knows").as("b")).identity()
> ==>[]
> ==>[]
> gremlin> 
> g.withStrategies(IdentityRemovalStrategy.instance()).V().match(__.as("a").out("knows").as("b")).identity()
> ==>[a:v[1],b:v[2]]
> ==>[a:v[1],b:v[4]]
> {code}
> So if the strategy had been in play, {{PathRetractionStrategy}} wouldn't have 
> trimmed the history. Or, perhaps {{PathRetractionStrategy}} should have been 
> smarter



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2481) IdentityRemovalStrategy not installed

2020-12-31 Thread Stephen Mallette (Jira)


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

Stephen Mallette commented on TINKERPOP-2481:
-

As an additional note on this issue, I think that chained {{identity()}} do 
tend to happen but it's usually not as a result of users writing Gremlin in the 
Console. It typically happens in generated Gremlin which a lot of users seem to 
do, not to mention Object Graph Mappers. 

> IdentityRemovalStrategy not installed
> -
>
> Key: TINKERPOP-2481
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2481
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.8
>Reporter: Stephen Mallette
>Priority: Minor
>
> I'm not sure why but {{IdentityRemovalStrategy}} is not in play and almost 
> looks like it never has been, yet I fairly certain we've gone about life 
> thinking it was one of our standard strategies. Perhaps this issue title will 
> shift once this is given more thought but I came to [notice this 
> issue|https://groups.google.com/g/gremlin-users/c/HVtldzV0Xk8/m/saCBYsEQBgAJ] 
> with this example:
> {code}
> gremlin> g.V().match(__.as("a").out("knows").as("b")).identity()
> ==>[]
> ==>[]
> gremlin> 
> g.withStrategies(IdentityRemovalStrategy.instance()).V().match(__.as("a").out("knows").as("b")).identity()
> ==>[a:v[1],b:v[2]]
> ==>[a:v[1],b:v[4]]
> {code}
> So if the strategy had been in play, {{PathRetractionStrategy}} wouldn't have 
> trimmed the history. Or, perhaps {{PathRetractionStrategy}} should have been 
> smarter



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-2481) IdentityRemovalStrategy not installed

2020-12-31 Thread Stephen Mallette (Jira)


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

Stephen Mallette commented on TINKERPOP-2481:
-

After some research, I came across some old discussion on this strategy here: 
TINKERPOP-1412 - I think Marko's final comment on that make sense to me. This 
strategy was never about performance of chained {{identity()}} steps but more 
about removing an {{identity()}} which might have normalized the Gremlin enough 
for another strategy to do its work properly. On the other hand this issue is 
also as much an issue with {{PathRetractionStrategy}}:

{code}
gremlin> 
g.withoutStrategies(PathRetractionStrategy).V().match(__.as("a").out("knows").as("b")).identity()
==>[a:v[1],b:v[2]]
==>[a:v[1],b:v[4]]
{code}

We really shouldn't have situations where "correctness" or "consistency" of 
results is upset by a strategy and shouldn't use one strategy (in this case 
{{IdentityRemovalStrategy}}) to ensure a particular result based on another. So 
ultimately, I think the fix here is to {{PathRetractionStrategy}} and to 
install {{IdentityRemovalStrategy}}. Created TINKERPOP-2499 for the former. 

> IdentityRemovalStrategy not installed
> -
>
> Key: TINKERPOP-2481
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2481
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: process
>Affects Versions: 3.4.8
>Reporter: Stephen Mallette
>Priority: Minor
>
> I'm not sure why but {{IdentityRemovalStrategy}} is not in play and almost 
> looks like it never has been, yet I fairly certain we've gone about life 
> thinking it was one of our standard strategies. Perhaps this issue title will 
> shift once this is given more thought but I came to [notice this 
> issue|https://groups.google.com/g/gremlin-users/c/HVtldzV0Xk8/m/saCBYsEQBgAJ] 
> with this example:
> {code}
> gremlin> g.V().match(__.as("a").out("knows").as("b")).identity()
> ==>[]
> ==>[]
> gremlin> 
> g.withStrategies(IdentityRemovalStrategy.instance()).V().match(__.as("a").out("knows").as("b")).identity()
> ==>[a:v[1],b:v[2]]
> ==>[a:v[1],b:v[4]]
> {code}
> So if the strategy had been in play, {{PathRetractionStrategy}} wouldn't have 
> trimmed the history. Or, perhaps {{PathRetractionStrategy}} should have been 
> smarter



--
This message was sent by Atlassian Jira
(v8.3.4#803005)