private boolean isRightValid(int left, int right) {
    return !hasFilter(right) || !JoinUtil.isFiltered(filterTags[right], left);
  }
On filterTags

ANDed value of all filter tags in current join group
if any of values passes on outer join alias (which makes zero for the tag alias),
it means there exists a pair for it and safely regarded as a inner join

for example, with table a, b something like,
  a = 100, 10 | 100, 20 | 100, 30
  b = 100, 10 | 100, 20 | 100, 30

the query "a FO b ON a.k=b.k AND a.v&gt;10 AND b.v&gt;30" makes filter map
  0(a) = [1(b),1] : a.v&gt;10
  1(b) = [0(a),1] : b.v&gt;30

for filtered rows in a (100,10) create a-NULL
for filtered rows in b (100,10) (100,20) (100,30) create NULL-b

with 0(a) = [1(b),1] : a.v&gt;10
  100, 10 = 00000010 (filtered)
  100, 20 = 00000000 (valid)
  100, 30 = 00000000 (valid)
-------------------------
      sum = 00000000 : for valid rows in b, there is at least one pair in a

with 1(b) = [0(a),1] : b.v&gt;30
  100, 10 = 00000001 (filtered)
  100, 20 = 00000001 (filtered)
  100, 30 = 00000001 (filtered)
-------------------------
      sum = 00000001 : for valid rows in a (100,20) (100,30), there is no pair in b

result :
  100, 10 :   N,  N
    N,  N : 100, 10
    N,  N : 100, 20
    N,  N : 100, 30
  100, 20 :   N,  N
  100, 30 :   N,  N
ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java