|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.sql.execute.SystemAggregator
org.apache.derby.impl.sql.execute.OrderableAggregator
org.apache.derby.impl.sql.execute.MaxMinAggregator
public final class MaxMinAggregator
Aggregator for MAX()/MIN(). Defers most of its work to OrderableAggregator.
OrderableAggregator,
Serialized Form| Field Summary | |
|---|---|
private boolean |
isMax
|
| Fields inherited from class org.apache.derby.impl.sql.execute.OrderableAggregator |
|---|
value |
| Constructor Summary | |
|---|---|
MaxMinAggregator()
|
|
| Method Summary | |
|---|---|
protected void |
accumulate(DataValueDescriptor addend)
Accumulate |
int |
getTypeFormatId()
Get the formatID which corresponds to this class. |
ExecAggregator |
newAggregator()
Return a new initialized copy of this aggregator, any state set by the setup() method of the original Aggregator must be copied into the new aggregator. |
void |
readExternal(java.io.ObjectInput in)
|
void |
setup(ClassFactory cf,
java.lang.String aggregateName,
DataTypeDescriptor returnType)
Set's up the aggregate for processing. |
void |
writeExternal(java.io.ObjectOutput out)
Although we are not expected to be persistent per se, we may be written out by the sorter temporarily. |
| Methods inherited from class org.apache.derby.impl.sql.execute.OrderableAggregator |
|---|
getResult, merge, toString |
| Methods inherited from class org.apache.derby.impl.sql.execute.SystemAggregator |
|---|
accumulate, didEliminateNulls |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private boolean isMax
| Constructor Detail |
|---|
public MaxMinAggregator()
| Method Detail |
|---|
public void setup(ClassFactory cf,
java.lang.String aggregateName,
DataTypeDescriptor returnType)
ExecAggregator
setup in interface ExecAggregatorsetup in class OrderableAggregatorcf - Database-specific class factory.aggregateName - For builtin aggregates, this is a SQL aggregate name like MAX. For user-defined aggregates, this is the name of the user-written class which implements org.apache.derby.agg.Aggregator.returnType - The type returned by the getResult() method.
protected void accumulate(DataValueDescriptor addend)
throws StandardException
accumulate in class SystemAggregatoraddend - value to be added in
StandardException - on errorpublic ExecAggregator newAggregator()
ExecAggregator
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
OrderableAggregatorWhy would we be called to write ourselves out if we are null? For scalar aggregates, we don't bother setting up the aggregator since we only need a single row. So for a scalar aggregate that needs to go to disk, the aggregator might be null.
writeExternal in interface java.io.ExternalizablewriteExternal in class OrderableAggregatorjava.io.IOException - on errorExternalizable.writeExternal(java.io.ObjectOutput)
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class OrderableAggregatorjava.io.IOException - on error
java.lang.ClassNotFoundException - on errorExternalizable.readExternal(java.io.ObjectInput)public int getTypeFormatId()
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||