rkirtir commented on code in PR #3608:
URL: https://github.com/apache/hive/pull/3608#discussion_r990898831


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -3970,6 +3960,78 @@ public ShowCompactResponse 
showCompact(ShowCompactRequest rqst) throws MetaExcep
     }
   }
 
+  private List<String> getShowCompactionQueryParamList(ShowCompactRequest 
request) throws MetaException {
+    String dbName = request.getDbname();
+    String tableName = request.getTablename();
+    String partName = request.getPartitionname();
+    CompactionType type = request.getType();
+    String state = request.getState();
+    String poolName = request.getPoolName();
+    List<String> params = new ArrayList<>();
+    if (dbName != null && !dbName.isEmpty()) {
+      params.add(dbName);
+    }
+    if (tableName != null && !tableName.isEmpty()) {
+      params.add(tableName);
+    }
+    if (partName != null && !partName.isEmpty()) {
+      params.add(partName);
+    }
+    if (state != null && !state.isEmpty()) {
+      params.add(state);
+    }
+    if (type != null) {
+      params.add(thriftCompactionType2DbType(type).toString());
+    }
+    if (org.apache.commons.lang3.StringUtils.isNotBlank(poolName)) {
+      params.add(poolName);
+    }
+    return params;
+  }
+
+  private String getFilterClause(ShowCompactRequest request) {
+    StringBuilder filter = new StringBuilder();
+    String dbName = request.getDbname();
+    String tableName = request.getTablename();
+    String partName = request.getPartitionname();
+    CompactionType type = request.getType();
+    String state = request.getState();
+    String poolName = request.getPoolName();
+    if (dbName != null && !dbName.isEmpty()) {

Review Comment:
   Agree. Addressing the same



##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -5875,6 +5802,15 @@ public ShowCompactResponse showCompactions(String 
poolName) throws HiveException
     }
   }
 
+  public ShowCompactResponse showCompactions(ShowCompactRequest request) 
throws HiveException {

Review Comment:
   Agree. Addressing the same



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