Hash join: Difference between revisions

Content added Content deleted
(Added Elixir)
m (→‎{{header|Sidef}}: modified code to work with Sidef 2.10)
Line 1,580: Line 1,580:
# hash phase
# hash phase
table1.each { |s|
table1.each { |s|
h[s[index1]] := [] append(s);
h{s[index1]} := [] -> append(s);
};
};


# join phase
# join phase
table2.each { |r|
table2.each { |r|
a += h[r[index2]].map{[_,r]};
a += h{r[index2]}.map{[_,r]};
};
};