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

  • 相关阅读:
    023 AQS--JUC的核心
    022 Future接口
    021 Callable接口
    020 线程的综合考虑
    019 线程协作
    命令,lldb,llvm,gdb,gcc,
    @class,import,
    arc,自动引用计数,
    写在哪里,
    40岁生日,
  • 原文地址:https://www.cnblogs.com/dcx-1993/p/10762624.html
Copyright © 2011-2022 走看看