gchq / Gaffer

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

Add merge function that shows which graph results come from #3118

Open t92549 opened 11 months ago

t92549 commented 11 months ago

Describe the new feature you'd like There should be a federated merge function added so that when I perform a GetElements operation, I can see which elements came from which subgraph.

Describe alternatives you've considered It could be implemented as an option rather than a merge function.

Additional context Results from ConcatenateMergeFunction look like this: [el1, el2, el3] Results from this new merge function would like something like: {graph1: [el1, el2], graph2: [el3]}

tb06904 commented 11 months ago

Might be worth looking at using some part of the stream library to do this as the map() method might work quite well, there is also #3075 open to investigate other features we could use too.