deniskuzZ commented on code in PR #5123:
URL: https://github.com/apache/hive/pull/5123#discussion_r1569023720


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/PartitionUtils.java:
##########
@@ -108,11 +122,17 @@ public static Partition getPartition(Hive db, Table 
table, Map<String, String> p
   public static List<Partition> getPartitions(Hive db, Table table, 
Map<String, String> partitionSpec,
       boolean throwException) throws SemanticException {
     List<Partition> partitions;
-    try {
-      partitions = partitionSpec == null ? db.getPartitions(table) : 
db.getPartitions(table, partitionSpec);
-    } catch (Exception e) {
-      throw new SemanticException(toMessage(ErrorMsg.INVALID_PARTITION, 
partitionSpec), e);
-    }
+      if (table.getStorageHandler() != null && 
table.getStorageHandler().alwaysUnpartitioned()) {
+        partitions = new ArrayList<>();
+        partitions.add(getPartition(db, table, partitionSpec, throwException));

Review Comment:
   that is a diff API, it supposed to return all partitions matching spec, not 
just 1 



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