| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private Class | |
| private String | |
| private String | |
| private StringBuffer | |
| private static AggregateNode. | |
| private ClassInspector | |
| private boolean | |
| private ResultColumn | |
| private ColumnReference | |
| private AggregateDefinition | |
| private TableName |
| Access | Constructor and Description |
|---|---|
| pack-priv | AggregateNode(ValueNode
the value expression for the aggregate operand, UserAggregateDefinition the class of the user aggregate definition uadClass, TableName the name by which the aggregate was called alias, boolean boolean indicating whether this is distinct
or not. distinct, String the name of the aggregate from the user's
perspective, e.g. MAX aggregateName, ContextManager context manager cm)Constructed when binding a StaticMethodNode that we realize is an aggregate. |
| pack-priv | AggregateNode(ValueNode
the value expression for the aggregate operand, TableName the class name for user aggregate definition
for the aggregate uadClass, boolean boolean indicating whether this is distinct
or not. distinct, String the name of the aggregate from the user's
perspective, e.g. MAX aggregateName, ContextManager context manager cm)
|
| pack-priv | AggregateNode(ValueNode
the value expression for the aggregate operand, Class<?> Class for the internal aggregate type uadClass, boolean boolean indicating whether this is distinct
or not. distinct, String the name of the aggregate from the user's
perspective, e.g. MAX aggregateName, ContextManager context manager cm)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | acceptChildren(Visitor
the visitor v)Overrides org. Accept the visitor for all visitable children of this node. |
| pack-priv ValueNode | Returns: The new top of the expression tree.The query's FROM list fromList, SubqueryList The subquery list being built as we find SubqueryNodes subqueryList, List<AggregateNode> The aggregate list being built as we find AggregateNodes aggregates)Overrides org. Bind this operator. |
| private void | |
| pack-priv boolean | constantExpression(PredicateList where)
Overrides org. Return whether or not this expression tree represents a constant value. |
| pack-priv void | generateExpression(ExpressionClassBuilder
The ExpressionClassBuilder for the class we're generating acb, MethodBuilder The method the code to place the code mb)Overrides org. Do code generation for this unary operator. |
| pack-priv AggregateDefinition | |
| pack-priv String | Returns: the class nameGet the class that implements that aggregator for this node. |
| pack-priv String | Returns: the class nameGet the class that implements that aggregator for this node. |
| pack-priv ResultColumn | Returns: the result columnGet the generated ResultColumn where this aggregate now resides after a call to replaceAggregatesWithColumnReference(). |
| pack-priv ColumnReference | Returns: the column referenceGet the generated ColumnReference to this aggregate after the parent called replaceAggregatesWithColumnReference(). |
| pack-priv ResultColumn | Returns: the result column.Warning it still needs to be bound the data dictionary dd)Get the result column that has a new aggregator. |
| pack-priv ResultColumn | Returns: the result column.Warning it still needs to be bound the data dictionary dd)Get the aggregate expression in a new result column. |
| pack-priv ValueNode | |
| public String | |
| private void | |
| pack-priv boolean | |
| pack-priv boolean | |
| private boolean | |
| pack-priv ValueNode | Returns: ValueNode The (potentially) modified tree.The RCL to append to. rcl, int The tableNumber for the new ColumnReference tableNumber)Replace aggregates in the expression tree with a ColumnReference to that aggregate, append the aggregate to the supplied RCL (assumed to be from the child ResultSetNode) and return the ColumnReference. |
| pack-priv static AliasDescriptor | resolveAggregate(DataDictionary dd, SchemaDescriptor sd, String rawName, boolean noSchema)
Resolve a user-defined aggregate. |
| private static AliasDescriptor | resolveBuiltinAggregate(DataDictionary dd, String rawName, boolean noSchema)
Construct an AliasDescriptor for a modern builtin aggregate. |
| private void | setUserDefinedAggregate(UserAggregateDefinition userAgg)
initialize fields for user defined aggregate |
| public String | Returns: a string representation of this nodeOverrides org. Print a string ref of this node. |
| aggregateDefinitionClass | back to summary |
|---|---|
| private Class<?> aggregateDefinitionClass | |
| aggregateDefinitionClassName | back to summary |
|---|---|
| private String aggregateDefinitionClassName | |
| aggregateName | back to summary |
|---|---|
| private String aggregateName | |
| aggregatorClassName | back to summary |
|---|---|
| private StringBuffer aggregatorClassName | |
| BUILTIN_MODERN_AGGS | back to summary |
|---|---|
| private static AggregateNode. | |
| classInspector | back to summary |
|---|---|
| private ClassInspector classInspector | |
| distinct | back to summary |
|---|---|
| private boolean distinct | |
| generatedRC | back to summary |
|---|---|
| private ResultColumn generatedRC | |
| generatedRef | back to summary |
|---|---|
| private ColumnReference generatedRef | |
| uad | back to summary |
|---|---|
| private AggregateDefinition uad | |
| userAggregateName | back to summary |
|---|---|
| private TableName userAggregateName | |
| AggregateNode | back to summary |
|---|---|
| pack-priv AggregateNode(ValueNode operand, UserAggregateDefinition uadClass, TableName alias, boolean distinct, String aggregateName, ContextManager cm) throws StandardException Constructed when binding a StaticMethodNode that we realize is an aggregate.
| |
| AggregateNode | back to summary |
|---|---|
pack-priv AggregateNode(ValueNode operand, TableName uadClass, boolean distinct, String aggregateName, ContextManager cm) throws StandardException
| |
| AggregateNode | back to summary |
|---|---|
pack-priv AggregateNode(ValueNode operand, Class<?> uadClass, boolean distinct, String aggregateName, ContextManager cm) throws StandardException
| |
| acceptChildren | back to summary |
|---|---|
| pack-priv void acceptChildren(Visitor v) throws StandardException Overrides org. Doc from org. Accept the visitor for all visitable children of this node.
| |
| bindExpression | back to summary |
|---|---|
| pack-priv ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates) throws StandardException Overrides org. Bind this operator. Determine the type of the subexpression, and pass that into the UserAggregate.
| |
| checkAggregatorClassName | back to summary |
|---|---|
| private void checkAggregatorClassName(String className) throws StandardException | |
| constantExpression | back to summary |
|---|---|
| pack-priv boolean constantExpression(PredicateList where) Overrides org. Doc from org. Return whether or not this expression tree represents a constant value. In this case, "constant" means that it will always evaluate to the same thing, even if it includes columns. A column is constant if it is compared to a constant expression.
| |
| generateExpression | back to summary |
|---|---|
| pack-priv void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException Overrides org. Do code generation for this unary operator. Should never be called for an aggregate -- it should be converted into something else by code generation time.
| |
| getAggregateDefinition | back to summary |
|---|---|
| pack-priv AggregateDefinition getAggregateDefinition() Get the AggregateDefinition.
| |
| getAggregateName | back to summary |
|---|---|
| pack-priv String getAggregateName() Get the class that implements that aggregator for this node.
| |
| getAggregatorClassName | back to summary |
|---|---|
| pack-priv String getAggregatorClassName() Get the class that implements that aggregator for this node.
| |
| getGeneratedRC | back to summary |
|---|---|
| pack-priv ResultColumn getGeneratedRC() Get the generated ResultColumn where this aggregate now resides after a call to replaceAggregatesWithColumnReference().
| |
| getGeneratedRef | back to summary |
|---|---|
| pack-priv ColumnReference getGeneratedRef() Get the generated ColumnReference to this aggregate after the parent called replaceAggregatesWithColumnReference().
| |
| getNewAggregatorResultColumn | back to summary |
|---|---|
| pack-priv ResultColumn getNewAggregatorResultColumn(DataDictionary dd) throws StandardException Get the result column that has a new aggregator. This aggregator will be fed into the sorter.
| |
| getNewExpressionResultColumn | back to summary |
|---|---|
| pack-priv ResultColumn getNewExpressionResultColumn(DataDictionary dd) throws StandardException Get the aggregate expression in a new result column.
| |
| getNewNullResultExpression | back to summary |
|---|---|
| pack-priv ValueNode getNewNullResultExpression() throws StandardException Get the null aggregate result expression column.
| |
| getSQLName | back to summary |
|---|---|
| public String getSQLName() Get the SQL name of the aggregate | |
| instantiateAggDef | back to summary |
|---|---|
| private void instantiateAggDef() throws StandardException | |
| isConstant | back to summary |
|---|---|
| pack-priv boolean isConstant() | |
| isDistinct | back to summary |
|---|---|
| pack-priv boolean isDistinct() Indicate whether this aggregate is distinct or not.
| |
| isUserDefinedAggregate | back to summary |
|---|---|
| private boolean isUserDefinedAggregate() Return true if this is a user-defined aggregate | |
| replaceAggregatesWithColumnReferences | back to summary |
|---|---|
| pack-priv ValueNode replaceAggregatesWithColumnReferences(ResultColumnList rcl, int tableNumber) throws StandardException Replace aggregates in the expression tree with a ColumnReference to that aggregate, append the aggregate to the supplied RCL (assumed to be from the child ResultSetNode) and return the ColumnReference. This is useful for pushing aggregates in the Having clause down to the user's select at parse time. It is also used for moving around Aggregates in the select list when creating the Group By node. In that case it is called after bind time, so we need to create the column differently.
| |
| resolveAggregate | back to summary |
|---|---|
| pack-priv static AliasDescriptor resolveAggregate(DataDictionary dd, SchemaDescriptor sd, String rawName, boolean noSchema) throws StandardException Resolve a user-defined aggregate. | |
| resolveBuiltinAggregate | back to summary |
|---|---|
| private static AliasDescriptor resolveBuiltinAggregate(DataDictionary dd, String rawName, boolean noSchema) throws StandardException Construct an AliasDescriptor for a modern builtin aggregate. | |
| setUserDefinedAggregate | back to summary |
|---|---|
| private void setUserDefinedAggregate(UserAggregateDefinition userAgg) initialize fields for user defined aggregate | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Print a string ref of this node. | |
| Modifier and Type | Field and Description |
|---|---|
| public final String | |
| public final String | |
| public final TypeDescriptor | |
| public final TypeDescriptor |
| Access | Constructor and Description |
|---|---|
| public | BuiltinAggDescriptor(String aggName, String aggClassName, TypeDescriptor argType, TypeDescriptor returnType)
|
| aggClassName | back to summary |
|---|---|
| public final String aggClassName | |
| aggName | back to summary |
|---|---|
| public final String aggName | |
| argType | back to summary |
|---|---|
| public final TypeDescriptor argType | |
| returnType | back to summary |
|---|---|
| public final TypeDescriptor returnType | |
| BuiltinAggDescriptor | back to summary |
|---|---|
| public BuiltinAggDescriptor(String aggName, String aggClassName, TypeDescriptor argType, TypeDescriptor returnType) | |