hive tricks

(原创)

hive的一些小问题

  •  处理数据内含分号的 ; ,要用 '73' 代替
  • hive 9146 bug(新版本已修复),关联条件的顺序不一样:

           ... on (A) and (B)  和 ... on (B) and (A)  竟然导致不一样的结果,

           详情见 https://issues.apache.org/jira/browse/HIVE-9146 。

  • hive 取默认字段 `_c1`
  • hive正则转义 用两个,如 \d
  • mapjoin优化,用于关联时有小表,小表放到内存里,select /*+ MAPJOIN(small_tb)  */  ... 
原文地址:https://www.cnblogs.com/randomstring/p/10426235.html