gchq / Gaffer

A large-scale entity and relation database supporting aggregation of properties
Apache License 2.0
1.75k stars 354 forks source link

inV() and outV() not supported on GafferPopEdges #3219

Closed cn337131 closed 1 month ago

cn337131 commented 1 month ago

Describe the bug Currently a default label will be used if a vertex IDs are used to construct a new edge or if asking for the in/out vertex on the edge. This may result in an incorrect mapping of a Tinkerpop 'label' to a Gaffer 'group', meaning the GafferPopVertex returned by the 'getOutVertex()' and 'getInVertex()' methods likely does not have the correct 'label'.

This is likely due to Gaffer allowing multiple entities/vertexes to be associated with the source and destination vertices of an Edge whereas, Tinkerpop only expects one out vertex and one in vertex on the edge, and hence the 'getOutVertex()' and 'getInVertex()' methods are expected to be used and are part of the interface.

One solution is that a search could be carried out to determine the correct Entity to use when a vertex ID is supplied to an edge, his may hamper performance though, this ticket is to investigate if this is a feature we want to support and the impact of not supporting it.