[ https://issues.apache.org/jira/browse/HIVE-26580?focusedWorklogId=824660&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-824660 ]
ASF GitHub Bot logged work on HIVE-26580: ----------------------------------------- Author: ASF GitHub Bot Created on: 09/Nov/22 16:44 Start Date: 09/Nov/22 16:44 Worklog Time Spent: 10m Work Description: deniskuzZ commented on code in PR #3708: URL: https://github.com/apache/hive/pull/3708#discussion_r1018178679 ########## ql/src/java/org/apache/hadoop/hive/ql/ddl/process/show/compactions/ShowCompactionsOperation.java: ########## @@ -99,20 +99,26 @@ private ShowCompactRequest getShowCompactioRequest(ShowCompactionsDesc desc) thr if (isNotEmpty(desc.getPartSpec())) { request.setPartitionname(AcidUtils.getPartitionName(desc.getPartSpec())); } - if(desc.getCompactionId()>0){ + if(desc.getCompactionId() > 0){ request.setId(desc.getCompactionId()); } + if (desc.getLimit() > -1) { + request.setLimit(desc.getLimit()); + } + if (isNotBlank(desc.getOrderBy())) { + request.setOrder(desc.getOrderBy()); + } return request; } private void writeHeader(DataOutputStream os) throws IOException { os.writeBytes("CompactionId"); os.write(Utilities.tabCode); - os.writeBytes("Database"); + os.writeBytes("Dbname"); Review Comment: do not change existing headers, some of the clients might have scripts relying on them ########## ql/src/java/org/apache/hadoop/hive/ql/ddl/process/show/compactions/ShowCompactionsOperation.java: ########## @@ -99,20 +99,26 @@ private ShowCompactRequest getShowCompactioRequest(ShowCompactionsDesc desc) thr if (isNotEmpty(desc.getPartSpec())) { request.setPartitionname(AcidUtils.getPartitionName(desc.getPartSpec())); } - if(desc.getCompactionId()>0){ + if(desc.getCompactionId() > 0){ request.setId(desc.getCompactionId()); } + if (desc.getLimit() > -1) { + request.setLimit(desc.getLimit()); + } + if (isNotBlank(desc.getOrderBy())) { + request.setOrder(desc.getOrderBy()); + } return request; } private void writeHeader(DataOutputStream os) throws IOException { os.writeBytes("CompactionId"); os.write(Utilities.tabCode); - os.writeBytes("Database"); + os.writeBytes("Dbname"); Review Comment: do not change the existing headers, some of the clients might have scripts relying on them Issue Time Tracking ------------------- Worklog Id: (was: 824660) Time Spent: 3h (was: 2h 50m) > SHOW COMPACTIONS should support ordering and limiting functionality in > filtering options > ---------------------------------------------------------------------------------------- > > Key: HIVE-26580 > URL: https://issues.apache.org/jira/browse/HIVE-26580 > Project: Hive > Issue Type: Improvement > Affects Versions: 3.0.0 > Reporter: KIRTI RUGE > Assignee: KIRTI RUGE > Priority: Major > Labels: pull-request-available > Time Spent: 3h > Remaining Estimate: 0h > > SHOW COMPACTION should provide ordering by defied table . It should also > support limitation of fetched records -- This message was sent by Atlassian Jira (v8.20.10#820010)