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


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/process/show/compactions/ShowCompactionsAnalyzer.java:
##########
@@ -80,15 +82,38 @@ public void analyzeInternal(ASTNode root) throws 
SemanticException {
         case HiveParser.TOK_COMPACT_ID:
           compactionId = Long.parseLong(child.getChild(0).getText());
           break;
+        case HiveParser.TOK_LIMIT:
+          limit = Short.valueOf((child.getChild(0)).getText());
+          break;
+        case HiveParser.TOK_ORDERBY:
+          order = processSortOrderSpec(child);
+          break;
         default:
           dbName = stripQuotes(child.getText());
       }
     }
     ShowCompactionsDesc desc = new ShowCompactionsDesc(ctx.getResFile(), 
compactionId, dbName, tblName, poolName, compactionType,
-      compactionStatus, partitionSpec);
+      compactionStatus, partitionSpec, limit, order);
     Task<DDLWork> task = TaskFactory.get(new DDLWork(getInputs(), 
getOutputs(), desc));
     rootTasks.add(task);
     task.setFetchSource(true);
     setFetchTask(createFetchTask(ShowCompactionsDesc.SCHEMA));
   }
+  private String processSortOrderSpec(ASTNode sortNode)
+  {

Review Comment:
   fixed



##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/process/show/compactions/ShowCompactionsAnalyzer.java:
##########
@@ -50,6 +50,8 @@ public void analyzeInternal(ASTNode root) throws 
SemanticException {
     String compactionType = null;
     String compactionStatus = null;
     long compactionId = 0;
+    String order = null;
+    short limit = 0;

Review Comment:
   fixed



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