protected void authorizeMetaGets(HiveOperationType opType, List<HivePrivilegeObject> inpObjs,
      String cmdString) throws HiveSQLException {
    SessionState ss = SessionState.get();
    HiveAuthzContext.Builder ctxBuilder = new HiveAuthzContext.Builder();
    ctxBuilder.setUserIpAddress(ss.getUserIpAddress());
    ctxBuilder.setForwardedAddresses(ss.getForwardedAddresses());
    ctxBuilder.setCommandString(cmdString);
    try {
      ss.getAuthorizerV2().checkPrivileges(opType, inpObjs, null,
          ctxBuilder.build());
    } catch (HiveAuthzPluginException | HiveAccessControlException e) {
      throw new HiveSQLException(e.getMessage(), e);
    }
  }
Convert a pattern containing JDBC catalog search wildcards into
Java regex patterns.

@param pattern input which may contain '%' or '_' wildcard characters, or
these characters escaped using {@link #getSearchStringEscape()}.
@return replace %/_ with regex search characters, also handle escaped
characters.

The datanucleus module expects the wildchar as '*'. The columns search on the
other hand is done locally inside the hive code and that requires the regex wildchar
format '.*'  This is driven by the datanucleusFormat flag.
service/src/java/org/apache/hive/service/cli/operation/MetadataOperation.java