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

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

                Author: ASF GitHub Bot
            Created on: 29/Jul/22 14:41
            Start Date: 29/Jul/22 14:41
    Worklog Time Spent: 10m 
      Work Description: zabetak commented on PR #3393:
URL: https://github.com/apache/hive/pull/3393#issuecomment-1199426280

   Thanks for your detailed analysis @zhangbutao and apologies for the delay. I 
guess you are right that we should handle the problem in the HS2 side but I 
still believe that concatenating exception messages is not the right way to 
move forward.
   
   If we need to inform the client (e.g., beeline) about a specific error maybe 
we need to use an entry from `ErrorMsg` class, add a new one, and or do 
something similar to what happens in 
[Compiler.handleException](https://github.com/apache/hive/blob/714c260e4a7c6b147c897718a33e693699267792/ql/src/java/org/apache/hadoop/hive/ql/Compiler.java#L459).




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

    Worklog Id:     (was: 796408)
    Time Spent: 40m  (was: 0.5h)

> SQLOperation class output real exception message to jdbc client
> ---------------------------------------------------------------
>
>                 Key: HIVE-26345
>                 URL: https://issues.apache.org/jira/browse/HIVE-26345
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>    Affects Versions: 4.0.0-alpha-2
>            Reporter: zhangbutao
>            Assignee: zhangbutao
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Beeline client may can not get real exception from _*SQLOperation class*_ and 
> user may don't how to fix query based on client exception massage.
> Step to repro:
> {code:java}
> set hive.support.concurrency=false;
> set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
> create table testacid(id int) stored as orc 
> tblproperties('transactional'='true');{code}
> Beeline console output exception:
> {code:java}
> Error: Error running query (state=,code=0) {code}
>  
> However, Hive3 beeline can output readable exception information:
> {code:java}
> Error: Error while compiling statement: FAILED: RuntimeException [Error 
> 10264]: To use DbTxnManager you must set hive.support.concurrency=true 
> (state=42000,code=10264) {code}
>  
> This change was introduced by HIVE-23124, i think we should fix this to 
> output real exception to prompt users to amend the query.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to