SourabhBadhya commented on code in PR #4410:
URL: https://github.com/apache/hive/pull/4410#discussion_r1229450113


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java:
##########
@@ -132,10 +132,12 @@ class CompactionTxnHandler extends TxnHandler {
               " OR (\"res1\".\"TC_PARTITION\" IS NULL AND 
\"res3\".\"CQ_PARTITION\" IS NULL))" +
       " WHERE \"res3\".\"RETRY_RECORD_CHECK\" <= 0 OR 
\"res3\".\"RETRY_RECORD_CHECK\" IS NULL";
 
-  private static final String DELETE_ABORT_RETRY_ENTRIES_FROM_COMPACTION_QUEUE 
=
-      "DELETE FROM \"COMPACTION_QUEUE\" WHERE \"CQ_DATABASE\" = ? " +
-      " AND \"CQ_TABLE\" = ? AND (\"CQ_PARTITION\" = ? OR \"CQ_PARTITION\" IS 
NULL) AND \"CQ_TYPE\" = " +
-      quoteChar(TxnStore.ABORT_TXN_CLEANUP_TYPE);
+  private static final String DELETE_RETRY_ENTRIES = "DELETE FROM 
\"COMPACTION_QUEUE\" WHERE \"CQ_ID\" = ?";
+
+  private static final String DELETE_COMPACTION_AND_RETRY_ENTRIES = 
DELETE_RETRY_ENTRIES +
+      " OR ( \"CQ_DATABASE\" = ? AND \"CQ_TABLE\" = ? " +
+      " AND \"CQ_PARTITION\" %s AND \"CQ_TYPE\" = " +
+      quoteChar(TxnStore.ABORT_TXN_CLEANUP_TYPE) + " )";

Review Comment:
   Done.



-- 
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.

To unsubscribe, e-mail: [email protected]

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