private static boolean skip(HiveOperation op, BaseSemanticAnalyzer sem) throws HiveException {
    // skipping the auth check for the "CREATE DATABASE" operation if database already exists
    // we know that if the database already exists then "CREATE DATABASE" operation will fail.
    if (op == HiveOperation.CREATEDATABASE) {
      for (WriteEntity e : sem.getOutputs()) {
        if(e.getType() == Entity.Type.DATABASE && sem.getDb().databaseExists(e.getName().split(":")[1])){
          return true;
        }
      }
    }

    return false;
  }
@param command Passed so that authorization interface can provide more useful information in logs.
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/command/CommandAuthorizer.java