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

Marko A. Rodriguez closed TINKERPOP3-673.
-----------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0.GA
         Assignee: Marko A. Rodriguez

Fixed by [~mhfrantz]

> limit(local, 1) should emit element, not List
> ---------------------------------------------
>
>                 Key: TINKERPOP3-673
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-673
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: process
>            Reporter: Matt Frantz
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.0.0.GA
>
>
> The philosophy of the TP3 API is "containers only when necessary".  There is 
> a tendency to eschew the container when its size would be one.
> For example, {{select("foo")}} will not emit a {{Map}} with a single 
> key/value, but instead will emit a single value.  Similarly, if any 
> {{select}} of a step label finds only a single instance of that step in the 
> path, it will emit the value at that step; only if multiple steps in the path 
> have the same label will a {{List}} be created.
> In that spirit, {{limit(local, 1)}} should emit an element, rather than a 
> one-element {{List}}.
> This would also mean that {{range(local)}} operating on a {{List}} would emit 
> a single element if the number of elements is selected by the range is 1.
> This would also reconcile the behavior with the {{tail}} step.



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

Reply via email to