You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Vineet Garg (JIRA)" <ji...@apache.org> on 2018/03/02 23:27:00 UTC

[jira] [Commented] (HIVE-18852) Misleading error message in alter table validation

    [ https://issues.apache.org/jira/browse/HIVE-18852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16384306#comment-16384306 ] 

Vineet Garg commented on HIVE-18852:
------------------------------------

You are right about the offending line. But I don't think changing {{dbname}} to {{newDbName}} would be correct thing to do since this error is under {{catch (NoSuchObjectException e)}} and could result due to non-existence of any other object. We should probably change the error message to {{Unable to change partition or table. Object does not exist: + e.getMessage()}}

> Misleading error message in alter table validation
> --------------------------------------------------
>
>                 Key: HIVE-18852
>                 URL: https://issues.apache.org/jira/browse/HIVE-18852
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 2.4.0
>            Reporter: Dan Burkert
>            Priority: Major
>
> The metastore's validation error message when attempting to rename a table to a non-existent database is wrong.  For instance, attempting to alter table 'db.table' to 'non_existent_database.table' results in the Thrift error:
> {{TException - service has thrown: InvalidOperationException(message=Unable to change partition or table. Database db does not exist Check metastore logs for detailed stack.non_existent_database)}}
> I believe the offending line of code is [here|https://github.com/apache/hive/blob/branch-2/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java?utf8=%E2%9C%93#L331-L333], notice that {{dbname}} is used in the message, not {{newDbName}}.  I don't know if switching that would cause the case of a non-existing {{dbname}} case to regress, though.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)