You need to enable JavaScript to run this app.
导航

Hive3 使用注意事项

最近更新时间2024.04.19 15:26:09

首次发布时间2024.04.19 15:26:09

1. 开启 Ranger 不支持 DFS 命令

如果 Hive 开通了 Ranger ,无法使用 !dfs 命令,参考官网链接

2. Casting timestamps

Hive3 对时间类型做了大幅修改,cast 函数的行为和 Hive2 有差别。例如,1706859973123 是北京时间 2024-02-02 15:46:13。在 Hive3 ,行为是:

hive> select cast(1706859973123 as timestamp);
OK
2024-02-02 07:46:13.123

在 Hive3 ,推荐使用 from_utc_timestampto_utc_timestamp
参考官网:Different TIMESTAMP typesHive UDFs