0
votes

In Hive on virtual Machine, I have created a table named mytable and inserted a few records.

When I execute this query:

select * from mytable order by id

I am getting an error:

Error: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row (tag=0)

Additional Information with schema,query and data is as follows,

hive> describe mytable;
OK
id  int 
name    string  
addr    string  
Time taken: 0.281 seconds

hive> select * from mytable;
OK
2   tanishq akola
1   ram kk
Time taken: 0.271 seconds

Can anyone help?

1
Add the table definition and a data sample - David דודו Markovitz
mytable(id int,name string,addr string) Data is- 1 ram kk ,2 Tanishq kk2 only 2 records. - user8167344
1) Add any additional information to your post and not as comment 2) add the output of show create table mytable - David דודו Markovitz

1 Answers

-1
votes

Easiest way to workaround this is to set hive.execution.engine to mr, this will make the query work but run slower.

Other thing to try if you haven't done so is to do a stats collection on the tables involved. You can do it by:

analyze table store_sales partition (...) compute statistics; analyze table store_sales partition (...) compute statistics for columns;

And then enable hive.stats.fetch.column.stats if its not. Then run the query with tez execution engine.