dengzhhu653 commented on a change in pull request #980: HIVE-22458: Add more 
constraints on showing partitions
URL: https://github.com/apache/hive/pull/980#discussion_r407144701
 
 

 ##########
 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:
   Move the logic into method getPartNamesByConstraints alone

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to