You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/09/19 12:24:00 UTC
[jira] [Work logged] (HIVE-26345) SQLOperation class output real exception message to jdbc client
[ https://issues.apache.org/jira/browse/HIVE-26345?focusedWorklogId=810015&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-810015 ]
ASF GitHub Bot logged work on HIVE-26345:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Sep/22 12:23
Start Date: 19/Sep/22 12:23
Worklog Time Spent: 10m
Work Description: zabetak commented on code in PR #3393:
URL: https://github.com/apache/hive/pull/3393#discussion_r974185170
##########
ql/src/java/org/apache/hadoop/hive/ql/Driver.java:
##########
@@ -511,13 +511,17 @@ public void compile(String command, boolean resetTaskIds, boolean deferClose) th
}
private void prepareForCompile(boolean resetTaskIds) throws CommandProcessorException {
- driverTxnHandler.createTxnManager();
- DriverState.setDriverState(driverState);
- prepareContext();
- setQueryId();
+ try {
Review Comment:
I suppose that this try-catch block was introduced to address the [so-called regression](https://github.com/apache/hive/pull/3393#issuecomment-1207815099) from HIVE-22526 but I don't fully understand where the regression comes from.
I had a quick look in the diff introduced by HIVE-22526 but as far as I can see there the`driverTxnHandler#createTxnManager` is not wrapped in a try-catch block and it seems that the exception is not passed in `handleException` method. @zhangbutao can you explain a bit more on where exactly is the regression?
Issue Time Tracking
-------------------
Worklog Id: (was: 810015)
Time Spent: 1h (was: 50m)
> 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: 1h
> 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)