Code review comment: Suggest to use `getCatalogOrException()`. But should consider that if this is a replay thread, should ignore this exception if catalog does not exist. Same suggest for other exception logic in this method.

Code under review:
private void setExternalTableAutoAnalyze(Map<String, String> properties, ModifyTablePropertyOperationLog info) {
        if (properties.size() != 1) {
            LOG.warn("External table property should contain exactly 1 entry.");
        }
        if (!properties.containsKey(PropertyAnalyzer.PROPERTIES_AUTO_ANALYZE_POLICY)) {
            LOG.warn("External table property should only contain auto_analyze_policy");
        }
        String value = properties.get(PropertyAnalyzer.PROPERTIES_AUTO_ANALYZE_POLICY);
        if (!PropertyAnalyzer.ENABLE_AUTO_ANALYZE_POLICY.equalsIgnoreCase(value)
                && !PropertyAnalyzer.DISABLE_AUTO_ANALYZE_POLICY.equalsIgnoreCase(value)
                && !PropertyAnalyzer.USE_CATALOG_AUTO_ANALYZE_POLICY.equalsIgnoreCase(value)) {
            LOG.warn("External table property should be 'enable', 'disable' or 'base_on_catalog'");
            return;
        }
        try {
            CatalogIf catalog = Env.getCurrentEnv().getCatalogMgr().getCatalog(info.getCtlName());
            value = value.equalsIgnoreCase(PropertyAnalyzer.USE_CATALOG_AUTO_ANALYZE_POLICY) ? null : value;
            ((ExternalCatalog) catalog).setAutoAnalyzePolicy(info.getDbName(), info.getTableName(), value);
        } catch (Exception e) {
            LOG.warn("Failed to replay external table set property.", e);
        }
    }

Line commented on: CatalogIf catalog = Env.getCurrentEnv().getCatalogMgr().getCatalog(info.getCtlName());

Revised code:
private void setExternalTableAutoAnalyze(Map<String, String> properties, ModifyTablePropertyOperationLog info) {
        if (properties.size() != 1) {
            LOG.warn("External table property should contain exactly 1 entry.");
            return;
        }
        if (!properties.containsKey(PropertyAnalyzer.PROPERTIES_AUTO_ANALYZE_POLICY)) {
            LOG.warn("External table property should only contain auto_analyze_policy");
            return;
        }
        String value = properties.get(PropertyAnalyzer.PROPERTIES_AUTO_ANALYZE_POLICY);
        if (!PropertyAnalyzer.ENABLE_AUTO_ANALYZE_POLICY.equalsIgnoreCase(value)
                && !PropertyAnalyzer.DISABLE_AUTO_ANALYZE_POLICY.equalsIgnoreCase(value)
                && !PropertyAnalyzer.USE_CATALOG_AUTO_ANALYZE_POLICY.equalsIgnoreCase(value)) {
            LOG.warn("External table property should be 'enable', 'disable' or 'base_on_catalog'");
            return;
        }
        try {
            CatalogIf catalog = Env.getCurrentEnv().getCatalogMgr()
                    .getCatalogOrException(info.getCtlName(),
                        ctlName -> new DdlException("Unknown catalog " + ctlName));
            value = value.equalsIgnoreCase(PropertyAnalyzer.USE_CATALOG_AUTO_ANALYZE_POLICY) ? null : value;
            ((ExternalCatalog) catalog).setAutoAnalyzePolicy(info.getDbName(), info.getTableName(), value);
        } catch (Exception e) {
            LOG.warn("Failed to replay external table set property.", e);
        }
    }