[ https://issues.apache.org/jira/browse/HIVE-22458?focusedWorklogId=420741&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-420741 ]
ASF GitHub Bot logged work on HIVE-22458: ----------------------------------------- Author: ASF GitHub Bot Created on: 11/Apr/20 10:33 Start Date: 11/Apr/20 10:33 Worklog Time Spent: 10m Work Description: miklosgergely commented on pull request #980: HIVE-22458: Add more constraints on showing partitions URL: https://github.com/apache/hive/pull/980#discussion_r407047199 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/show/ShowPartitionsOperation.java ########## @@ -44,11 +60,49 @@ public int execute() throws HiveException { throw new HiveException(ErrorMsg.TABLE_NOT_PARTITIONED, desc.getTabName()); } - List<String> parts = null; - if (desc.getPartSpec() != null) { - parts = context.getDb().getPartitionNames(tbl.getDbName(), tbl.getTableName(), desc.getPartSpec(), (short) -1); + List<String> parts; + if (desc.getCond() != null || desc.getOrder() != null) { + ExprNodeDesc pred = desc.getCond(); Review comment: This is long, please move it to a method. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 420741) Time Spent: 0.5h (was: 20m) > Add more constraints on showing partitions > ------------------------------------------ > > Key: HIVE-22458 > URL: https://issues.apache.org/jira/browse/HIVE-22458 > Project: Hive > Issue Type: Improvement > Reporter: Zhihua Deng > Priority: Major > Labels: pull-request-available > Attachments: HIVE-22458.2.patch, HIVE-22458.3.patch, > HIVE-22458.branch-1.02.patch, HIVE-22458.branch-1.patch, HIVE-22458.patch > > Time Spent: 0.5h > Remaining Estimate: 0h > > When we showing partitions of a table with thousands of partitions, all the > partitions will be returned and it's not easy to catch the specified one from > them, this make showing partitions hard to use. We can add where/limit/order > by constraints to show partitions like: > show partitions table_name [partition_specs] where partition_key >= value > order by partition_key desc limit n; > -- This message was sent by Atlassian Jira (v8.3.4#803005)