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


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/DescTableAnalyzer.java:
##########
@@ -149,37 +148,37 @@ private Map<String, String> getPartitionSpec(Hive db, 
ASTNode node, TableName ta
     if (node.getChild(1).getType() == HiveParser.TOK_PARTSPEC) {
       ASTNode partNode = (ASTNode) node.getChild(1);
 
-      Table tab = null;
+      Table table;
       try {
-        tab = db.getTable(tableName.getNotEmptyDbTable());
+        table = db.getTable(tableName.getNotEmptyDbTable());
       } catch (InvalidTableException e) {
         throw new 
SemanticException(ErrorMsg.INVALID_TABLE.getMsg(tableName.getNotEmptyDbTable()),
 e);
       } catch (HiveException e) {
         throw new SemanticException(e.getMessage(), e);
       }
 
-      Map<String, String> partitionSpec = null;
+      Map<String, String> partitionSpec;
       try {
-        partitionSpec = getPartSpec(partNode);
-        validateUnsupportedPartitionClause(tab, partitionSpec != null && 
!partitionSpec.isEmpty());
-        partitionSpec = getValidatedPartSpec(tab, partNode, db.getConf(), 
false);
+        partitionSpec = getValidatedPartSpec(table, partNode, db.getConf(), 
false);
       } catch (SemanticException e) {
         // get exception in resolving partition it could be DESCRIBE table key
         // return null, continue processing for DESCRIBE table key
         return null;
       }
 
       if (partitionSpec != null) {
-        Partition part = null;
+        boolean isPartitionPresent;
         try {
-          part = db.getPartition(tab, partitionSpec, false);
+          isPartitionPresent = table.isNonNative() ?
+                  table.getStorageHandler().isPartitionPresent(table, 
partitionSpec) :

Review Comment:
   why not use similar design `table.getStorageHandler().getPartition(table, 
partitionSpec)`?



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