Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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);