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


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/PartitionUtils.java:
##########
@@ -94,10 +97,21 @@ public static ExprNodeGenericFuncDesc 
makeUnaryPredicate(String fn, ExprNodeDesc
   public static Partition getPartition(Hive db, Table table, Map<String, 
String> partitionSpec, boolean throwException)
       throws SemanticException {
     Partition partition;
-    try {
-      partition = db.getPartition(table, partitionSpec, false);
-    } catch (Exception e) {
-      throw new SemanticException(toMessage(ErrorMsg.INVALID_PARTITION, 
partitionSpec), e);
+    if (table.getStorageHandler() != null && 
table.getStorageHandler().alwaysUnpartitioned()) {
+      table.getStorageHandler().validatePartSpec(table, partitionSpec);
+      try {
+        String partName = Warehouse.makePartName(partitionSpec, false);
+        partition = new DummyPartition(table, partName, partitionSpec);
+      } catch (MetaException e) {
+        throw new SemanticException("Unable to construct name for dummy 
partition due to: ", e);
+      }
+    }
+    else {

Review Comment:
   please move it to prev line with `}`



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