Modified join to have also equijoins (need to improve memory management)