0
votes

I came across a bizarre Impala behaviour. I've create a table in HUE from a .csv file I've copied into the Hadoop cluster. I can correctly navigate the table in HUE via the Metastore Manager but I can't run the following query in Impala, as it throws an IllegalStateException: null exception:

select * 
from my_db.my_table
limit 100;

The strange thing is that the following command retrieve the correct number of rows:

select 
  count(*)
from my_db.my_table;
2
Try REFRESH [db_name.]table_name and if it dint work try out the INVALIDATE METADATA [[db_name.]table_name]K S Nidhin
I did invalidate metadata already, as without doing it I couldn't even query the table in Impala. I've tried to refresh too but it didn't help.Gianluca
try it without the limit 100Jared
If I removethe limit 100 I get the same IllegalStateException: null error message.Gianluca

2 Answers

4
votes

The error is caused by invalid types. Not all hive data types are supported in impala. Impala has a timestamp and no date type. When your table has date type it will show as invalid_type in impala when described and impala cannot select this data type. For solution try changing the column to timestamp

Describe <table name>;

  | invalid_type |         |
  | invalid_type |         |
0
votes

I'm getting the exact same issue. I changed the query to select each column from the table individually (i.e. select col1, col2, col3...etc.) and found that Impala didn't like a date datatype column. Changing it to timestamp fixed the issue and I can now do a select * from the table.