2.impala支持的math和聚合计算函数

impala 用法同hive

 

 

 

Aggregate 聚合函数

  • appx_median([DISTINCT|ALL] T col)
  • avg([DISTINCT|ALL] col)
  • count([DISTINCT|ALL] col)
  • group_concat([ALL] col [, separator])
  • max([DISTINCT | ALL] T col)
  • min([DISTINCT | ALL] T col)
  • ndv([DISTINCT | ALL] col)
  • stddev([DISTINCT | ALL] col) 返回组中数字列的标准偏差
  • stddev_pop([DISTINCT | ALL] col) 返回组中数字列的总体标准偏差
  • stddev_samp([DISTINCT | ALL] col) 返回组中数字列的无偏样本标准差
  • sum([DISTINCT | ALL] col)
  • variance([DISTINCT | ALL] col) 一个聚合函数,返回一组数字的方差。这是一个数学性质,表示值与平均值之间的距离差。返回值可以为零(如果输入为单个值或一组相同的值),否则为正数
  • variance_pop([DISTINCT | ALL] col) 返回组中数字列的总体标准偏差
  • variance_samp([DISTINCT | ALL] col) 返回组中数字列的无偏样本标准差
  • var_pop(col) 返回组中数字列的方差
  • var_samp(col) 返回组中数字列的无偏样本方差

 

 

 

 

Mathematical 数学计算函数

  • abs(T a)
  • acos(DOUBLE a)
  • asin(DOUBLE a)
  • atan(DOUBLE a)
  • atan2(DOUBLE a, DOUBLE b)
  • bin(BIGINT a)
  • ceil(T a)
  • ceiling(T a)
  • conv(T a, INT from_base, INT to_base)
  • cos(DOUBLE a)
  • cosh(DOUBLE a)
  • cot(DOUBLE a)
  • dceil(T a)
  • degrees(DOUBLE a)
  • dexp(DOUBLE a)
  • dfloor(T a)
  • dlog1(DOUBLE a)
  • dpow(DOUBLE a, DOUBLE p)
  • dround(DOUBLE a [, INT d]), round(DECIMAL val, INT d)
  • dsqrt(DOUBLE a)
  • dtrunc(T a, [NUMBER b])
  • e()
  • exp(DOUBLE a)
  • factorial(T a)
  • floor(T a)
  • fmod(DOUBLE a, DOUBLE b), fmod(FLOAT a, FLOAT b)
  • fpow(DOUBLE a, DOUBLE p)
  • fnv_hash(T a)
  • greatest(T a1, T a2, ...)
  • hex(T a)
  • is_inf(DOUBLE a)
  • is_nan(DOUBLE A)
  • least(T a1, T a2, ...)
  • ln(DOUBLE a)
  • log(DOUBLE base, DOUBLE a)
  • log10(DOUBLE a)
  • log2(DOUBLE a)
  • max_bigint()
  • max_int()
  • max_smallint()
  • max_tinyint()
  • min_bigint()
  • min_int()
  • min_smallint()
  • min_tinyint()
  • mod(T a, T b)
  • murmur_hash(T a)
  • negative(T a)
  • pi()
  • pmod(T a, T b)
  • positive(T a)
  • pow(DOUBLE a, DOUBLE p)
  • power(DOUBLE a, DOUBLE p)
  • precision(numeric_expression)
  • quotient(BIGINT numerator, BIGINT denominator), quotient(DOUBLE numerator, DOUBLE denominator)
  • radians(DOUBLE a)
  • rand([INT seed])
  • random([INT seed])
  • round(DOUBLE a [, INT d]), round(DECIMAL val, INT d)
  • scale(numeric_expression)
  • sign(DOUBLE a)
  • sin(DOUBLE a)
  • sinh(DOUBLE a)
  • sqrt(DOUBLE a)
  • tan(DOUBLE a)
  • tanh(DOUBLE a)
  • trunc(T a, [NUMBER b])
  • truncate(T a, [NUMBER b])
  • unhex(STRING a)
  • width_bucket(DECIMAL expr, DECIMAL min_value, DECIMAL 

 

 

你可能感兴趣的