function constructTree1(table1, table2, predicateReverseOrder) {
  var queryContext = new lf.query.SelectContext(schema);
  queryContext.from = [table1, table2];
  queryContext.columns = [];
  var joinPredicate = predicateReverseOrder ?
      table2['id'].eq(table1['id']) : table1['id'].eq(table2['id']);
  queryContext.where = joinPredicate;

  var tableAccessStep1 = new lf.proc.TableAccessFullStep(
      global, queryContext.from[0]);
  var tableAccessStep2 = new lf.proc.TableAccessFullStep(
      global, queryContext.from[1]);
  var joinStep = new lf.proc.JoinStep(
      global, joinPredicate, false /* isOuterJoin*/);
  var projectStep = new lf.proc.ProjectStep(queryContext.columns, null);
  projectStep.addChild(joinStep);
  joinStep.addChild(tableAccessStep1);
  joinStep.addChild(tableAccessStep2);

  return {
    queryContext: queryContext,
    root: projectStep
  };
}
@param {!lf.schema.Table} table1
@param {!lf.schema.Table} table2
@param {boolean} predicateReverseOrder Whether to construct the predicate in
    reverse order (table2 refrred on the left side of the predicate, table1
    on the right);
@return {lf.testing.treeutil.Tree}