org.teiid.query.processor.relational
Class DependentAccessNode

java.lang.Object
  extended by org.teiid.query.processor.relational.RelationalNode
      extended by org.teiid.query.processor.relational.SubqueryAwareRelationalNode
          extended by org.teiid.query.processor.relational.AccessNode
              extended by org.teiid.query.processor.relational.DependentAccessNode
All Implemented Interfaces:
java.lang.Cloneable, BatchCollector.BatchProducer

public class DependentAccessNode
extends AccessNode

Takes a query with 1 or more dependent sets from 1 or more sources and creates a series of commands. Dependent sets from the same source are treated as a special case. If there are multiple batches from that source, we will create replacement criteria in lock step - rather than forming the full cartesian product space. This implementation assumes that ordering will be respected above the access node and that the incoming dependent tuple values are already sorted.


Field Summary
 
Fields inherited from class org.teiid.query.processor.relational.AccessNode
nextCommand
 
Constructor Summary
DependentAccessNode(int nodeID)
           
 
Method Summary
 java.lang.Object clone()
          All the implementation of Cloneable interface need to implement clone() method.
 void closeDirect()
           
 int getMaxPredicates()
           
 int getMaxSetSize()
           
protected  boolean hasNextCommand()
           
protected  Command initialCommand()
           
protected  Command nextCommand()
           
protected  boolean prepareNextCommand(Command atomicCommand)
           
 void reset()
           
 void setMaxPredicates(int maxPredicates)
           
 void setMaxSetSize(int maxSize)
           
 
Methods inherited from class org.teiid.query.processor.relational.AccessNode
copy, getCommand, getConnectorBindingId, getDescriptionProperties, getModelName, getNodeString, initialize, nextBatchDirect, open, processCommandsIndividually, setCommand, setConnectorBindingId, setModelName, setShouldEvaluateExpressions
 
Methods inherited from class org.teiid.query.processor.relational.SubqueryAwareRelationalNode
getEvaluator, setReferenceValues
 
Methods inherited from class org.teiid.query.processor.relational.RelationalNode
addBatchRow, addChild, close, copy, createLookupMap, getBatchSize, getBufferManager, getChildren, getClassName, getConnectionID, getContext, getDataManager, getElements, getEstimateNodeCardinality, getFinalBuffer, getID, getNodeStatistics, getOutputElements, getParent, getProjectionIndexes, hasFinalBuffer, hasPendingRows, isBatchFull, isClosed, isLastBatch, nextBatch, nodeToString, projectTuple, pullBatch, setContext, 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

DependentAccessNode

public DependentAccessNode(int nodeID)
Method Detail

closeDirect

public void closeDirect()
Overrides:
closeDirect in class AccessNode
See Also:
RelationalNode.close()

reset

public void reset()
Overrides:
reset in class AccessNode

initialCommand

protected Command initialCommand()
                          throws TeiidProcessingException,
                                 TeiidComponentException
Overrides:
initialCommand in class AccessNode
Throws:
TeiidProcessingException
TeiidComponentException

nextCommand

protected Command nextCommand()
Overrides:
nextCommand in class AccessNode

clone

public java.lang.Object clone()
Description copied from class: RelationalNode
All the implementation of Cloneable interface need to implement clone() method. The plan is only clonable in the pre-execution stage, not the execution state (things like program state, result sets, etc). It's only safe to call that method in between query processings, in other words, it's only safe to call clone() on a plan after nextTuple() returns null, meaning the plan has finished processing.

Overrides:
clone in class AccessNode

getMaxSetSize

public int getMaxSetSize()
Returns:
Returns the maxSize.

getMaxPredicates

public int getMaxPredicates()

setMaxPredicates

public void setMaxPredicates(int maxPredicates)

setMaxSetSize

public void setMaxSetSize(int maxSize)
Parameters:
maxSize - The maxSize to set.

prepareNextCommand

protected boolean prepareNextCommand(Command atomicCommand)
                              throws TeiidComponentException,
                                     TeiidProcessingException
Overrides:
prepareNextCommand in class AccessNode
Throws:
TeiidComponentException
TeiidProcessingException
See Also:
AccessNode.prepareNextCommand(org.teiid.query.sql.lang.Command)

hasNextCommand

protected boolean hasNextCommand()
Overrides:
hasNextCommand in class AccessNode
See Also:
AccessNode.hasNextCommand()


Copyright © 2011. All Rights Reserved.