src/backend/executor/abstract_join_executor.cpp
/**
 * In some case, outer join results can be determined only after all inner
 * join results are constructed, because, in order to build outer join result,
 * we need to know the rows from one side that cannot be matched by rows from
 * the other side. If inner join part has not finished, we cannot know whether
 * there will be a match later.
 */
In some case, outer join results can be determined only after all inner
join results are constructed, because, in order to build outer join result,
we need to know the rows from one side that cannot be matched by rows from
the other side. If inner join part has not finished, we cannot know whether
there will be a match later.
In some case outer join results can be determined only after all inner join results are constructed because in order to build outer join result we need to know the rows from one side that cannot be matched by rows from the other side . If inner join part has not finished we cannot know whether there will be a match later .
bool AbstractJoinExecutor::BuildOuterJoinOutput() {
  assert(join_type_ != JOIN_TYPE_INVALID);
  switch (join_type_) {
    case JOIN_TYPE_LEFT: {
      return BuildLeftJoinOutput();
    }
    case JOIN_TYPE_RIGHT: {
      return BuildRightJoinOutput();
    }
    case JOIN_TYPE_OUTER: {
      bool status = BuildLeftJoinOutput();
      if (status == true) {
        return status;
      } else {
        return BuildRightJoinOutput();
      }
      break;
    }
    case JOIN_TYPE_INNER: {
      return false;
    }
    default: {
      throw Exception("Unsupported join type : " + std::to_string(join_type_));
      break;
    }
  }
  return false;
}
bool AbstractJoinExecutor :: BuildOuterJoinOutput ( ) { assert ( join_type_ != JOIN_TYPE_INVALID ) ; switch ( join_type_ ) { case JOIN_TYPE_LEFT : { return BuildLeftJoinOutput ( ) ; } case JOIN_TYPE_RIGHT : { return BuildRightJoinOutput ( ) ; } case JOIN_TYPE_OUTER : { bool status = BuildLeftJoinOutput ( ) ; if ( status == true ) { return status ; } else { return BuildRightJoinOutput ( ) ; } break ; } case JOIN_TYPE_INNER : { return false ; } default : { throw Exception ( " " + std :: to_string ( join_type_ ) ) ; break ; } } return false ; }
In some case, outer join results can be determined only after all inner
 join results are constructed, because, in order to build outer join result,
 we need to know the rows from one side that cannot be matched by rows from
 the other side.
In some case outer join results can be determined only after all inner join results are constructed because in order to build outer join result we need to know the rows from one side that cannot be matched by rows from the other side .