private static boolean isReadOnlyOperation(HiveOperation hiveOperation) {
    switch (hiveOperation) {
    case EXPLAIN:
    case SWITCHDATABASE:
    case REPLDUMP:
    case REPLSTATUS:
    case EXPORT:
    case KILL_QUERY:
      return true;
    }
    if (Sets.newHashSet("SHOW", "DESC").stream().anyMatch(hiveOperation.name()::startsWith)) {
      return true;
    }
    return false;
  }
Checks whether it's an ALTERDATABASE statement without {"readonly":"true"} property.
1. The properties are removed.
2. "readonly" is removed from the properties.
3. "readonly" becomes non-true value.
ql/src/java/org/apache/hadoop/hive/ql/hooks/EnforceReadOnlyDatabaseHook.java