src/backend/executor/abstract_join_executor.cpp
/**
 * @ brief Build the joined tile with schema derived from children tiles
 */
@ brief Build the joined tile with schema derived from children tiles
@ brief Build the joined tile with schema derived from children tiles
std::unique_ptr<LogicalTile> AbstractJoinExecutor::BuildOutputLogicalTile(
    LogicalTile *left_tile, LogicalTile *right_tile) {
  assert(left_tile != nullptr);
  assert(right_tile != nullptr);
  std::unique_ptr<LogicalTile> output_tile(LogicalTileFactory::GetTile());
  auto left_tile_schema = left_tile->GetSchema();
  auto right_tile_schema = right_tile->GetSchema();
  for (auto &col : right_tile_schema) {
    col.position_list_idx += left_tile->GetPositionLists().size();
  }
  auto output_tile_schema = BuildSchema(left_tile_schema, right_tile_schema);
  output_tile->SetSchema(std::move(output_tile_schema));
  return output_tile;
}
std :: unique_ptr < LogicalTile > AbstractJoinExecutor :: BuildOutputLogicalTile ( LogicalTile * left_tile , LogicalTile * right_tile ) { assert ( left_tile != nullptr ) ; assert ( right_tile != nullptr ) ; std :: unique_ptr < LogicalTile > output_tile ( LogicalTileFactory :: GetTile ( ) ) ; auto left_tile_schema = left_tile -> GetSchema ( ) ; auto right_tile_schema = right_tile -> GetSchema ( ) ; for ( auto & col : right_tile_schema ) { col . position_list_idx += left_tile -> GetPositionLists ( ) . size ( ) ; } auto output_tile_schema = BuildSchema ( left_tile_schema , right_tile_schema ) ; output_tile -> SetSchema ( std :: move ( output_tile_schema ) ) ; return output_tile ; }
@ brief Build the joined tile with schema derived from children tiles
@ brief Build the joined tile with schema derived from children tiles
// Check the input logical tiles. // Construct output logical tile. // advance the position list index of right tile schema /* build the schema given the projection */ // Set the output logical tile schema