Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Presto failed: com.facebook.presto.spi.type.VarcharType

Tags:

hive

presto

I created a table with three columns - id, name, position, then I stored the data into s3 using orc format using spark.

When I query select * from person it returns everything.

But when I query from presto, I get this error:

Query 20180919_151814_00019_33f5d failed: com.facebook.presto.spi.type.VarcharType
like image 457
Abdulhafeth Sartawi Avatar asked Sep 20 '18 06:09

Abdulhafeth Sartawi


1 Answers

I have found the answer for the problem, when I stored the data in s3, the data inside the file was with one more column that was not defined in the hive table metastore.

So when Presto tried to query the data, it found that there are varchar instead of integer.

This also might happen if one record has a a type different than what is defined in the metastore.

I had to delete my data and import it again without that extra unneeded column

like image 167
Abdulhafeth Sartawi Avatar answered Oct 17 '22 07:10

Abdulhafeth Sartawi