com.metamatrix.query.optimizer
Class QueryOptimizer

java.lang.Object
  extended by com.metamatrix.query.optimizer.QueryOptimizer

public class QueryOptimizer
extends java.lang.Object

This Class produces a ProcessorPlan object (a plan for query execution) from a user's command and a source of metadata.

The user's Command object may in fact be a tree of commands and subcommands. This component is architected to defer to the proper CommandPlanner implementation to plan each Command in the tree.


Method Summary
static ProcessorPlan optimizePlan(Command command, QueryMetadataInterface metadata, IDGenerator idGenerator, CapabilitiesFinder capabilitiesFinder, AnalysisRecord analysisRecord, CommandContext context)
          This method is intended only for clients with a need to have access to the planning state of QueryOptimizer, which it can get to through the CommandTreeNode reference passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

optimizePlan

public static ProcessorPlan optimizePlan(Command command,
                                         QueryMetadataInterface metadata,
                                         IDGenerator idGenerator,
                                         CapabilitiesFinder capabilitiesFinder,
                                         AnalysisRecord analysisRecord,
                                         CommandContext context)
                                  throws QueryPlannerException,
                                         QueryMetadataException,
                                         MetaMatrixComponentException

This method is intended only for clients with a need to have access to the planning state of QueryOptimizer, which it can get to through the CommandTreeNode reference passed in.

If there's no need to access the planning state, use one of the other overloaded methods, either optimizePlan or optimizePlan

Parameters:
command - fully-resolved user's command object
metadata - source of metadata
idGenerator - IDGenerator to be used for data nodes - if null, one will be created
context -
annotations - Collection to add annotations to, null if annotations should be co
debug - True if OPTION DEBUG output should be sent to analysisRecord
Returns:
ProcessorPlan plan for query execution.
Throws:
QueryPlannerException - if there is a problem planning the query plan
QueryMetadataException - if there is a problem accessing the metadata source
MetaMatrixComponentException - if there is an unexpected exception


Copyright © 2009. All Rights Reserved.