You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Manpreet Singh (JIRA)" <ji...@apache.org> on 2019/05/06 06:56:00 UTC
[jira] [Created] (HIVE-21695) Alter partition command with database
name as prefix returns error
Manpreet Singh created HIVE-21695:
-------------------------------------
Summary: Alter partition command with database name as prefix returns error
Key: HIVE-21695
URL: https://issues.apache.org/jira/browse/HIVE-21695
Project: Hive
Issue Type: Bug
Components: HiveServer2
Reporter: Manpreet Singh
Hello Team
Observed an issue when running alter table command on partition data to change the datatype , the command returns an error[2] when the command prefixed with database name as shown below.
[1]
Alter table databasename.tablename partition (ld_yr='2018',ld_mn='12',ld_dy='27') change columnA columnA varchar(64);
[2]
Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Unable to alter partition. Alter partition operation fails: NoSuchObjectException(message:partition values=[2018, 07, 23])
The solution to resolve the error[2] is as follows.
a) if you are running queries via hive/beeline then please run command "use database" and the run the query without database name.
example :
use database;
Alter table tablename partition (ld_yr='2018',ld_mn='12',ld_dy='27') change columnA columnA varchar(64);
b) if you are running queries via hue then please select the database first from drop down and then run the query without database name.
Alter table tablename partition (ld_yr='2018',ld_mn='12',ld_dy='27') change columnA columnA varchar(64);
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)