I have been reading about Hash Join and how does it work in physical level. However, there is some thing that I don't understand (because of my lack of knowledge).
This is the algorithm of Hash Join that I found;
for each row R1 in the build table begin calculate hash value on R1 join key(s) insert R1 into the appropriate hash bucket end for each row R2 in the probe table begin calculate hash value on R2 join key(s) for each row R1 in the corresponding hash bucket if R1 joins with R2 return (R1, R2) end
This is seems adequate for join conditions like
"TABLE1.NAME == TABLE2.NAME" etc. However, how does it produce hashes or compares tham when join conditions are
"TABLE1.NAME == TABLE2.NAME" && "TABLE1.AGE > TABLE2.AGE".
I just couldn't find and understand how they produce or compare the hashes that requires both equailty operator and some other relational operators like bigger than that etc.