Class ExtremeAggrResult
- java.lang.Object
-
- org.apache.iotdb.db.query.aggregation.AggregateResult
-
- org.apache.iotdb.db.query.aggregation.impl.ExtremeAggrResult
-
- All Implemented Interfaces:
java.lang.Cloneable
public class ExtremeAggrResult extends AggregateResult
-
-
Field Summary
-
Fields inherited from class org.apache.iotdb.db.query.aggregation.AggregateResult
hasCandidateResult, resultDataType, TIME_LENGTH_FOR_FIRST_VALUE, timestamp
-
-
Constructor Summary
Constructors Constructor Description ExtremeAggrResult(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddeserializeSpecificFields(java.nio.ByteBuffer buffer)java.lang.ObjectgetAbsValue(java.lang.Object v)java.lang.Comparable<java.lang.Object>getExtremeValue(java.lang.Comparable<java.lang.Object> extVal, java.lang.Comparable<java.lang.Object> currentValue)java.lang.ObjectgetResult()booleanhasFinalResult()Judge if aggregation results have been calculated.voidmerge(AggregateResult another)Merge another aggregateResult into thisprotected voidserializeSpecificFields(java.io.OutputStream outputStream)voidupdateResultFromPageData(org.apache.iotdb.tsfile.read.common.IBatchDataIterator batchIterator)Aggregate results cannot be calculated using Statistics directly, using the data in each page.voidupdateResultFromPageData(org.apache.iotdb.tsfile.read.common.IBatchDataIterator batchIterator, long minBound, long maxBound)Aggregate results cannot be calculated using Statistics directly, using the data in each page.voidupdateResultFromStatistics(org.apache.iotdb.tsfile.file.metadata.statistics.Statistics statistics)Calculate the aggregation using StatisticsvoidupdateResultUsingTimestamps(long[] timestamps, int length, IReaderByTimestamp dataReader)This method calculates the aggregation using common timestamps of the cross series filter.voidupdateResultUsingValues(long[] timestamps, int length, ValueIterator valueIterator)This method calculates the aggregation using values that have been calculated-
Methods inherited from class org.apache.iotdb.db.query.aggregation.AggregateResult
clone, deserializeFrom, getAggregationType, getBinaryValue, getBooleanValue, getDoubleAbsValue, getDoubleValue, getFloatAbsValue, getFloatValue, getIntAbsValue, getIntValue, getLongAbsValue, getLongValue, getResultDataType, getTime, getValue, hasCandidateResult, isAscending, reset, serialize, serializeTo, setBinaryValue, setBooleanValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setTime, setValue, toString
-
-
-
-
Method Detail
-
getAbsValue
public java.lang.Object getAbsValue(java.lang.Object v)
-
getExtremeValue
public java.lang.Comparable<java.lang.Object> getExtremeValue(java.lang.Comparable<java.lang.Object> extVal, java.lang.Comparable<java.lang.Object> currentValue)
-
getResult
public java.lang.Object getResult()
- Specified by:
getResultin classAggregateResult
-
updateResultFromStatistics
public void updateResultFromStatistics(org.apache.iotdb.tsfile.file.metadata.statistics.Statistics statistics)
Description copied from class:AggregateResultCalculate the aggregation using Statistics- Specified by:
updateResultFromStatisticsin classAggregateResult- Parameters:
statistics- chunkStatistics or pageStatistics
-
updateResultFromPageData
public void updateResultFromPageData(org.apache.iotdb.tsfile.read.common.IBatchDataIterator batchIterator)
Description copied from class:AggregateResultAggregate results cannot be calculated using Statistics directly, using the data in each page. This method is used in global aggregation query.- Specified by:
updateResultFromPageDatain classAggregateResult- Parameters:
batchIterator- the data in Page
-
updateResultFromPageData
public void updateResultFromPageData(org.apache.iotdb.tsfile.read.common.IBatchDataIterator batchIterator, long minBound, long maxBound)Description copied from class:AggregateResultAggregate results cannot be calculated using Statistics directly, using the data in each page. This method is used in GROUP BY aggregation query.- Specified by:
updateResultFromPageDatain classAggregateResult- Parameters:
batchIterator- the data in PageminBound- calculate points whose time >= boundmaxBound- calculate points whose time < bound
-
updateResultUsingTimestamps
public void updateResultUsingTimestamps(long[] timestamps, int length, IReaderByTimestamp dataReader) throws java.io.IOExceptionDescription copied from class:AggregateResultThis method calculates the aggregation using common timestamps of the cross series filter.- Specified by:
updateResultUsingTimestampsin classAggregateResult- Throws:
java.io.IOException- TsFile data read error
-
updateResultUsingValues
public void updateResultUsingValues(long[] timestamps, int length, ValueIterator valueIterator)Description copied from class:AggregateResultThis method calculates the aggregation using values that have been calculated- Specified by:
updateResultUsingValuesin classAggregateResult
-
hasFinalResult
public boolean hasFinalResult()
Description copied from class:AggregateResultJudge if aggregation results have been calculated. In other words, if the aggregated result does not need to compute the remaining data, it returns true.- Specified by:
hasFinalResultin classAggregateResult- Returns:
- If the aggregation result has been calculated return true, else return false.
-
merge
public void merge(AggregateResult another)
Description copied from class:AggregateResultMerge another aggregateResult into this- Specified by:
mergein classAggregateResult
-
deserializeSpecificFields
protected void deserializeSpecificFields(java.nio.ByteBuffer buffer)
- Specified by:
deserializeSpecificFieldsin classAggregateResult
-
serializeSpecificFields
protected void serializeSpecificFields(java.io.OutputStream outputStream) throws java.io.IOException- Specified by:
serializeSpecificFieldsin classAggregateResult- Throws:
java.io.IOException
-
-