kishendas commented on a change in pull request #1095:
URL: https://github.com/apache/hive/pull/1095#discussion_r445354272



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/parse/RewriteSemanticAnalyzer.java
##########
@@ -405,11 +405,9 @@ protected void updateOutputs(Table targetTable) {
    */
   private boolean isTargetTable(Entity entity, Table targetTable) {
     //todo: https://issues.apache.org/jira/browse/HIVE-15048
-    /**
-     * is this the right way to compare?  Should it just compare paths?
-     * equals() impl looks heavy weight
-     */
-    return targetTable.equals(entity.getTable());
+    // Since any DDL now advances the write id, we should ignore the write Id,
+    // while comparing two tables
+    return targetTable.equalsWithIgnoreWriteId(entity.getTable());

Review comment:
       I believe this is the only place. Also, everywhere else, we use the 
default equals method, so I don't see any issues when Table is used within 
collections. I mean we are not modifying existing equals() method. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to