[ https://issues.apache.org/jira/browse/HIVE-26804?focusedWorklogId=842448&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-842448 ]
ASF GitHub Bot logged work on HIVE-26804: ----------------------------------------- Author: ASF GitHub Bot Created on: 31/Jan/23 07:50 Start Date: 31/Jan/23 07:50 Worklog Time Spent: 10m Work Description: rkirtir commented on code in PR #3880: URL: https://github.com/apache/hive/pull/3880#discussion_r1091558840 ########## standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnQueries.java: ########## @@ -18,36 +18,70 @@ package org.apache.hadoop.hive.metastore.txn; public class TxnQueries { - public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = - " ORDER BY CASE " + - " WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " + - " THEN \"CC_END\" " + - " WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " + - " THEN \"CC_START\" " + - " ELSE \"CC_COMMIT_TIME\" " + - " END desc ," + - " \"CC_ENQUEUE_TIME\" asc"; + public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = + " ORDER BY CASE " + + " WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " + + " THEN \"CC_END\" " + + " WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " + + " THEN \"CC_START\" " + + " ELSE \"CC_COMMIT_TIME\" " + + " END desc ," + + " \"CC_ENQUEUE_TIME\" asc"; - public static final String SHOW_COMPACTION_QUERY = - "SELECT XX.* FROM ( SELECT " + - " \"CQ_DATABASE\" AS \"CC_DATABASE\", \"CQ_TABLE\" AS \"CC_TABLE\", \"CQ_PARTITION\" AS \"CC_PARTITION\", " + - " \"CQ_STATE\" AS \"CC_STATE\", \"CQ_TYPE\" AS \"CC_TYPE\", \"CQ_WORKER_ID\" AS \"CC_WORKER_ID\", " + - " \"CQ_START\" AS \"CC_START\", -1 \"CC_END\", \"CQ_RUN_AS\" AS \"CC_RUN_AS\", " + - " \"CQ_HADOOP_JOB_ID\" AS \"CC_HADOOP_JOB_ID\", \"CQ_ID\" AS \"CC_ID\", \"CQ_ERROR_MESSAGE\" AS \"CC_ERROR_MESSAGE\", " + - " \"CQ_ENQUEUE_TIME\" AS \"CC_ENQUEUE_TIME\", \"CQ_WORKER_VERSION\" AS \"CC_WORKER_VERSION\", " + - " \"CQ_INITIATOR_ID\" AS \"CC_INITIATOR_ID\", \"CQ_INITIATOR_VERSION\" AS \"CC_INITIATOR_VERSION\", " + - " \"CQ_CLEANER_START\" AS \"CC_CLEANER_START\", \"CQ_POOL_NAME\" AS \"CC_POOL_NAME\", \"CQ_TXN_ID\" AS \"CC_TXN_ID\", " + - " \"CQ_NEXT_TXN_ID\" AS \"CC_NEXT_TXN_ID\", \"CQ_COMMIT_TIME\" AS \"CC_COMMIT_TIME\", " + - " \"CQ_HIGHEST_WRITE_ID\" AS \"CC_HIGHEST_WRITE_ID\" " + - "FROM " + - " \"COMPACTION_QUEUE\" " + - "UNION ALL " + - "SELECT " + - " \"CC_DATABASE\", \"CC_TABLE\", \"CC_PARTITION\", \"CC_STATE\", \"CC_TYPE\", \"CC_WORKER_ID\", " + - " \"CC_START\", \"CC_END\", \"CC_RUN_AS\", \"CC_HADOOP_JOB_ID\", \"CC_ID\", \"CC_ERROR_MESSAGE\", " + - " \"CC_ENQUEUE_TIME\", \"CC_WORKER_VERSION\", \"CC_INITIATOR_ID\", \"CC_INITIATOR_VERSION\", " + - " -1 , \"CC_POOL_NAME\", \"CC_TXN_ID\", \"CC_NEXT_TXN_ID\", \"CC_COMMIT_TIME\", " + - " \"CC_HIGHEST_WRITE_ID\"" + - "FROM " + - " \"COMPLETED_COMPACTIONS\" ) XX "; + public static final String SHOW_COMPACTION_QUERY = + "SELECT XX.* FROM ( SELECT " + + " \"CQ_DATABASE\" AS \"CC_DATABASE\", \"CQ_TABLE\" AS \"CC_TABLE\", \"CQ_PARTITION\" AS \"CC_PARTITION\", " + + " \"CQ_STATE\" AS \"CC_STATE\", \"CQ_TYPE\" AS \"CC_TYPE\", \"CQ_WORKER_ID\" AS \"CC_WORKER_ID\", " + + " \"CQ_START\" AS \"CC_START\", -1 \"CC_END\", \"CQ_RUN_AS\" AS \"CC_RUN_AS\", " + + " \"CQ_HADOOP_JOB_ID\" AS \"CC_HADOOP_JOB_ID\", \"CQ_ID\" AS \"CC_ID\", \"CQ_ERROR_MESSAGE\" AS \"CC_ERROR_MESSAGE\", " + + " \"CQ_ENQUEUE_TIME\" AS \"CC_ENQUEUE_TIME\", \"CQ_WORKER_VERSION\" AS \"CC_WORKER_VERSION\", " + + " \"CQ_INITIATOR_ID\" AS \"CC_INITIATOR_ID\", \"CQ_INITIATOR_VERSION\" AS \"CC_INITIATOR_VERSION\", " + + " \"CQ_CLEANER_START\" AS \"CC_CLEANER_START\", \"CQ_POOL_NAME\" AS \"CC_POOL_NAME\", \"CQ_TXN_ID\" AS \"CC_TXN_ID\", " + + " \"CQ_NEXT_TXN_ID\" AS \"CC_NEXT_TXN_ID\", \"CQ_COMMIT_TIME\" AS \"CC_COMMIT_TIME\", " + + " \"CQ_HIGHEST_WRITE_ID\" AS \"CC_HIGHEST_WRITE_ID\" " + + "FROM " + + " \"COMPACTION_QUEUE\" " + + "UNION ALL " + + "SELECT " + + " \"CC_DATABASE\" , \"CC_TABLE\", \"CC_PARTITION\", \"CC_STATE\", \"CC_TYPE\", \"CC_WORKER_ID\", " + + " \"CC_START\", \"CC_END\", \"CC_RUN_AS\", \"CC_HADOOP_JOB_ID\", \"CC_ID\", \"CC_ERROR_MESSAGE\", " + + " \"CC_ENQUEUE_TIME\", \"CC_WORKER_VERSION\", \"CC_INITIATOR_ID\", \"CC_INITIATOR_VERSION\", " + + " -1 , \"CC_POOL_NAME\", \"CC_TXN_ID\", \"CC_NEXT_TXN_ID\", \"CC_COMMIT_TIME\", " + + " \"CC_HIGHEST_WRITE_ID\"" + + "FROM " + + " \"COMPLETED_COMPACTIONS\" ) XX "; + + + public static final String SELECT_COMPACTION_QUEUE_BY_COMPID = Review Comment: fixed Issue Time Tracking ------------------- Worklog Id: (was: 842448) Time Spent: 5h 20m (was: 5h 10m) > Cancel Compactions in initiated state > ------------------------------------- > > Key: HIVE-26804 > URL: https://issues.apache.org/jira/browse/HIVE-26804 > Project: Hive > Issue Type: New Feature > Components: Hive > Reporter: KIRTI RUGE > Assignee: KIRTI RUGE > Priority: Major > Labels: pull-request-available > Time Spent: 5h 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.10#820010)