java.io.Externalizable, java.io.Serializable, Formatable, TypedFormat, ExecAggregatorpublic final class MaxMinAggregator extends OrderableAggregator
OrderableAggregator,
Serialized Form| Modifier and Type | Field | Description |
|---|---|---|
private boolean |
isMax |
value| Constructor | Description |
|---|---|
MaxMinAggregator() |
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetResult, merge, toStringaccumulate, didEliminateNullspublic void setup(ClassFactory cf, java.lang.String aggregateName, DataTypeDescriptor returnType)
ExecAggregatorsetup 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 inStandardException - on errorpublic ExecAggregator newAggregator()
ExecAggregatorpublic 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 errorjava.lang.ClassNotFoundException - on errorExternalizable.readExternal(java.io.ObjectInput)public int getTypeFormatId()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.