@Override
  public int execute() throws HiveException, IOException {
    WMPool pool = new WMPool(desc.getResourcePlanName(), desc.getPoolPath());
    pool.setAllocFraction(desc.getAllocFraction());
    pool.setQueryParallelism(desc.getQueryParallelism());
    if (desc.getSchedulingPolicy() != null) {
      if (!MetaStoreUtils.isValidSchedulingPolicy(desc.getSchedulingPolicy())) {
        throw new SemanticException("Invalid scheduling policy " + desc.getSchedulingPolicy());
      }
      pool.setSchedulingPolicy(desc.getSchedulingPolicy());
    }

    context.getDb().createWMPool(pool);

    return 0;
  }
Operation process of creating a workload management pool.
ql/src/java/org/apache/hadoop/hive/ql/ddl/workloadmanagement/pool/create/CreateWMPoolOperation.java