Changes between Version 6 and Version 7 of waue/2009/0506


Ignore:
Timestamp:
May 6, 2009, 5:05:51 PM (15 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2009/0506

    v6 v7  
    2929hive> CREATE TABLE pokes (foo INT, bar STRING);
    3030}}}
    31 *
     31 * 輸出如:
    3232{{{
    3333#!sh
     
    3939hive> CREATE TABLE invites (foo INT, bar STRING) PARTITIONED BY (ds STRING);
    4040}}}
    41 *
     41 * 輸出如:
    4242{{{
    4343#!sh
     
    4949hive> SHOW TABLES;
    5050}}}
    51 *
     51 * 輸出如:
    5252{{{
    5353#!sh
     
    6060hive> DESCRIBE invites;
    6161}}}
    62 *
     62 * 輸出如:
    6363{{{
    6464#!sh
     
    7373hive> ALTER TABLE pokes ADD COLUMNS (new_col INT);
    7474}}}
    75 *
     75 * 輸出如:
    7676{{{
    7777#!sh
     
    8383hive> ALTER TABLE invites ADD COLUMNS (new_col2 INT COMMENT 'a comment');
    8484}}}
    85 *
     85 * 輸出如:
    8686{{{
    8787#!sh
     
    9494OVERWRITE INTO TABLE pokes;
    9595}}}
    96 *
     96 * 輸出如:
    9797{{{
    9898#!sh
     
    107107OVERWRITE INTO TABLE invites PARTITION (ds='2008-08-15');
    108108}}}
    109 *
     109 * 輸出如:
    110110{{{
    111111#!sh
     
    120120OVERWRITE INTO TABLE invites PARTITION (ds='2008-08-08');
    121121}}}
    122 *
     122 * 輸出如:
    123123{{{
    124124#!sh
     
    133133SELECT a.* FROM invites a;
    134134}}}
    135 *
     135 * 輸出如:
    136136{{{
    137137#!sh
     
    151151hive> select count(1) from pokes;
    152152}}}
    153 *
     153 * 輸出如:
    154154{{{
    155155#!sh
     
    181181hive> INSERT OVERWRITE DIRECTORY '/tmp/hdfs_out' SELECT a.* FROM invites a;
    182182}}}
    183 *
     183 * 輸出如:
    184184{{{
    185185#!sh
     
    199199hive>  INSERT OVERWRITE DIRECTORY '/tmp/reg_5' SELECT COUNT(1) FROM invites a;
    200200}}}
    201 *
     201 * 輸出如:
    202202{{{
    203203#!sh