码迷,mamicode.com
首页 > 其他好文 > 详细

hive表命名规范 源码规则

时间:2018-08-02 19:14:09      阅读:1887      评论:0      收藏:0      [点我收藏+]

标签:规范   meta   numbers   ring   lse   rman   str   att   check   

tablename 进来前已经把"`","."等过滤掉了,所以就是单词字符喽 \w搞定 \w包含_ 哈哈

/**
   * validateName
   *
   * Checks the name conforms to our standars which are: "[a-zA-z_0-9]+". checks
   * this is just characters and numbers and _
   *
   * @param name
   *          the name to validate
   * @return true or false depending on conformance
   * @exception MetaException
   *              if it doesn‘t match the pattern.
   */
  static public boolean validateName(String name) {
    Pattern tpat = Pattern.compile("[\\w_]+");
    Matcher m = tpat.matcher(name);
    if (m.matches()) {
      return true;
    }
    return false;
  }

hive表命名规范 源码规则

标签:规范   meta   numbers   ring   lse   rman   str   att   check   

原文地址:https://www.cnblogs.com/jiangxiaoxian/p/9408954.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!