Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Not able to Insert data into Hive table

avatar

I created hive table using following query:

 

create table students (name varchar(64), age int, gpa decimal(3, 2));

 

and inserted the data using this query:

 

insert into table students values ('fred flinstone', 445, 1.34);

 

It doesn't show any error but when i am viewing the data using

 

select * from students

 

it gives me the following error:

Error: Error while compiling statement: FAILED: NullPointerException null (state=42000,code=40000)

 

I get this same error when i am joining table in Hive. Any help? thank you

2 REPLIES 2

avatar
Expert Contributor

@analytics-shek 

From when you started facing this issue ?
Have you done any recent changes ?
Are you able to run any other query on this students table ?
can you set the below property to false in beeline session and try to rerun the query.
hive.query.results.cache.enabled to false

avatar

@balajip  Hi thank you for your answer. For the student table it is working but for the table i create using Join operation, i get the same error: 

Here is the query i used: 

CREATE TABLE testjoin as SELECT * FROM table1 t1 FULL JOIN table2 t2 ON t1.bu_id = t2.bu_id;

The table is created but when i do Select from that table: testjoin, i get the same error:

Error: Error while compiling statement: FAILED: RuntimeException java.lang.NullPointerException (state=42000,code=40000)

What could be the reason?

P.S I started having this issue since past 3 days now. Before it was working. I also reinstalled Hive but it didn't work.