org.apache.derby.impl.sql.compile
Class GroupByColumn

java.lang.Object
  extended byorg.apache.derby.impl.sql.compile.QueryTreeNode
      extended byorg.apache.derby.impl.sql.compile.OrderedColumn
          extended byorg.apache.derby.impl.sql.compile.GroupByColumn
All Implemented Interfaces:
Visitable

public class GroupByColumn
extends OrderedColumn

A GroupByColumn is a column in the GROUP BY clause.

Author:
jerry

Field Summary
private  ColumnReference colRef
           
 
Fields inherited from class org.apache.derby.impl.sql.compile.OrderedColumn
columnPosition, UNMATCHEDPOSITION
 
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset
 
Constructor Summary
GroupByColumn()
           
 
Method Summary
 void bindExpression(FromList fromList, SubqueryList subqueryList, java.util.Vector aggregateVector)
          Bind this grouping column.
 java.lang.String getColumnName()
          Get the name of this column
 ColumnReference getColumnReference()
          Get the ColumnReference from this GroupByColumn.
 ResultColumn getSource()
          Get the source this GroupByColumn
 int getTableNumber()
          Get the table number for this GroupByColumn.
 void init(java.lang.Object colRef)
          Initializer.
 void printSubNodes(int depth)
          Prints the sub-nodes of this object.
 void setColumnReference(ColumnReference colRef)
          Set the ColumnReference for this GroupByColumn.
 java.lang.String toString()
          Convert this object to a String.
 
Methods inherited from class org.apache.derby.impl.sql.compile.OrderedColumn
getColumnPosition, isAscending, setColumnPosition
 
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
accept, bind, convertDefaultNode, debugFlush, debugPrint, executeSchemaName, executeStatementName, formatNodeString, foundString, generate, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getSPSName, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isSessionSchema, isSessionSchema, makeConstantAction, makeResultDescription, makeTableName, needsSavepoint, nodeHeader, optimize, parseQueryText, printLabel, referencesSessionSchema, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, treePrint, treePrint, verifyClassExist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

colRef

private ColumnReference colRef
Constructor Detail

GroupByColumn

public GroupByColumn()
Method Detail

init

public void init(java.lang.Object colRef)
Initializer.

Overrides:
init in class QueryTreeNode
Parameters:
colRef - The ColumnReference for the grouping column

toString

public java.lang.String toString()
Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.

Overrides:
toString in class OrderedColumn
Returns:
This object as a String

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 QueryTreeNode
Parameters:
depth - The depth of this node in the tree
Returns:
Nothing

getColumnName

public java.lang.String getColumnName()
Get the name of this column

Returns:
The name of this column

getColumnReference

public ColumnReference getColumnReference()
Get the ColumnReference from this GroupByColumn.

Returns:
ColumnReference The ColumnReference from this node.

setColumnReference

public void setColumnReference(ColumnReference colRef)
Set the ColumnReference for this GroupByColumn.

Parameters:
colRef - The new ColumnReference for this node.
Returns:
Nothing.

getTableNumber

public int getTableNumber()
Get the table number for this GroupByColumn.

Returns:
int The table number for this GroupByColumn

getSource

public ResultColumn getSource()
Get the source this GroupByColumn

Returns:
The source of this GroupByColumn

bindExpression

public void bindExpression(FromList fromList,
                           SubqueryList subqueryList,
                           java.util.Vector aggregateVector)
                    throws StandardException
Bind this grouping column.

Parameters:
fromList - The FROM list to use for binding
subqueryList - The SubqueryList we are building as we hit SubqueryNodes.
aggregateVector - The aggregate vector we build as we hit AggregateNodes.
Returns:
Nothing
Throws:
StandardException - Thrown on error


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.