Reply
Highlighted
Explorer
Posts: 16
Registered: ‎12-07-2014

Adding a column to an existed Hive external table will show NULL values

[ Edited ]

I have several parquet files on S3, which has three fields, user, reques,  timestamp

 

Case 1:

 

Create the external table then add partitions to it, eveything is fine

 

Case 2:

 

Create the external table without the field request, then add the `request` field by running the SQL "ALTER TABLE test ADD COLUMNS (request STRING);",  and finally add partitions to it.  Under this situation, all `request` will have NULL values

 

Can some one tell me why?