hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markovitz, Dudu" <dmarkov...@paypal.com>
Subject RE: Hive error : Can not convert struct<> to <struct>
Date Tue, 28 Jun 2016 17:55:50 GMT
The staging table has no partitions, so no issue there.

Also, the error specifically refers to the covertion between the struct types.



Dudu





FAILED: SemanticException [Error 10044]: Line 2:23 Cannot insert into target table because
column number/types are different ''CA'': Cannot convert column 4 from struct<street:string,cty:string,st:string,zip:int>
to struct<street:string,city:string,state:string,zip:int>.





-----Original Message-----
From: Gopal Vijayaraghavan [mailto:gopal@hortonworks.com] On Behalf Of Gopal Vijayaraghavan
Sent: Tuesday, June 28, 2016 6:17 PM
To: user@hive.apache.org
Subject: Re: Hive error : Can not convert struct<> to <struct>



> PARTITION(state='CA')

> SELECT * WHERE se.adr.st='CA'

> FAILED: SemanticException [Error 10044]: Line 2:23 Cannot insert into

>target table because column number/types are different ''CA'':



The error is bogus, but the issue has to do with the "SELECT *".



Inserts where a partition is specified statically cannot have a partition column in the select.



So this is failing since it is trying to insert n-1 columns, because state='CA' cannot be
repeated in the SELECT.



Cheers,

Gopal









Mime
View raw message