com.akiban.sql.parser
Class AggregateNode
java.lang.Object
com.akiban.sql.parser.QueryTreeNode
com.akiban.sql.parser.ValueNode
com.akiban.sql.parser.UnaryOperatorNode
com.akiban.sql.parser.AggregateNode
- All Implemented Interfaces:
- Visitable
- Direct Known Subclasses:
- GroupConcatNode
public class AggregateNode
- extends UnaryOperatorNode
An Aggregate Node is a node that reprsents a set function/aggregate.
It used for all system aggregates as well as user defined aggregates.
| Methods inherited from class com.akiban.sql.parser.ValueNode |
getColumnName, getSchemaName, getSourceResultColumn, getTableName, getType, getTypeId, init, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isConstantExpression, isInListProbeNode, isParameterNode, isRelationalOperator, isSameNodeType, setNullability, setType |
| 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, isInstanceOf, makeTableName, makeTableName, nodeHeader, printLabel, setBeginOffset, setDebugOutput, setEndOffset, setNodeType, setParserContext, setUserData, stackPrint, treePrint, treePrint, treePrint |
AggregateNode
public AggregateNode()
init
public void init(Object operand,
Object uadClass,
Object distinct,
Object aggregateName)
throws StandardException
- Intializer. Used for user defined and internally defined aggregates.
Called when binding a StaticMethodNode that we realize is an aggregate.
- Overrides:
init in class QueryTreeNode
- Parameters:
operand - the value expression for the aggregateuadClass - the class name for user aggregate definition for the aggregate
or internal aggregate type.distinct - boolean indicating whether this is distinct
or not.aggregateName - the name of the aggregate from the user's perspective,
e.g. MAX
- Throws:
StandardException - on error
copyFrom
public void copyFrom(QueryTreeNode node)
throws StandardException
- Fill this node with a deep copy of the given node.
- Overrides:
copyFrom in class UnaryOperatorNode
- Throws:
StandardException
getAggregateName
public String getAggregateName()
- Get the name of the aggregate.
- Returns:
- the aggregate name
isDistinct
public boolean isDistinct()
- Indicate whether this aggregate is distinct or not.
- Returns:
- true/false
toString
public 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 UnaryOperatorNode
- Returns:
- This object as a String
Copyright © 2013 Akiban Technologies, Inc. All rights reserved.