com.metamatrix.query.processor.relational
Class DependentProjectNode

java.lang.Object
  extended by com.metamatrix.query.processor.relational.RelationalNode
      extended by com.metamatrix.query.processor.relational.ProjectNode
          extended by com.metamatrix.query.processor.relational.DependentProjectNode
All Implemented Interfaces:
Describable, java.lang.Cloneable

public class DependentProjectNode
extends ProjectNode

A project node containing one or more scalar subqueries. These subqueries must be processed first before the ScalarSubquery expression can be evaluated and the project can proceed.


Field Summary
 
Fields inherited from interface com.metamatrix.query.processor.Describable
PROP_BINDINGS, PROP_CHILDREN, PROP_CONDITIONS, PROP_CRITERIA, PROP_DATA_COL, PROP_DEFAULT, PROP_DEFAULT_PROGRAM, PROP_ELSE, PROP_ENCODING, PROP_EXECUTION_PLAN, PROP_EXPRESSION, PROP_FORMATTED, PROP_GROUP, PROP_GROUP_COLS, PROP_IN_MEMORY, PROP_INTO_GROUP, PROP_IS_STAGING, PROP_JOIN_CRITERIA, PROP_JOIN_STRATEGY, PROP_JOIN_TYPE, PROP_MESSAGE, PROP_MODEL_NAME, PROP_NAMESPACE, PROP_NAMESPACE_DECL, PROP_NODE_COST_ESTIMATES, PROP_NODE_STATS_LIST, PROP_NODE_STATS_PROPS, PROP_OPTIONAL, PROP_OUTPUT_COLS, PROP_PROGRAM, PROP_PROGRAMS, PROP_RECURSE_DIR, PROP_REMOVE_DUPS, PROP_RESULT_SET, PROP_ROW_LIMIT, PROP_ROW_OFFSET, PROP_SELECT_COLS, PROP_SORT_COLS, PROP_SQL, PROP_TAG, PROP_THEN, PROP_TYPE, PROP_VARIABLE
 
Constructor Summary
DependentProjectNode(int nodeID)
           
 
Method Summary
 java.lang.Object clone()
          Returns a deep clone
 void close()
          Closes the subquery processor (which removes the temporary tuple sources of the subquery results)
 java.util.List getChildPlans()
          Find all ProcessorPlans used by this node.
 java.util.Map getDescriptionProperties()
          Get a description as a set of properties of primitive types such as String, Integer, etc.
 void open()
          Calls super.open(), then initializes subquery processor
protected  void prepareToProcessTuple(java.util.Map elementMap, java.util.List currentTuple)
          This subclass will execute any subqueries which the projection is dependent on; if any subqueries are correlated, this class will use the current tuple to execute correlated subqueries
 void reset()
           
 void setCorrelatedReferences(java.util.List correlatedReferences)
          Set List of References needing to be updated with each outer tuple
 void setPlansAndValueProviders(java.util.List subqueryProcessorPlans, java.util.List valueIteratorProviders)
           
 
Methods inherited from class com.metamatrix.query.processor.relational.ProjectNode
copy, getNodeString, getSelectSymbols, nextBatchDirect, setSelectSymbols
 
Methods inherited from class com.metamatrix.query.processor.relational.RelationalNode
addBatchRow, addChild, copy, createLookupMap, getBatchSize, getBufferManager, getChildDescriptionProperties, getChildren, getClassName, getConnectionID, getContext, getDataManager, getElements, getEstimateNodeCardinality, getID, getNodeStatistics, getParent, initialize, isBatchFull, isClosed, nextBatch, nodeToString, projectTuple, pullBatch, setElements, setEstimateDepAccessCardinality, setEstimateDepJoinCost, setEstimateJoinCost, setEstimateNodeCardinality, setEstimateNodeSetSize, setID, setParent, terminateBatches, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DependentProjectNode

public DependentProjectNode(int nodeID)
Parameters:
nodeID -
Method Detail

setPlansAndValueProviders

public void setPlansAndValueProviders(java.util.List subqueryProcessorPlans,
                                      java.util.List valueIteratorProviders)

setCorrelatedReferences

public void setCorrelatedReferences(java.util.List correlatedReferences)
Set List of References needing to be updated with each outer tuple

Parameters:
correlatedReferences - List correlated reference to outer query

reset

public void reset()
Overrides:
reset in class ProjectNode

open

public void open()
          throws MetaMatrixComponentException,
                 MetaMatrixProcessingException
Calls super.open(), then initializes subquery processor

Overrides:
open in class ProjectNode
Throws:
MetaMatrixComponentException
MetaMatrixProcessingException

close

public void close()
           throws MetaMatrixComponentException
Closes the subquery processor (which removes the temporary tuple sources of the subquery results)

Overrides:
close in class RelationalNode
Throws:
MetaMatrixComponentException
See Also:
RelationalNode.close()

prepareToProcessTuple

protected void prepareToProcessTuple(java.util.Map elementMap,
                                     java.util.List currentTuple)
                              throws BlockedException,
                                     MetaMatrixComponentException,
                                     MetaMatrixProcessingException
This subclass will execute any subqueries which the projection is dependent on; if any subqueries are correlated, this class will use the current tuple to execute correlated subqueries

Overrides:
prepareToProcessTuple in class ProjectNode
Parameters:
elementMap - Map of ElementSymbol elements to Integer indices into the currentTuple parameter
currentTuple - the current tuple about to be processed by this node
Throws:
MetaMatrixProcessingException - for exception due to user input or modeling
BlockedException
MetaMatrixComponentException
See Also:
ProjectNode.prepareToProcessTuple(java.util.Map, java.util.List)

clone

public java.lang.Object clone()
Returns a deep clone

Overrides:
clone in class ProjectNode
Returns:
deep clone of this object
See Also:
Object.clone()

getDescriptionProperties

public java.util.Map getDescriptionProperties()
Description copied from interface: Describable
Get a description as a set of properties of primitive types such as String, Integer, etc.

Specified by:
getDescriptionProperties in interface Describable
Overrides:
getDescriptionProperties in class ProjectNode
Returns:
Map of properties

getChildPlans

public java.util.List getChildPlans()
Description copied from class: RelationalNode
Find all ProcessorPlans used by this node. If no plans are used, null may be returned. The default implementation will return null.

Overrides:
getChildPlans in class RelationalNode
Returns:
List of ProcessorPlan or null if none
Since:
4.2
See Also:
com.metamatrix.query.processor.relational.RelationalNode#getSubPlans()


Copyright © 2009. All Rights Reserved.