deniskuzZ commented on a change in pull request #3034:
URL: https://github.com/apache/hive/pull/3034#discussion_r811768830



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
##########
@@ -353,11 +352,9 @@ public void markCompacted(CompactionInfo info) throws 
MetaException {
         if (minOpenTxnWaterMark > 0) {
           whereClause += " AND (\"CQ_NEXT_TXN_ID\" <= " + minOpenTxnWaterMark 
+ " OR \"CQ_NEXT_TXN_ID\" IS NULL)";
         }
-        if (retentionTime > 0) {
-          whereClause += " AND \"CQ_COMMIT_TIME\" < (" + getEpochFn(dbProduct) 
+ " - " + retentionTime + ")";
-        }
+        whereClause += " AND \"CQ_COMMIT_TIME\" < (" + getEpochFn(dbProduct) + 
" - " + retentionTime + ")";
         String s = "SELECT \"CQ_ID\", \"cq1\".\"CQ_DATABASE\", 
\"cq1\".\"CQ_TABLE\", \"cq1\".\"CQ_PARTITION\"," +
-            "   \"CQ_TYPE\", \"CQ_RUN_AS\", \"CQ_HIGHEST_WRITE_ID\", 
\"CQ_TBLPROPERTIES\"" +
+            "   \"CQ_TYPE\", \"CQ_RUN_AS\", \"CQ_HIGHEST_WRITE_ID\", 
\"CQ_TBLPROPERTIES\", \"CQ_STATE\"" +

Review comment:
       why do you need to fetch CQ_STATE, it's a constant? there is a filter 
CQ_STATE = 'READY_FOR_CLEANING'




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