zoukankan      html  css  js  c++  java
  • hive中内置函数

    查看函数的详细使用方法

    desc function extended 函数名

    例如:

    1).desc function extended locate

    locate(substr, str[, pos]) - Returns the position of the first occurance of substr in str after position pos

    返回第一次出现在字符串str的子串substr的位置,从位置pos开始。 substr不在str中,则返回0。

    Example:
    > SELECT locate('bar', 'foobarbar', 5) FROM src LIMIT 1;
    7

    2).desc function extended least

    least(v1, v2, ...) - Returns the least value in a list of values

    返回列表中的最小值,与GREATEST()函数相反
    Example:
    > SELECT least(2, 3, 1) FROM src LIMIT 1;
    1

    3)desc function extended regexp

    str regexp regexp - Returns true if str matches regexp and false otherwise
    Synonyms: rlike

    匹配,匹配的上返回true,匹配不上返回false
    Example:
    > SELECT 'fb' regexp '.*' FROM src LIMIT 1;
    true

  • 相关阅读:
    chrome:禁用缓存
    datatables:如何禁用一列的排序
    springboot:集成fastjson(教训)
    eclipse:显示堆内存
    模板, 保存&发布
    动画
    配色
    图示 Smart-Art
    常用快捷键 & BLOG & Website
    图表
  • 原文地址:https://www.cnblogs.com/dcx-1993/p/10762624.html
Copyright © 2011-2022 走看看