zoukankan      html  css  js  c++  java
  • hive 中与mysql 中函数同名不同意的方法记录

    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.

  • 相关阅读:
    LAMP课程(3)
    LAMP课程
    vim文本编辑
    mysql常用语句
    mysql双机互相备份
    Java NIO
    适配器模式
    对象的序列化与反序列化
    字符流
    Java Socket
  • 原文地址:https://www.cnblogs.com/rocky-AGE-24/p/7291358.html
Copyright © 2011-2022 走看看