@Override
  public int execute() throws HiveException, IOException {
    WMNullableResourcePlan resourcePlan = new WMNullableResourcePlan();
    resourcePlan.setStatus(desc.isActivate() ? WMResourcePlanStatus.ACTIVE : WMResourcePlanStatus.ENABLED);

    boolean canActivateDisabled = desc.isEnable() && desc.isActivate() && !desc.isReplace();
    WMFullResourcePlan appliedResourcePlan = context.getDb().alterResourcePlan(desc.getResourcePlanName(), resourcePlan,
        canActivateDisabled, false, desc.isReplace());

    handleWMServiceChangeIfNeeded(appliedResourcePlan, desc.isActivate(), false, desc.isReplace());
    return 0;
  }
Operation process of enabling a resource plan.
ql/src/java/org/apache/hadoop/hive/ql/ddl/workloadmanagement/resourceplan/alter/enable/AlterResourcePlanEnableOperation.java