| java.lang.Object org.apache.derby.impl.sql.compile.QueryTreeNode org.apache.derby.impl.sql.compile.ValueNode org.apache.derby.impl.sql.compile.UnaryOperatorNode org.apache.derby.impl.sql.compile.AggregateNode
AggregateNode | public class AggregateNode extends UnaryOperatorNode (Code) | | An Aggregate Node is a node that reprsents a set function/aggregate.
It used for all system aggregates as well as user defined aggregates.
author: jamie |
bindExpression | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException(Code) | | Bind this operator. Determine the type of the subexpression,
and pass that into the UserAggregate.
Parameters: fromList - The query's FROM list Parameters: subqueryList - The subquery list being built as we find SubqueryNodes Parameters: aggregateVector - The aggregate list being built as we find AggregateNodes The new top of the expression tree. exception: StandardException - Thrown on error |
generateExpression | public void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code) | | 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.
Parameters: acb - The ExpressionClassBuilder for the class we're generating Parameters: mb - The method the code to place the code exception: StandardException - Thrown on error |
getAggregateDefinition | AggregateDefinition getAggregateDefinition()(Code) | | Get the AggregateDefinition.
The AggregateDefinition |
getAggregateName | public String getAggregateName()(Code) | | Get the class that implements that aggregator for this
node.
the class name |
getAggregatorClassName | public String getAggregatorClassName()(Code) | | Get the class that implements that aggregator for this
node.
the class name |
getGeneratedRC | public ResultColumn getGeneratedRC()(Code) | | Get the generated ResultColumn where this
aggregate now resides after a call to
replaceAggregatesWithColumnReference().
the result column |
getGeneratedRef | public ColumnReference getGeneratedRef()(Code) | | Get the generated ColumnReference to this
aggregate after the parent called
replaceAggregatesWithColumnReference().
the column reference |
getNewAggregatorResultColumn | public ResultColumn getNewAggregatorResultColumn(DataDictionary dd) throws StandardException(Code) | | Get the result column that has a new aggregator.
This aggregator will be fed into the sorter.
Parameters: dd - the data dictionary the result column. WARNING: it still needs to be bound exception: StandardException - on error |
init | public void init(Object operand, Object uadClass, Object distinct, Object aggregateName) throws StandardException(Code) | | Intializer. Used for user defined and internally defined aggregates.
Called when binding a StaticMethodNode that we realize is an aggregate.
Parameters: operand - the value expression for the aggregate Parameters: uadClass - the class name for user aggregate definition for the aggregateor the Class for the internal aggregate type. Parameters: distinct - boolean indicating whether this is distinctor not. Parameters: aggregateName - the name of the aggregate from the user's perspective,e.g. MAX exception: StandardException - on error |
isDistinct | public boolean isDistinct()(Code) | | Indicate whether this aggregate is distinct or not.
true/false |
replaceAggregatesWithColumnReferences | public ValueNode replaceAggregatesWithColumnReferences(ResultColumnList rcl, int tableNumber) throws StandardException(Code) | | 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.
Parameters: rcl - The RCL to append to. Parameters: tableNumber - The tableNumber for the new ColumnReference ValueNode The (potentially) modified tree. exception: StandardException - Thrown on error |
toString | public String toString()(Code) | | Print a string ref of this node.
a string representation of this node |
Methods inherited from org.apache.derby.impl.sql.compile.UnaryOperatorNode | public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc) protected int addXmlOpMethodParams(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException(Code)(Java Doc) void bindParameter() throws StandardException(Code)(Java Doc) protected ValueNode bindUnaryOperator(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException(Code)(Java Doc) public void bindXMLParse() throws StandardException(Code)(Java Doc) public void bindXMLSerialize() throws StandardException(Code)(Java Doc) public boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException(Code)(Java Doc) public boolean constantExpression(PredicateList whereClause)(Code)(Java Doc) public void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) public ValueNode getOperand()(Code)(Java Doc) String getOperatorString()(Code)(Java Doc) protected int getOrderableVariantType() throws StandardException(Code)(Java Doc) public ParameterNode getParameterOperand()(Code)(Java Doc) public String getReceiverInterfaceName() throws StandardException(Code)(Java Doc) public void init(Object operand, Object operatorOrOpType, Object methodNameOrAddedArgs)(Code)(Java Doc) public void init(Object operand)(Code)(Java Doc) public boolean isConstantExpression()(Code)(Java Doc) protected boolean isEquivalent(ValueNode o) throws StandardException(Code)(Java Doc) public boolean isUnaryMinusOrPlusWithParameter()(Code)(Java Doc) public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException(Code)(Java Doc) public void printSubNodes(int depth)(Code)(Java Doc) public ValueNode remapColumnReferencesToExpressions() throws StandardException(Code)(Java Doc) public boolean requiresTypeFromContext()(Code)(Java Doc) public void setClause(int clause)(Code)(Java Doc) void setMethodName(String methodName)(Code)(Java Doc) void setOperator(String operator)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
Methods inherited from org.apache.derby.impl.sql.compile.ValueNode | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException(Code)(Java Doc) public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector, boolean forQueryRewrite) throws StandardException(Code)(Java Doc) public boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException(Code)(Java Doc) public ValueNode changeToCNF(boolean underTopAndNode) throws StandardException(Code)(Java Doc) public ValueNode checkIsBoolean() throws StandardException(Code)(Java Doc) public void checkReliability(String fragmentType, int fragmentBitMask) throws StandardException(Code)(Java Doc) public void checkReliability(int fragmentBitMask, String fragmentType) throws StandardException(Code)(Java Doc) void checkTopPredicatesForEqualsConditions(int tableNumber, boolean[] eqOuterCols, int[] tableNumbers, JBitSet[] tableColMap, boolean resultColTable) throws StandardException(Code)(Java Doc) public boolean constantExpression(PredicateList whereClause)(Code)(Java Doc) public void copyFields(ValueNode oldVN) throws StandardException(Code)(Java Doc) ValueNode eliminateNots(boolean underNotNode) throws StandardException(Code)(Java Doc) public ValueNode genEqualsFalseTree() throws StandardException(Code)(Java Doc) public ValueNode genIsNullTree() throws StandardException(Code)(Java Doc) public ValueNode genSQLJavaSQLTree() throws StandardException(Code)(Java Doc) final protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) public void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) public void generateFilter(ExpressionClassBuilder ecb, MethodBuilder mb) throws StandardException(Code)(Java Doc) public int getClause()(Code)(Java Doc) public ValueNode getClone() throws StandardException(Code)(Java Doc) public String getColumnName()(Code)(Java Doc) Object getConstantValueAsObject() throws StandardException(Code)(Java Doc) final protected DataValueFactory getDataValueFactory()(Code)(Java Doc) protected int getOrderableVariantType() throws StandardException(Code)(Java Doc) public String getSchemaName() throws StandardException(Code)(Java Doc) public ResultColumn getSourceResultColumn()(Code)(Java Doc) public String getTableName()(Code)(Java Doc) JBitSet getTablesReferenced() throws StandardException(Code)(Java Doc) boolean getTransformed()(Code)(Java Doc) public TypeCompiler getTypeCompiler() throws StandardException(Code)(Java Doc) public TypeId getTypeId() throws StandardException(Code)(Java Doc) public DataTypeDescriptor getTypeServices() throws StandardException(Code)(Java Doc) public void init(Object typeId, Object precision, Object scale, Object isNullable, Object maximumWidth) throws StandardException(Code)(Java Doc) public boolean isBinaryEqualsOperatorNode()(Code)(Java Doc) boolean isBooleanFalse()(Code)(Java Doc) boolean isBooleanTrue()(Code)(Java Doc) public boolean isCloneable()(Code)(Java Doc) public boolean isConstantExpression()(Code)(Java Doc) abstract protected boolean isEquivalent(ValueNode other) throws StandardException(Code)(Java Doc) public boolean isParameterNode()(Code)(Java Doc) public boolean isRelationalOperator()(Code)(Java Doc) final protected boolean isSameNodeType(ValueNode other)(Code)(Java Doc) public boolean optimizableEqualityNode(Optimizable optTable, int columnNumber, boolean isNullOkay) throws StandardException(Code)(Java Doc) public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException(Code)(Java Doc) public ValueNode putAndsOnTop() throws StandardException(Code)(Java Doc) public ValueNode remapColumnReferencesToExpressions() throws StandardException(Code)(Java Doc) public boolean requiresTypeFromContext()(Code)(Java Doc) public double selectivity(Optimizable optTable) throws StandardException(Code)(Java Doc) public void setClause(int clause)(Code)(Java Doc) void setTransformed()(Code)(Java Doc) public void setType(DataTypeDescriptor dataTypeServices) throws StandardException(Code)(Java Doc) public String toString()(Code)(Java Doc) public boolean updatableByCursor()(Code)(Java Doc) public boolean verifyChangeToCNF()(Code)(Java Doc) boolean verifyEliminateNots()(Code)(Java Doc) public boolean verifyPutAndsOnTop()(Code)(Java Doc)
|
Methods inherited from org.apache.derby.impl.sql.compile.QueryTreeNode | public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc) public QueryTreeNode bind() throws StandardException(Code)(Java Doc) public DataValueDescriptor convertDefaultNode(DataTypeDescriptor typeDescriptor) throws StandardException(Code)(Java Doc) protected static void debugFlush()(Code)(Java Doc) public static void debugPrint(String outputString)(Code)(Java Doc) public void disablePrivilegeCollection()(Code)(Java Doc) public String executeSchemaName()(Code)(Java Doc) public String executeStatementName()(Code)(Java Doc) public static String formatNodeString(String nodeString, int depth)(Code)(Java Doc) public boolean foundString(String[] list, String search)(Code)(Java Doc) public GeneratedClass generate(ByteArray ignored) throws StandardException(Code)(Java Doc) protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) void generateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation)(Code)(Java Doc) public int getBeginOffset()(Code)(Java Doc) final protected ClassFactory getClassFactory()(Code)(Java Doc) final protected CompilerContext getCompilerContext()(Code)(Java Doc) final public ContextManager getContextManager()(Code)(Java Doc) public Object getCursorInfo() throws StandardException(Code)(Java Doc) final public DataDictionary getDataDictionary()(Code)(Java Doc) final public DependencyManager getDependencyManager()(Code)(Java Doc) public int getEndOffset()(Code)(Java Doc) final public ExecutionFactory getExecutionFactory()(Code)(Java Doc) final public GenericConstantActionFactory getGenericConstantActionFactory()(Code)(Java Doc) protected int getIntProperty(String value, String key) throws StandardException(Code)(Java Doc) final protected LanguageConnectionContext getLanguageConnectionContext()(Code)(Java Doc) final public NodeFactory getNodeFactory()(Code)(Java Doc) protected int getNodeType()(Code)(Java Doc) public ConstantNode getNullNode(TypeId typeId, ContextManager cm) throws StandardException(Code)(Java Doc) public DataTypeDescriptor[] getParameterTypes() throws StandardException(Code)(Java Doc) public long getRowEstimate()(Code)(Java Doc) public String getSPSName()(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName) throws StandardException(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName, boolean raiseError) throws StandardException(Code)(Java Doc) protected int getStatementType()(Code)(Java Doc) final protected TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code)(Java Doc) final protected TypeCompiler getTypeCompiler(TypeId typeId)(Code)(Java Doc) public void init(Object arg1) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14) throws StandardException(Code)(Java Doc) public boolean isAtomic() throws StandardException(Code)(Java Doc) protected boolean isInstanceOf(int nodeType)(Code)(Java Doc) public boolean isPrivilegeCollectionRequired()(Code)(Java Doc) final boolean isSessionSchema(SchemaDescriptor sd)(Code)(Java Doc) final boolean isSessionSchema(String schemaName)(Code)(Java Doc) public ConstantAction makeConstantAction() throws StandardException(Code)(Java Doc) public ResultDescription makeResultDescription() throws StandardException(Code)(Java Doc) public TableName makeTableName(String schemaName, String flatName) throws StandardException(Code)(Java Doc) public boolean needsSavepoint()(Code)(Java Doc) protected String nodeHeader()(Code)(Java Doc) public QueryTreeNode optimize() throws StandardException(Code)(Java Doc) public static QueryTreeNode parseQueryText(CompilerContext compilerContext, String queryText, Object[] paramDefaults, LanguageConnectionContext lcc) throws StandardException(Code)(Java Doc) public void printLabel(int depth, String label)(Code)(Java Doc) public void printSubNodes(int depth)(Code)(Java Doc) public boolean referencesSessionSchema() throws StandardException(Code)(Java Doc) public TableName resolveTableToSynonym(TableName tabName) throws StandardException(Code)(Java Doc) public void setBeginOffset(int beginOffset)(Code)(Java Doc) public void setContextManager(ContextManager cm)(Code)(Java Doc) public void setEndOffset(int endOffset)(Code)(Java Doc) public void setNodeType(int nodeType)(Code)(Java Doc) public void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void treePrint()(Code)(Java Doc) public void treePrint(int depth)(Code)(Java Doc) String verifyClassExist(String javaClassName, boolean convertCase) throws StandardException(Code)(Java Doc)
|
|
|