Has not been tried, the concept of being partitioned was frightened, and today tried under, very simple
Hive (default) > Desc pms.test_cross_sale_path;okcol_name data_type commentpath_id string visit_ track_id string visit_product_id bigint visit_category_id bigint visit_brand_id bigint rcmd_track_id string rcmd_product_id bigint rcmd_category_id bigint rcmd_ brand_id bigint rcmd_algorithm_id bigint cart_track_id string cart_track_time String cart_product_id bigint cart_category_id bigint cart_brand_id bigint path_ Type int path_length int path_list string session_id string gu_id string end_ user_id string ds string time taken:3.159 seconds
Two new fields in the table platform_id, TPA, type int
Hive (PMS) > ALTER TABLE Pms.test_cross_sale_path add columns (platform_id int, TPA int); Failed:parseexception line 1:12 cannot recognize input near ' PMS '. ' ' Test_cross_sale_path ' in ALTER TABLE statement
This will be problematic, the database name is not supported by default, in a different way
Hive (PMS) > Use PMS; Oktime taken:0.012 secondshive (PMS) > ALTER TABLE Test_cross_sale_path add columns (platform_id int, tPA int); Oktime ta ken:0.012 seconds
The new field is added to the end of the table, before the partition field, and both fields are NULL in the previous partition
Hive (default) > Desc pms.test_cross_sale_path;okcol_namedata_typecommentpath_idstringvisit_track_idstringvisit _product_idbigintvisit_category_idbigintvisit_brand_idbigintrcmd_track_idstringrcmd_product_idbigintrcmd_ Category_idbigintrcmd_brand_idbigintrcmd_algorithm_idbigintcart_track_idstringcart_track_timestringcart_ Product_idbigintcart_category_idbigintcart_brand_idbigintpath_typeintpath_lengthintpath_liststringsession_ Idstringgu_idstringend_user_idstringplatform_idinttpaintdsstringtime taken:3.159 seconds
[Hive] New field for hive partition table