You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Matthias Broecheler (JIRA)" <ji...@apache.org> on 2015/04/10 19:50:12 UTC

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

Matthias Broecheler created TINKERPOP3-625:
----------------------------------------------

             Summary: 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
             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)