pvary commented on a change in pull request #1095:
URL: https://github.com/apache/hive/pull/1095#discussion_r439038122
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/parse/RewriteSemanticAnalyzer.java
##########
@@ -409,7 +409,14 @@ private boolean isTargetTable(Entity entity, Table
targetTable) {
* is this the right way to compare? Should it just compare paths?
* equals() impl looks heavy weight
*/
- return targetTable.equals(entity.getTable());
+ long targetWriteId = targetTable.getTTable().getWriteId();
+ long entityWriteId = entity.getTable().getTTable().getWriteId();
+ targetTable.getTTable().setWriteId(0L);
+ entity.getTable().getTTable().setWriteId(0L);
+ boolean result = targetTable.equals(entity.getTable());
+ targetTable.getTTable().setWriteId(targetWriteId);
+ entity.getTable().getTTable().setWriteId(entityWriteId);
+ return result;
Review comment:
I would prefer to have a new equalsWithIgnoreWriteId - or whatever
better named method in Table class.
----------------------------------------------------------------
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]