Command newCommand = QueryParser.getQueryParser().parseCommand(query, parseInfo);
QueryResolver.resolveCommand(newCommand, metadata);
List<Reference> references = ReferenceCollectorVisitor.getReferences(newCommand);
AbstractValidationVisitor visitor = new ValidationVisitor();
Request.validateWithVisitor(visitor, metadata, newCommand);
Determinism determinismLevel = copy.resetDeterminismLevel();
newCommand = QueryRewriter.rewrite(newCommand, metadata, copy);
AnalysisRecord record = new AnalysisRecord(false, false);
ProcessorPlan plan = QueryOptimizer.optimizePlan(newCommand, metadata, idGenerator, finder, record, copy);