java.io.Externalizable
, java.io.Serializable
, Formatable
, TypedFormat
, ExecAggregator
public final class MaxMinAggregator extends OrderableAggregator
OrderableAggregator
,
Serialized FormModifier 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, wait
getResult, merge, toString
accumulate, didEliminateNulls
public void setup(ClassFactory cf, java.lang.String aggregateName, DataTypeDescriptor returnType)
ExecAggregator
setup
in interface ExecAggregator
setup
in class OrderableAggregator
cf
- 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 SystemAggregator
addend
- value to be added inStandardException
- on errorpublic ExecAggregator newAggregator()
ExecAggregator
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
OrderableAggregator
Why 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.Externalizable
writeExternal
in class OrderableAggregator
java.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.Externalizable
readExternal
in class OrderableAggregator
java.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.