[
https://issues.apache.org/jira/browse/HIVE-28312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
László Bodor resolved HIVE-28312.
---------------------------------
Resolution: Fixed
> Save query error message on Driver level
> ----------------------------------------
>
> Key: HIVE-28312
> URL: https://issues.apache.org/jira/browse/HIVE-28312
> Project: Hive
> Issue Type: Improvement
> Reporter: László Bodor
> Assignee: László Bodor
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.1.0
>
>
> current call path is *SQLOperation -> Driver.run*
> Instead of just throwing CommandProcessorException, Driver might save the the
> error message for query-tracking purposes, this is a single message for later
> reference, like:
> {code}
> FAILED: SemanticException [Error 10001]: Line 1:14 Table not found 'abcd'
> {code}
> 2 ways to achieve this
> 1. wrap every occurrence of throwing CommandProcessorException inside driver
> e.g.
> https://github.com/apache/hive/blob/98d9d22398370f817fe64449368671b978fff096/ql/src/java/org/apache/hadoop/hive/ql/Driver.java#L146
> PRO: storing of error message stays inside the Driver (SQLCommand doesn't
> need to know about it)
> CONS: looks a bit worse, not future-proof (later, anyone can miss this call
> while throwing a cpe), needs Driver code changes at several places
> 2. catch in SQLOperation and propagate back to Driver
> https://github.com/apache/hive/blob/98d9d22398370f817fe64449368671b978fff096/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java#L237
> PRO: maybe it looks better, every exception can be caught in a single place
> CON: it looks weird, because SQLOperation has to call back to the driver to
> store the error message (which was already passed through the driver)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)