public class DoubleDimensionIndexer extends Object implements DimensionIndexer<Double,Double,Double>
ARRAY, LIST| Constructor and Description |
|---|
DoubleDimensionIndexer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkUnsortedEncodedKeyComponentsEqual(Double lhs,
Double rhs)
Check if two row value arrays from TimeAndDims keys are equal.
|
int |
compareUnsortedEncodedKeyComponents(Double lhs,
Double rhs)
Compares the row values for this DimensionIndexer's dimension from a TimeAndDims key.
|
Object |
convertUnsortedEncodedKeyComponentToActualArrayOrList(Double key,
boolean asList)
Given a row value array from a TimeAndDims key, as described in the documentation for
compareUnsortedEncodedKeyComponents(), convert the unsorted encoded values to a list or array of actual values.
|
Double |
convertUnsortedEncodedKeyComponentToSortedEncodedKeyComponent(Double key)
Given a row value array from a TimeAndDims key, as described in the documentation for
compareUnsortedEncodedKeyComponents(), convert the unsorted encoded values to an array of sorted encoded values
(i.e., sorted by their corresponding actual values)
|
void |
fillBitmapsFromUnsortedEncodedKeyComponent(Double key,
int rowNum,
MutableBitmap[] bitmapIndexes,
BitmapFactory factory)
Helper function for building bitmap indexes for integer-encoded dimensions.
|
int |
getCardinality()
Get the cardinality of this dimension's values.
|
Double |
getMaxValue()
Get the maximum dimension value seen by this indexer.
|
Double |
getMinValue()
Get the minimum dimension value seen by this indexer.
|
Indexed<Double> |
getSortedIndexedValues()
Returns an indexed structure of this dimension's sorted actual values.
|
int |
getUnsortedEncodedKeyComponentHashCode(Double key)
Given a row value array from a TimeAndDims key, generate a hashcode.
|
Double |
getUnsortedEncodedValueFromSorted(Double sortedIntermediateValue)
Given an encoded value that was ordered by associated actual value, return the equivalent
encoded value ordered by time of ingestion.
|
ColumnValueSelector<?> |
makeColumnValueSelector(TimeAndDimsHolder currEntry,
IncrementalIndex.DimensionDesc desc)
Return an object used to read values from this indexer's column.
|
DimensionSelector |
makeDimensionSelector(DimensionSpec spec,
TimeAndDimsHolder currEntry,
IncrementalIndex.DimensionDesc desc)
Return an object used to read values from this indexer's column as Strings.
|
Double |
processRowValsToUnsortedEncodedKeyComponent(Object dimValues,
boolean reportParseExceptions)
Given a single row value or list of row values (for multi-valued dimensions), update any internal data structures
with the ingested values and return the row values as an array to be used within a TimeAndDims key.
|
public Double processRowValsToUnsortedEncodedKeyComponent(Object dimValues, boolean reportParseExceptions)
DimensionIndexerprocessRowValsToUnsortedEncodedKeyComponent in interface DimensionIndexer<Double,Double,Double>dimValues - Single row val to processpublic Double getUnsortedEncodedValueFromSorted(Double sortedIntermediateValue)
DimensionIndexergetUnsortedEncodedValueFromSorted in interface DimensionIndexer<Double,Double,Double>sortedIntermediateValue - value to convertpublic Indexed<Double> getSortedIndexedValues()
DimensionIndexergetSortedIndexedValues in interface DimensionIndexer<Double,Double,Double>public Double getMinValue()
DimensionIndexergetMinValue in interface DimensionIndexer<Double,Double,Double>public Double getMaxValue()
DimensionIndexergetMaxValue in interface DimensionIndexer<Double,Double,Double>public int getCardinality()
DimensionIndexergetCardinality in interface DimensionIndexer<Double,Double,Double>public DimensionSelector makeDimensionSelector(DimensionSpec spec, TimeAndDimsHolder currEntry, IncrementalIndex.DimensionDesc desc)
DimensionIndexermakeDimensionSelector in interface DimensionIndexer<Double,Double,Double>spec - Specifies the output name of a dimension and any extraction functions to be applied.currEntry - Provides access to the current TimeAndDims object in the Cursordesc - Descriptor object for this dimension within an IncrementalIndexpublic ColumnValueSelector<?> makeColumnValueSelector(TimeAndDimsHolder currEntry, IncrementalIndex.DimensionDesc desc)
DimensionIndexermakeColumnValueSelector in interface DimensionIndexer<Double,Double,Double>currEntry - Provides access to the current TimeAndDims object in the Cursordesc - Descriptor object for this dimension within an IncrementalIndexpublic int compareUnsortedEncodedKeyComponents(@Nullable Double lhs, @Nullable Double rhs)
DimensionIndexercompareUnsortedEncodedKeyComponents in interface DimensionIndexer<Double,Double,Double>lhs - dimension value array from a TimeAndDims keyrhs - dimension value array from a TimeAndDims keypublic boolean checkUnsortedEncodedKeyComponentsEqual(@Nullable Double lhs, @Nullable Double rhs)
DimensionIndexercheckUnsortedEncodedKeyComponentsEqual in interface DimensionIndexer<Double,Double,Double>lhs - dimension value array from a TimeAndDims keyrhs - dimension value array from a TimeAndDims keypublic int getUnsortedEncodedKeyComponentHashCode(@Nullable Double key)
DimensionIndexergetUnsortedEncodedKeyComponentHashCode in interface DimensionIndexer<Double,Double,Double>key - dimension value array from a TimeAndDims keypublic Object convertUnsortedEncodedKeyComponentToActualArrayOrList(Double key, boolean asList)
DimensionIndexerconvertUnsortedEncodedKeyComponentToActualArrayOrList in interface DimensionIndexer<Double,Double,Double>key - dimension value array from a TimeAndDims keyasList - if true, return an array; if false, return a listpublic Double convertUnsortedEncodedKeyComponentToSortedEncodedKeyComponent(Double key)
DimensionIndexerconvertUnsortedEncodedKeyComponentToSortedEncodedKeyComponent in interface DimensionIndexer<Double,Double,Double>key - dimension value array from a TimeAndDims keypublic void fillBitmapsFromUnsortedEncodedKeyComponent(Double key, int rowNum, MutableBitmap[] bitmapIndexes, BitmapFactory factory)
DimensionIndexerfillBitmapsFromUnsortedEncodedKeyComponent in interface DimensionIndexer<Double,Double,Double>key - dimension value array from a TimeAndDims keyrowNum - current row numberbitmapIndexes - array of bitmaps, indexed by integer dimension valuefactory - bitmap factoryCopyright © 2011–2018. All rights reserved.