The indices of ColumnRefExprs in hash join columns are with respect to left or right tables. For example,
The plan in this figure means join on 0th column of the left table and 3rd column of the right table.
But for NLJ, the column indices are with respect to the join output. For instance, if the condition is #0 = #5 and the left table has 3 columns, the condition actually means join on 0th column of the left table and 3rd column of the right.
The indices of
ColumnRefExpr
s in hash join columns are with respect to left or right tables. For example,The plan in this figure means join on 0th column of the left table and 3rd column of the right table.
But for NLJ, the column indices are with respect to the join output. For instance, if the condition is
#0 = #5
and the left table has 3 columns, the condition actually means join on 0th column of the left table and 3rd column of the right.