protected Table getTargetTable(QB qb, String dest) throws SemanticException {
    Integer dest_type = qb.getMetaData().getDestTypeForAlias(dest);
    if (dest_type == QBMetaData.DEST_TABLE) {
      return qb.getMetaData().getDestTableForAlias(dest);

    } else if (dest_type == QBMetaData.DEST_PARTITION) {
      Partition dest_part = qb.getMetaData().getDestPartitionForAlias(dest);
      return dest_part.getTable();

    } else {
      throw new SemanticException("Generating constraint check plan: Invalid target type: " + dest);
    }
  }
@param totalFiles
         the totalFiles to set
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java