You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Christopher Smith (Jira)" <ji...@apache.org> on 2021/01/20 07:59:00 UTC
[jira] [Created] (TINKERPOP-2507) TinkerGraph erroneously assumes
IDs must be homogeneous
Christopher Smith created TINKERPOP-2507:
--------------------------------------------
Summary: 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: tinkergraph
Affects Versions: 3.4.9
Reporter: Christopher Smith
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)