pvary commented on a change in pull request #1095:
URL: https://github.com/apache/hive/pull/1095#discussion_r445417480
##########
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:
My concern is mainly about having multiple Table instances in memory
around compilation/execution which previously were "equal", but after this
change will not be "equal" because the writeId changes. You identified one
place where we face this issue, but there might be other places - even possibly
hidden ones like collections -, where the objects were previously equals, but
not anymore.
----------------------------------------------------------------
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]