Reputation: 121
I have a partition TABLEA
with column datatype INT
.
Created a TABLEB
with column datatype Varchar
.
Pushed the data into TABLEB
from TABLEA
.
select * from TABLEB
with limit is working.
select * from TABLEB
failing giving below error.
select count(columnname) from TABLEB failing :
Error: java.io.IOException: java.io.IOException: java.lang.RuntimeException: java.lang.ClassCastException:org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector cannot be cast to org.apache.hadoop.hive.ql.exec.vector.LongColumnVector
Upvotes: 1
Views: 7857
Reputation: 990
When you are pushing data into TABLEB use type casting for the column. Ex:
insert into TABLEB
select
cast(columnname as string) as columnname
from TABLEA
Upvotes: 1