You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by Apache Wiki <wi...@apache.org> on 2010/08/02 20:10:34 UTC

[Hadoop Wiki] Update of "Hive/LanguageManual/DDL" by KaushikIyer

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "Hive/LanguageManual/DDL" page has been changed by KaushikIyer.
The comment on this change is: Add information regarding dropping columns through use of replace..
http://wiki.apache.org/hadoop/Hive/LanguageManual/DDL?action=diff&rev1=69&rev2=70

--------------------------------------------------

  }}}
  ADD COLUMNS lets you add new columns to the end of the existing columns but before the partition columns.
  
- REPLACE COLUMNS removes all existing columns and adds the new set of columns. This can be done only for tables with native serde (DynamicSerDe or MetadataTypedColumnsetSerDe). Refer to SerDe section of User Guide for more information.
+ REPLACE COLUMNS removes all existing columns and adds the new set of columns. This can be done only for tables with native serde (DynamicSerDe or MetadataTypedColumnsetSerDe). Refer to SerDe section of User Guide for more information. REPLACE COLUMNS can also be used to drop columns. For example:
+ 
+ "ALTER TABLE test_change (a int, b int);" will remove column `c' from test_change's schema. Note that this does not delete underlying data, it just changes the schema.
  
  === Alter Table Properties ===
  {{{