public static boolean validateName(String name, Configuration conf) {
    Pattern tpat;
    StringBuilder allowedSpecialCharacters = new StringBuilder();
    if (conf != null
        && MetastoreConf.getBoolVar(conf,
        MetastoreConf.ConfVars.SUPPORT_SPECICAL_CHARACTERS_IN_TABLE_NAMES)) {
      for (Character c : SPECIAL_CHARACTERS_IN_TABLE_NAMES) {
        allowedSpecialCharacters.append(c);
      }
    }
    tpat = Pattern.compile("[\\w" + Pattern.quote(allowedSpecialCharacters.toString()) + "]+");
    Matcher m = tpat.matcher(name);
    return m.matches();
  }
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
@param conf
         hive configuration
@return true or false depending on conformance
             if it doesn't match the pattern.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java