[
https://issues.apache.org/jira/browse/TINKERPOP-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15344218#comment-15344218
]
Marko A. Rodriguez commented on TINKERPOP-1345:
-----------------------------------------------
If DSEGraph chose {{Map}} as their id because of TinkerPop's {{GraphStep}} ?!,
this should have been brought up long ago as it would have been easy to do move
that unrolling behavior to {{processNextStart()}} instead of {{GraphStep}}
constructor. As a quick "easy" just wrap your list ID in a list! It doesn't do
a full flatten, just a single unroll. For 3.3.0, we might be able to simply
move the offending line:
{code}
this.ids = (ids.length == 1 && ids[0] instanceof Collection) ? ((Collection)
ids[0]).toArray(new Object[((Collection) ids[0]).size()]) : ids;
{code}
..and the {{iteratorSupplier}} to a protected method that would be called from
{{processNextStart()}} and thus, not part of the constructor and overridable by
extending classes.
> Unrolling of collection for ids
> -------------------------------
>
> Key: TINKERPOP-1345
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1345
> Project: TinkerPop
> Issue Type: Bug
> Reporter: Matthias Broecheler
>
> In GraphStep, TinkerPop does this:
> {code}
> this.ids = (ids.length == 1 && ids[0] instanceof Collection) ? ((Collection)
> ids[0]).toArray(new Object[((Collection) ids[0]).size()]) : ids;
> {code}
> which means that collections are automatically unrolled when there is only
> one element. This breaks TP implementations that use collections to represent
> ids, for instance, because their id representation has multiple components
> (like a primary key in an RDMBS).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)