hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prasanth Jayachandran <pjayachand...@hortonworks.com>
Subject Re: the column names removed after insert select
Date Fri, 23 Oct 2015 14:50:58 GMT
Hi

This has been fixed recently https://issues.apache.org/jira/browse/HIVE-4243

This used to be a problem with the way hive writes rows out. The ObjectInspectors sent out
by hive’s filesink operator contains internal column names and not the names of the destination
table. 

From the record reader’s perspective, the column names doesn’t really matter and column
projections uses the column ids instead of names.

Thanks
Prasanth

> On Oct 23, 2015, at 12:25 AM, patcharee <Patcharee.Thongtra@uni.no> wrote:
> 
> Hi
> 
> I inserted a table from select (insert into table newtable select date, 
> hh, x, y from oldtable). After the insert the column names of the table 
> have been removed, see the output below when I use hive --orcfiledump
> 
> - Type: struct<_col0:int,_col1:int,_col2:int,_col3:int>
> 
> while it is supposed to be
> 
> - Type: struct<date:int,hh:int,x:int,y:int>
> 
> Any ideas how this happened and how I can fix it. Please suggest me.
> 
> BR,
> Patcharee
> 

Mime
View raw message