[
https://issues.apache.org/jira/browse/TINKERPOP3-774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14632795#comment-14632795
]
Daniel Kuppitz edited comment on TINKERPOP3-774 at 7/19/15 2:43 PM:
--------------------------------------------------------------------
Regarding {{SampleGlobalStep}}: no, since {{.sample().filter()}} is not the
same as {{.filter().sample()}}. If the user wants that, then he has to be smart
enough to use the traversal steps explicitly in the correct order. Thus it's
all about {{order()}}.
In general I agree with the filter ranking. However, I think a few steps should
share the same rank (that means less reordering required), as there's no real
difference between them in terms of complexity.
*Rank 1:*
* {{isPredicate()}}
*Rank 2:*
* {{has(predicate)}}
* {{where(predicate)}}
*Rank 3:*
* {{simplePath()}}
* {{cyclicPath()}}
*Rank 4:*
* {{filter(traversal)}}
* -{{has(traversal)}}- doesn't exist
* {{where(traversal)}}
*Rank 5:*
* {{or(...)}}
*Rank 6:*
* {{and(...)}}
*Rank 7:*
* {{dedup()}}
*Rank 8:*
* {{order()}}
As mentioned before in a 1:1 discussion: I will fix the actual bug in the
{{tp30}} branch and do the refactoring ({{DedupBijectionStrategy}} ->
{{FilterRankingStrategy}}) in {{master}}.
was (Author: dkuppitz):
Regarding {{SampleGlobalStep}}: no, since {{.sample().filter()}} is not the
same as {{.filter().sample()}}. If the user wants that, then he has to be smart
enough to use the traversal steps explicitly in the correct order. Thus it's
all about {{order()}}.
I agree with the filter ranking, although I wonder if there's really a
difference between {{filter(traversal)}}, {{has(traversal)}} and
{{where(traversal)}}. I guess they should share the same rank (in practice this
would mean less reordering).
As mentioned before in a 1:1 discussion: I will fix the actual bug in the
{{tp30}} branch and do the refactoring ({{DedupBijectionStrategy}} ->
{{FilterRankingStrategy}}) in {{master}}.
> order / dedup issues
> --------------------
>
> Key: TINKERPOP3-774
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-774
> Project: TinkerPop 3
> Issue Type: Bug
> Components: process
> Affects Versions: 3.0.0-incubating
> Reporter: Daniel Kuppitz
> Assignee: Daniel Kuppitz
>
> Not sure if this is an {{order}}- or a {{dedup}}-issue (or maybe both), but
> these two steps don't play well together. The following sample were created
> using the GD graph.
> *{{dedup()}} w/o keys*
> {code}
> g.V().as("a").outE("followedBy").as("e").inV().as("b").
> select("e").order().by("weight", decr).limit(10).
> select("b").out("sungBy").dedup()
>
> ==>v[453]
> ==>v[347]
> ==>v[405]
> ==>v[342]
> ==>v[342]
> ==>v[340]
> ==>v[342]
> ==>v[351]
> ==>v[351]
> {code}
> *{{dedup()}} w/ keys*
> {code}
> g.V().as("a").outE().as("e").inV().as("b").
> select("e").order().by("weight", decr).limit(10).
> as("c").inV().as("d").dedup("c","d")
>
> Neither the sideEffects, map, nor path has a c-key: DedupGlobalStep([c, d])
> Display stack trace? [yN]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)