[jira] [Work logged] (HIVE-25033) HPL/SQL thrift call fails when returning null

2021-04-30 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25033:
-

Author: ASF GitHub Bot
Created on: 30/Apr/21 08:18
Start Date: 30/Apr/21 08:18
Worklog Time Spent: 10m 
  Work Description: kasakrisz merged pull request #2194:
URL: https://github.com/apache/hive/pull/2194


   


-- 
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: 591395)
Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (HIVE-25033) HPL/SQL thrift call fails when returning null

2021-04-26 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25033:
-

Author: ASF GitHub Bot
Created on: 26/Apr/21 07:42
Start Date: 26/Apr/21 07:42
Worklog Time Spent: 10m 
  Work Description: zeroflag commented on a change in pull request #2194:
URL: https://github.com/apache/hive/pull/2194#discussion_r620046903



##
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:
   No, but this is happening on HMS side. We log the exception in the 
client side. The former is written to metastore logs  while the latter in hs2 
logs and the stacktraces are not the same. Many of the other methods of hms 
handler do this as well.




-- 
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: 589028)
Time Spent: 0.5h  (was: 20m)

> 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: 0.5h
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (HIVE-25033) HPL/SQL thrift call fails when returning null

2021-04-23 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-25033?focusedWorklogId=587953=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)


[jira] [Work logged] (HIVE-25033) HPL/SQL thrift call fails when returning null

2021-04-20 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on HIVE-25033:
-

Author: ASF GitHub Bot
Created on: 20/Apr/21 09:00
Start Date: 20/Apr/21 09:00
Worklog Time Spent: 10m 
  Work Description: zeroflag opened a new pull request #2194:
URL: https://github.com/apache/hive/pull/2194


   Thrift doesn't support returning null-s from functions.
   
   This patch also puts back the changes which were accidentally removed by 
   
   
https://github.com/apache/hive/commit/6de2d51ac812a9393e8ff5e6de7bd911cb83f237#diff-90c669c961ab250c01087a409b31126cce7ac0672c40f465e7ee262ed7bcdadd


-- 
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: 585646)
Remaining Estimate: 0h
Time Spent: 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
> Fix For: 4.0.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>




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