简体   繁体   English

我们可以在 HIVE 中为 BIGINT 列设置空值吗

[英]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 .我想为数据类型为 BIGINT 的列赋予空值。 Is that possible?这可能吗?

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)所用时间:21.556 秒,提取:1 行

According to the Apache Hive documentation , you should be able to simply leave the value empty.:根据 Apache Hive 文档,您应该可以简单地将该值留空。:

Missing values are represented by the special value NULL.缺失值由特殊值 NULL 表示。

Have you tried anything yet?你有没有尝试过什么? Are you running into any issues?您是否遇到任何问题?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM