Join Multiple Arrays using equals or comparable

E

Eddy C

Hi,

I've just spent the last hour searching the net to see if anyone has
implemented a sort merge join of 3 or more sorted arrays. On joining
the arrays you would get a new array of objects.

Just like joining 3 or more tables on a column, the trick is I need to
support outer joins. In addition a brute force loop approach doesn't
work as the sorted list is a stream of sorted objects.

So if anyone else has seen something out there, I would appreciate the
link. Oh and using an RDBMS is out of the question as the data is
streaming.

TIA
 
R

Roedy Green

I've just spent the last hour searching the net to see if anyone has
implemented a sort merge join of 3 or more sorted arrays. On joining
the arrays you would get a new array of objects.

see http://mindprod.com/products1.html#SORTED

It as a class that maintains sorted ArrayLists and merges them. It
only has various two way-merges though.

But once you see the logic, you could extend it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top