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

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

                Author: ASF GitHub Bot
            Created on: 09/Oct/19 10:36
            Start Date: 09/Oct/19 10:36
    Worklog Time Spent: 10m 
      Work Description: kgyrtkirk commented on pull request #784: HIVE-22235 
CommandProcessorResponse should not be an exception
URL: https://github.com/apache/hive/pull/784#discussion_r332941127
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFGetSplits.java
 ##########
 @@ -311,9 +310,10 @@ private PlanFragment createPlanFragment(String query, 
ApplicationId splitsAppId)
     DriverCleanup driverCleanup = new DriverCleanup(driver, txnManager, 
splitsAppId.toString());
     boolean needsCleanup = true;
     try {
-      CommandProcessorResponse cpr = driver.compileAndRespond(query, false);
-      if (cpr.getResponseCode() != 0) {
-        throw new HiveException("Failed to compile query: " + 
cpr.getException());
+      try {
+        driver.compileAndRespond(query, false);
+      } catch (CommandProcessorException e) {
+        throw new HiveException("Failed to compile query: " + 
e.getException());
 
 Review comment:
   I think we shouldn't call e.getException() 
   use it directly - as it contains usefull
   and also pass e as the parent exception ; so we will get a full backtrace 
not just a hiveexception coming from this line
   
 
----------------------------------------------------------------
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:
[email protected]


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

    Worklog Id:     (was: 325629)
    Time Spent: 50m  (was: 40m)

> CommandProcessorResponse should not be an exception
> ---------------------------------------------------
>
>                 Key: HIVE-22235
>                 URL: https://issues.apache.org/jira/browse/HIVE-22235
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Hive
>            Reporter: Miklos Gergely
>            Assignee: Miklos Gergely
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>         Attachments: HIVE-22235.01.patch, HIVE-22235.02.patch, 
> HIVE-22235.03.patch, HIVE-22235.04.patch, HIVE-22235.05.patch, 
> HIVE-22235.06.patch, HIVE-22235.07.patch, HIVE-22235.08.patch
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> The CommandProcessorResponse class extends Exception. This may be convenient, 
> but it is wrong, as a response is not an exception.



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

Reply via email to