com.akiban.sql.parser
Class DistinctNode

java.lang.Object
  extended by com.akiban.sql.parser.QueryTreeNode
      extended by com.akiban.sql.parser.ResultSetNode
          extended by com.akiban.sql.parser.FromTable
              extended by com.akiban.sql.parser.DistinctNode
All Implemented Interfaces:
Visitable

public class DistinctNode
extends FromTable

A DistinctNode represents a result set for a disinct operation on a select. It has the same description as its input result set. For the most part, it simply delegates operations to its childResultSet, which is currently expected to be a ProjectRestrictResultSet generated for a SelectNode. NOTE: A DistinctNode extends FromTable since it can exist in a FromList.


Field Summary
 
Fields inherited from class com.akiban.sql.parser.FromTable
correlationName, origTableName, tableProperties
 
Fields inherited from class com.akiban.sql.parser.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
 
Constructor Summary
DistinctNode()
           
 
Method Summary
 void copyFrom(QueryTreeNode node)
          Fill this node with a deep copy of the given node.
 ResultSetNode getChildResult()
          Return the childResult from this node.
 void init(Object childResult, Object tableProperties)
          Initialilzer for a SingleChildResultSetNode.
 void init(Object childResult, Object inSortedOrder, Object tableProperties)
          Initializer for a DistinctNode.
 void printSubNodes(int depth)
          Prints the sub-nodes of this object.
 
Methods inherited from class com.akiban.sql.parser.FromTable
getCorrelationName, getExposedName, getOrigTableName, getTableName, setCorrelationName, setOrigTableName, toString
 
Methods inherited from class com.akiban.sql.parser.ResultSetNode
getResultColumns, setInsertSource, setResultColumns
 
Methods inherited from class com.akiban.sql.parser.QueryTreeNode
accept, convertDefaultNode, debugFlush, debugPrint, formatNodeString, getBeginOffset, getDebugOutput, getEndOffset, getNodeFactory, getNodeType, getNullNode, getParserContext, getStatementType, getUserData, init, init, init, init, init, init, init, init, init, init, init, init, isInstanceOf, makeTableName, makeTableName, nodeHeader, printLabel, setBeginOffset, setDebugOutput, setEndOffset, setNodeType, setParserContext, setUserData, stackPrint, treePrint, treePrint, treePrint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DistinctNode

public DistinctNode()
Method Detail

init

public void init(Object childResult,
                 Object inSortedOrder,
                 Object tableProperties)
          throws StandardException
Initializer for a DistinctNode.

Overrides:
init in class QueryTreeNode
Parameters:
childResult - The child ResultSetNode
inSortedOrder - Whether or not the child ResultSetNode returns its output in sorted order.
tableProperties - Properties list associated with the table
Throws:
StandardException - Thrown on error

copyFrom

public void copyFrom(QueryTreeNode node)
              throws StandardException
Fill this node with a deep copy of the given node.

Throws:
StandardException

init

public void init(Object childResult,
                 Object tableProperties)
Initialilzer for a SingleChildResultSetNode.

Overrides:
init in class FromTable
Parameters:
childResult - The child ResultSetNode
tableProperties - Properties list associated with the table

getChildResult

public ResultSetNode getChildResult()
Return the childResult from this node.

Returns:
ResultSetNode The childResult from this node.

printSubNodes

public void printSubNodes(int depth)
Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.

Overrides:
printSubNodes in class ResultSetNode
Parameters:
depth - The depth of this node in the tree


Copyright © 2013 Akiban Technologies, Inc. All rights reserved.