Home >Database >Mysql Tutorial >hive group by 语法增强

hive group by 语法增强

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 14:57:251634browse

无详细内容 无 需要在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);可以写成sel

需要在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>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn