hive group by 语法增强

2015-01-05 0 686
hive group by 语法增强
需要在hive-site.xml配置文件中添加如下内容才能使用group by 语法增强,group by除了可以跟column alias,也可以跟column position,比如:select f1(col1), f2(col2), f3(col3), count(1) group by f1(col1), f2(col2), f3(col3);可以写成select f1(col1), f2(col2), f3(col3), count(1) group by 1, 2, 3;

<property>
  <name>hive.groupby.orderby.position.alias</name>
  <value>true</value>
  <description>Whether to enable using Column Position Alias in Group By or Order By</description>
</property>

遇见资源网 sql hive group by 语法增强 http://www.ox520.com/17433.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务