[
https://issues.apache.org/jira/browse/TINKERPOP-2507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephen Mallette reassigned TINKERPOP-2507:
-------------------------------------------
Component/s: structure
Assignee: Stephen Mallette
Labels: breaking (was: )
This appears to be a bigger issue than just a fix to TinkerGraph because it is
a TinkerPop Structure API requirement and there are tests that validate this
behavior. I don't know why we did that but the code goes back to early versions
of 3.x. I don't see the reason for keeping it especially since it is at odds
with the TinkerGraph id system and may be an example of something TinkerPop is
to prescriptive about for graph providers to be forced to implement.
I'm giving this issue a breaking label though I sense no one is relying on the
standard exceptions being thrown here. Providers can either choose to drop the
restriction or retain it so users will need to know their graph. The main
expectation is that you can do: {{g.V(v1, 1L, 1.0f, "1")}} where "v1" is a
{{Vertex}} and it's id will be used in the filter alongside the others
specified.
> TinkerGraph erroneously assumes IDs must be homogeneous
> -------------------------------------------------------
>
> Key: TINKERPOP-2507
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2507
> Project: TinkerPop
> Issue Type: Bug
> Components: structure
> Affects Versions: 3.4.9
> Reporter: Christopher Smith
> Assignee: Stephen Mallette
> Priority: Major
> Labels: breaking
>
> In {{TinkerGraph#validateHomogenousIds(List)}}, TinkerGraph _explicitly_
> checks for identical ID types among all IDs passed in and provides a
> misleading error message if they mismatch. In fact, this is a semantic error;
> TinkerGraph quite happily supports heterogeneous element ID types.
> In my application, vertex IDs are generally explicitly assigned using
> UUID-as-string values, and so the IDs are primarily of type {{String}}.
> However, my test infrastructure has a few bookkeeping nodes that I'm not
> manually writing IDs to, and TinkerGraph assigns them {{Long}} IDs. These
> mixed IDs work _just fine_, but when I try to pass an {{Object...}} to {{V}},
> TinkerGraph throws.
> Mixing ID types is perfectly legal (if not, in most cases, practically
> advisable), and TinkerGraph should not throw when presented with a mixed
> array of valid IDs.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)