public ParseContext optimize() throws SemanticException {
    for (Transform t : transformations) {
      t.beginPerfLogging();
      pctx = t.transform(pctx);
      t.endPerfLogging(t.toString());
    }
    return pctx;
  }
Invoke all the transformations one-by-one, and alter the query plan.

@return ParseContext
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java