function checkEval_Eq_PreviousJoin(table1, table2) {
  var leftRow = table1.createRow({
    'id': 'dummyId',
    'name': 'dummyName'
  });
  var rightRow1 = table2.createRow({
    'id': 'dummyId',
    'email': 'dummyEmail1'
  });
  var rightRow2 = table2.createRow({
    'id': 'dummyId',
    'email': 'dummyEmail2'
  });

  var leftRelation = lf.proc.Relation.fromRows(
      [leftRow], [table1.getEffectiveName()]);
  var rightRelation = lf.proc.Relation.fromRows(
      [rightRow1, rightRow2], [table2.getEffectiveName()]);

  var joinPredicate = new lf.pred.JoinPredicate(
      table1['id'], table2['id'], lf.eval.Type.EQ);
  var joinedRelation = joinPredicate.evalRelationsHashJoin(
      leftRelation, rightRelation, false);

  var valuePredicate = new lf.pred.ValuePredicate(
      table2['email'], rightRow2.payload()['email'], lf.eval.Type.EQ);
  var finalRelation = valuePredicate.eval(joinedRelation);
  assertEquals(1, finalRelation.entries.length);
  assertEquals(
      rightRow2.payload()['email'],
      finalRelation.entries[0].getField(table2['email']));
}
Testing the case where a ValuePredicate is applied on a relation that is the
result of a previous join operation.

@param {!lf.schema.Table} table1 Must be TableA or alias.
@param {!lf.schema.Table} table2 Must be TableB or alias.