0
点赞
收藏
分享

微信扫一扫

Hive严格模式


严格模式

是什么:防止可能出现不好的结果

防止出现三种场景:

  1. 分区表查询中没有写where分区过滤条件
  2. orderby 中没有写limit
  3. 不允许出现笛卡尔积

hive.mapred.mode值为默认是非严格模式nonstrict 。

怎么用:

修改hive.mapred.mode值为strict,

<property>
<name>hive.mapred.mode</name>
<value>strict</value>
<description>
The mode in which the Hive operations are being performed.
In strict mode, some risky queries are not allowed to run. They include:
Cartesian Product.
No partition being picked up for a query.
Comparing bigints and strings.
Comparing bigints and doubles.
Orderby without limit.
</description>
</property>


举报

相关推荐

0 条评论