Created 08-22-2017 07:33 AM
i am unable to understand the difference between drop and replace in alter table of hive, can any body give the info what it mean exactly. ( even though drop exists why people are using replace to drop the column)
Created 08-22-2017 01:54 PM
Drop column actually does not exist at the moment ... it is an open JIRA in Hive https://issues.apache.org/jira/browse/HIVE-15984
If implemented and closed, it would allow you to drop a column in a very direct syntax.
At the moment, to drop a column you have to do the less direct syntax of REPLACE all existing columns with a subset of those columns.
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Add/ReplaceCol...
https://community.hortonworks.com/questions/17884/replace-column-to-hive.html