yashrsharma44 commented on a change in pull request #7142:
URL: https://github.com/apache/incubator-pinot/pull/7142#discussion_r667368493



##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
##########
@@ -200,31 +202,69 @@ public String recommendConfig(String inputStr) {
   @Produces(MediaType.APPLICATION_JSON)
   @Path("/tables")
   @ApiOperation(value = "Lists all tables in cluster", notes = "Lists all 
tables in cluster")
-  public String listTableConfigs(@ApiParam(value = "realtime|offline") 
@QueryParam("type") String tableTypeStr) {
+  public String listTables(@ApiParam(value = "realtime|offline") 
@QueryParam("type") String tableTypeStr,
+      @ApiParam(value = "name|creationTime|lastModifiedTime") 
@QueryParam("sortType") @DefaultValue("name") String sortType,
+      @ApiParam(value = "true|false") @QueryParam("sortAsc") 
@DefaultValue("true") boolean sortAsc) {
     try {
       List<String> tableNames;
       TableType tableType = null;
       if (tableTypeStr != null) {
         tableType = TableType.valueOf(tableTypeStr.toUpperCase());
       }
 
+      Boolean sortTypeValid = sortType.equalsIgnoreCase("name") || 
sortType.equalsIgnoreCase("creationTime") || sortType

Review comment:
       I have added a check at start - `sortType == null || ...`




-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to