首页 > 数据库技术 > 详细

hive 中与mysql 中函数同名不同意的方法记录

时间:2017-08-05 20:53:01      阅读:270      评论:0      收藏:0      [点我收藏+]

max 函数 在hive中max函数是一个聚合函数,所以,而且返回值是double ,而且后面必须跟group by ,这个和mysql差异很大

Built-in Aggregate Functions (UDAF)

DOUBLE
max(col)
Returns the maximum value of the column in the group.

mysql 中

Returns the maximum value of expr. MAX() may take a string argument; in
such cases, it returns the maximum string value. See
http://dev.mysql.com/doc/refman/5.1/en/mysql-indexes.html. The DISTINCT
keyword can be used to find the maximum of the distinct values of expr,
however, this produces the same result as omitting DISTINCT.

MAX() returns NULL if there were no matching rows.

 

hive 中与mysql 中函数同名不同意的方法记录

原文:http://www.cnblogs.com/rocky-AGE-24/p/7291358.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!