How do we alter the datatype of multiple columns in Hive ?
CREATE TABLE test_change (a int, b int, c int);
ALTER TABLE test_change CHANGE a a string b b doube c c decimal(11,2);
How do we alter the datatype of multiple columns in Hive ?
CREATE TABLE test_change (a int, b int, c int);
ALTER TABLE test_change CHANGE a a string b b doube c c decimal(11,2);
As far as I know, you can't. In the Hive documentation you can find the following:
The documentation is speaking about "a column". The alternative would be to write multiple queries, one for each datatype you have to change.
Reference: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL