private boolean isTargetTable(Entity entity, Table targetTable) {
    //todo: https://issues.apache.org/jira/browse/HIVE-15048
    // Since any DDL now advances the write id, we should ignore the write Id,
    // while comparing two tables
    return targetTable.equalsWithIgnoreWriteId(entity.getTable());
  }
Does this Entity belong to target table (partition).
ql/src/java/org/apache/hadoop/hive/ql/parse/RewriteSemanticAnalyzer.java