tanishq-chugh commented on code in PR #5164:
URL: https://github.com/apache/hive/pull/5164#discussion_r1615966176


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/show/ShowPartitionsOperation.java:
##########
@@ -58,7 +58,8 @@ public int execute() throws HiveException {
     if (tbl.isNonNative() && 
tbl.getStorageHandler().supportsPartitionTransform()) {
       parts = tbl.getStorageHandler().showPartitions(context, tbl);
     } else if (!tbl.isPartitioned()) {
-      throw new HiveException(ErrorMsg.TABLE_NOT_PARTITIONED, 
desc.getTabName());
+      context.getTask().setException(new 
HiveException(ErrorMsg.TABLE_NOT_PARTITIONED, desc.getTabName()));
+      return ErrorMsg.TABLE_NOT_PARTITIONED.getErrorCode();

Review Comment:
   @deniskuzZ , With your suggested change, the output is as follows:
   
   <img width="1278" alt="output" 
src="https://github.com/apache/hive/assets/157357971/c44e0204-8705-48a6-a5fe-66b295b8874d";>
   
   `return code 1` is printed on the console differing from the expected output 
of `return code 10241` as per 
[HIVE-26926](https://issues.apache.org/jira/browse/HIVE-26926). 
   
   Should the change be made?



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