[
https://issues.apache.org/jira/browse/TINKERPOP3-639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marko A. Rodriguez closed TINKERPOP3-639.
-----------------------------------------
Resolution: Won't Fix
Fix Version/s: 3.0.0.GA
Assignee: Marko A. Rodriguez
Given discussions, we will no longer do this.
> selectList
> ----------
>
> Key: TINKERPOP3-639
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-639
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: process
> Reporter: Matt Frantz
> Assignee: Marko A. Rodriguez
> Fix For: 3.0.0.GA
>
>
> The current behavior of {{select}} is to produce a List if there are multiple
> steps in the path with the same label. I would propose to add a new step
> {{selectList}} which always returns a list for each specified label (or a
> single list if there is a single label). This list would contain a single
> element if there is only one step with a label.
> {code}
> <E2> GraphTraversal<S, List<E2> selectList(final String stepLabel);
> <E2> GraphTraversal<S, Map<String, List<E2>> selectList(final String...
> stepLabels)
> {code}
> Furthermore, the existing {{select}} step would be changed so that it always
> returns the value from the most recently traversed step with the specified
> label(s). Its Java signature would not change, but it would no longer
> violate its contract, since it would not have a dynamic return type.
> The expected behavior of {{by}} when applied to {{selectList}} is that it
> would apply to the individual elements of the list.
> The expected behavior of {{where}} when applied to {{selectList}} is TBD.
> Perhaps it should be disallowed until it can be designed thoughtfully.
> Disabling it would be a more predictable behavior than today's {{select}}
> when it happens to return lists. In such a case, {{where}} is likely to
> fail. It is currently untested in that mode.
> The {{selectList}} step could have {{TraverserRequirement.PATH}}, using
> similar logic to the current {{SelectStep}} and {{SelectOneStep}}, although
> to be safe, it should always require {{PATH}}.
> The {{select}} step would be changed so that it never needs
> {{TraverserRequirement.PATH}}.
> This proposal makes the resolution of TINKERPOP3-618 more clear.
> The proposed steps would use the {{Path}} improvements associated with
> TINKERPOP3-549, specifically the {{getList}} and {{getLast}} API's. In fact,
> we may want to drop {{Path.get}} in favor of {{Path.getLast}} to mirror the
> {{select}}/{{selectList}} duality.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)