You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Ted Wilmes (JIRA)" <ji...@apache.org> on 2017/02/01 17:54:51 UTC

[jira] [Created] (TINKERPOP-1620) Choose with count branch traversal type coercion

Ted Wilmes created TINKERPOP-1620:
-------------------------------------

             Summary: Choose with count branch traversal type coercion
                 Key: TINKERPOP-1620
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1620
             Project: TinkerPop
          Issue Type: Bug
          Components: process
    Affects Versions: 3.2.3
            Reporter: Ted Wilmes
            Assignee: Ted Wilmes


A {{ChooseStep}} with a {{count}} branching traversal is currently sensitive to whether or not the {{option}} keys are {{long}} or {{int}}.  This results in the following behavior:

{code}
gremlin> g = TinkerFactory.createModern().traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g.V().choose(bothE().count()).option(1, constant(1)).option(3, constant(3))
gremlin> g.V().choose(bothE().count()).option(1l, constant(1)).option(3l, constant(3))
==>3
==>1
==>3
==>3
==>1
==>1
{code}

The branch traversal results if, numeric, should be evaluated against the options using {{NumberHelper}} so as to be consistent with other steps.



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