用户登录
用户注册

分享至

hive group by 语法增强

  • 作者: 三星专卖14399448
  • 来源: 51数据库
  • 2022-08-17
需要在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>
软件
前端设计
程序设计
Java相关