Implementing an algorithm to apply the hash join operator on several tables given the join keys