user3752667
user3752667

Reputation:

Can we have null value for BIGINT column in HIVE

I have a question , probably a basic one . I would like to give null value to a column whose data type BIGINT . Is that possible?

Upvotes: 2

Views: 8159

Answers (2)

leftjoin
leftjoin

Reputation: 38325

Yes it's possible and easy to check:

  1. hive> create table test_null_bigint(col bigint);
  2. insert into table test_null_bigint values(null);
  3. hive> select * from test_null_bigint;

OK

NULL

Time taken: 21.556 seconds, Fetched: 1 row(s)

Upvotes: 2

Jerod Johnson
Jerod Johnson

Reputation: 784

According to the Apache Hive documentation, you should be able to simply leave the value empty.:

Missing values are represented by the special value NULL.

Have you tried anything yet? Are you running into any issues?

Upvotes: 0

Related Questions