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