You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2015/04/28 20:10:05 UTC

[jira] [Closed] (TINKERPOP3-625) Atomic Comparators in traversal construction

     [ https://issues.apache.org/jira/browse/TINKERPOP3-625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marko A. Rodriguez closed TINKERPOP3-625.
-----------------------------------------
    Resolution: Fixed
      Assignee: Marko A. Rodriguez

{{Compare.inside}} and {{Compare.outside}} no longer exist. These are complex comparators built from more primitive comparators within {{Compare}}. {{IsStep}} and {{HasStep}} now take arrays of bi-predicates where {{P.inside(0,10)}} return {{P[]{P.gt(0),P.lt(10)}}}.

> Atomic Comparators in traversal construction
> --------------------------------------------
>
>                 Key: TINKERPOP3-625
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-625
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: process
>            Reporter: Matthias Broecheler
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.0.0.GA
>
>
> In composing the traversal it should be ensured that the resulting traversal is entirely normalized in the sense of there being one way to represent a particular traversal.
> As a case in point, there are two ways of defining an interval in Gremlin:
> {{has('age',inside,[20,30])}} and {{has('age',gte,20).has('age',lt,30)}}
> While the former is nice shortcut for the user, the latter is the atomic variant and any traversal should normalize into this form.
> This has the benefit that there are no two system behaviors for the same semantic traversal. For instance, as it currently stands, the "inside" variant gets optimized and the other does not.
> Moreover, it is a huge pain for vendors to implement the same logic for two different representations since it requires a) knowledge of alternative representations and b) duplicating code.
> Hence, whenever a shortcut or other syntactic sugar is introduced it should be ensured that those map to the atomic counterparts.
> The example above is the one I stumbled upon. It should be analyzed whether this is applicable elsewhere.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)