public abstract class AggregateResult extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
hasCandidateResult |
protected TSDataType |
resultDataType |
static int |
TIME_LENGTH_FOR_FIRST_VALUE |
| 构造器和说明 |
|---|
AggregateResult(TSDataType resultDataType,
AggregationType aggregationType)
construct.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static AggregateResult |
deserializeFrom(ByteBuffer buffer) |
protected abstract void |
deserializeSpecificFields(ByteBuffer buffer) |
AggregationType |
getAggregationType() |
protected Binary |
getBinaryValue() |
protected boolean |
getBooleanValue() |
protected double |
getDoubleValue() |
protected float |
getFloatValue() |
protected int |
getIntValue() |
protected long |
getLongValue() |
abstract Object |
getResult() |
TSDataType |
getResultDataType() |
protected Object |
getValue() |
protected boolean |
hasCandidateResult() |
abstract boolean |
hasFinalResult()
Judge if aggregation results have been calculated.
|
boolean |
isAscending()
Whether the AggregationResult accepts data in time ascending order, if it returns false, the
data should be passed in time descending order.
|
abstract void |
merge(AggregateResult another)
Merge another aggregateResult into this
|
void |
reset() |
protected abstract void |
serializeSpecificFields(OutputStream outputStream) |
void |
serializeTo(OutputStream outputStream) |
void |
setBinaryValue(Binary binaryValue) |
void |
setBooleanValue(boolean booleanValue) |
void |
setDoubleValue(double doubleValue) |
void |
setFloatValue(float floatValue) |
void |
setIntValue(int intValue) |
void |
setLongValue(long longValue) |
protected void |
setValue(Object v)
set an object.
|
String |
toString() |
abstract void |
updateResultFromPageData(IBatchDataIterator batchIterator)
Aggregate results cannot be calculated using Statistics directly, using the data in each page.
|
abstract void |
updateResultFromPageData(IBatchDataIterator batchIterator,
Predicate<Long> boundPredicate)
Aggregate results cannot be calculated using Statistics directly, using the data in each page.
|
abstract void |
updateResultFromStatistics(Statistics statistics)
Calculate the aggregation using Statistics
|
abstract void |
updateResultUsingTimestamps(long[] timestamps,
int length,
IReaderByTimestamp dataReader)
This method calculates the aggregation using common timestamps of the cross series filter.
|
abstract void |
updateResultUsingValues(long[] timestamps,
int length,
ValueIterator valueIterator)
This method calculates the aggregation using values that have been calculated
|
public static final int TIME_LENGTH_FOR_FIRST_VALUE
protected TSDataType resultDataType
protected boolean hasCandidateResult
public AggregateResult(TSDataType resultDataType, AggregationType aggregationType)
resultDataType - result data type.public abstract Object getResult()
public abstract void updateResultFromStatistics(Statistics statistics) throws QueryProcessException
statistics - chunkStatistics or pageStatisticsQueryProcessExceptionpublic abstract void updateResultFromPageData(IBatchDataIterator batchIterator) throws IOException, QueryProcessException
batchIterator - the data in PageIOExceptionQueryProcessExceptionpublic abstract void updateResultFromPageData(IBatchDataIterator batchIterator, Predicate<Long> boundPredicate) throws IOException
batchIterator - the data in PageboundPredicate - used to judge whether the current timestamp is out of time range, returns
true if it is.IOExceptionpublic abstract void updateResultUsingTimestamps(long[] timestamps,
int length,
IReaderByTimestamp dataReader)
throws IOException
IOException - TsFile data read errorpublic abstract void updateResultUsingValues(long[] timestamps,
int length,
ValueIterator valueIterator)
public abstract boolean hasFinalResult()
public abstract void merge(AggregateResult another)
public static AggregateResult deserializeFrom(ByteBuffer buffer)
protected abstract void deserializeSpecificFields(ByteBuffer buffer)
public void serializeTo(OutputStream outputStream) throws IOException
IOExceptionprotected abstract void serializeSpecificFields(OutputStream outputStream) throws IOException
IOExceptionpublic void reset()
protected Object getValue()
protected void setValue(Object v)
v - object valuepublic TSDataType getResultDataType()
protected boolean getBooleanValue()
public void setBooleanValue(boolean booleanValue)
protected int getIntValue()
public void setIntValue(int intValue)
protected long getLongValue()
public void setLongValue(long longValue)
protected float getFloatValue()
public void setFloatValue(float floatValue)
protected double getDoubleValue()
public void setDoubleValue(double doubleValue)
protected Binary getBinaryValue()
public void setBinaryValue(Binary binaryValue)
protected boolean hasCandidateResult()
public AggregationType getAggregationType()
public boolean isAscending()
Copyright © 2022 The Apache Software Foundation. All rights reserved.