[ 
https://issues.apache.org/jira/browse/HIVE-25033?focusedWorklogId=587953&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-587953
 ]

ASF GitHub Bot logged work on HIVE-25033:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Apr/21 16:20
            Start Date: 23/Apr/21 16:20
    Worklog Time Spent: 10m 
      Work Description: mustafaiman commented on a change in pull request #2194:
URL: https://github.com/apache/hive/pull/2194#discussion_r619345191



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -10548,13 +10565,20 @@ public void 
drop_stored_procedure(StoredProcedureRequest request) throws MetaExc
     }
   }
 
-public Package find_package(GetPackageRequest request) throws MetaException {
+public Package find_package(GetPackageRequest request) throws MetaException, 
NoSuchObjectException {
     startFunction("find_package");
     Exception ex = null;
     try {
-      return getMS().findPackage(request);
+      Package pkg = getMS().findPackage(request);
+      if (pkg == null) {
+        throw new NoSuchObjectException(
+                "HPL/SQL package " + request.getDbName() + "." + 
request.getPackageName() + " does not exist");
+      }
+      return pkg;
     } catch (Exception e) {
-      LOG.error("Caught exception", e);
+      if (!(e instanceof NoSuchObjectException)) {
+        LOG.error("Caught exception", e);

Review comment:
       We already throw the exception. Why do we need to log it here? Are 
exceptions thrown from here swallowed somewhere up the call stack?




-- 
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 587953)
    Time Spent: 20m  (was: 10m)

> HPL/SQL thrift call fails when returning null
> ---------------------------------------------
>
>                 Key: HIVE-25033
>                 URL: https://issues.apache.org/jira/browse/HIVE-25033
>             Project: Hive
>          Issue Type: Sub-task
>          Components: hpl/sql
>    Affects Versions: 4.0.0
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to