public class FloatDimensionIndexer extends Object implements DimensionIndexer<Float,Float,Float>
ARRAY, LIST
Constructor and Description |
---|
FloatDimensionIndexer() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkUnsortedEncodedKeyComponentsEqual(Float lhs,
Float rhs)
Check if two row value arrays from TimeAndDims keys are equal.
|
int |
compareUnsortedEncodedKeyComponents(Float lhs,
Float rhs)
Compares the row values for this DimensionIndexer's dimension from a TimeAndDims key.
|
Object |
convertUnsortedEncodedKeyComponentToActualArrayOrList(Float 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.
|
Float |
convertUnsortedEncodedKeyComponentToSortedEncodedKeyComponent(Float 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(Float 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.
|
Float |
getMaxValue()
Get the maximum dimension value seen by this indexer.
|
Float |
getMinValue()
Get the minimum dimension value seen by this indexer.
|
Float |
getSortedEncodedValueFromUnsorted(Float unsortedIntermediateValue)
Given an encoded value that was ordered by time of ingestion, return the equivalent
encoded value ordered by associated actual value.
|
Indexed<Float> |
getSortedIndexedValues()
Returns an indexed structure of this dimension's sorted actual values.
|
int |
getUnsortedEncodedKeyComponentHashCode(Float key)
Given a row value array from a TimeAndDims key, generate a hashcode.
|
Float |
getUnsortedEncodedValueFromSorted(Float sortedIntermediateValue)
Given an encoded value that was ordered by associated actual value, return the equivalent
encoded value ordered by time of ingestion.
|
ValueType |
getValueType() |
DimensionSelector |
makeDimensionSelector(DimensionSpec spec,
IncrementalIndexStorageAdapter.EntryHolder currEntry,
IncrementalIndex.DimensionDesc desc)
Return an object used to read values from this indexer's column as Strings.
|
FloatColumnSelector |
makeFloatColumnSelector(IncrementalIndexStorageAdapter.EntryHolder currEntry,
IncrementalIndex.DimensionDesc desc)
Return an object used to read values from this indexer's column as Floats.
|
LongColumnSelector |
makeLongColumnSelector(IncrementalIndexStorageAdapter.EntryHolder currEntry,
IncrementalIndex.DimensionDesc desc)
Return an object used to read values from this indexer's column as Longs.
|
ObjectColumnSelector |
makeObjectColumnSelector(DimensionSpec spec,
IncrementalIndexStorageAdapter.EntryHolder currEntry,
IncrementalIndex.DimensionDesc desc)
Return an object used to read values from this indexer's column as Objects.
|
Float |
processRowValsToUnsortedEncodedKeyComponent(Object dimValues)
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 ValueType getValueType()
getValueType
in interface DimensionIndexer<Float,Float,Float>
public Float processRowValsToUnsortedEncodedKeyComponent(Object dimValues)
DimensionIndexer
processRowValsToUnsortedEncodedKeyComponent
in interface DimensionIndexer<Float,Float,Float>
dimValues
- Single row val to processpublic Float getSortedEncodedValueFromUnsorted(Float unsortedIntermediateValue)
DimensionIndexer
getSortedEncodedValueFromUnsorted
in interface DimensionIndexer<Float,Float,Float>
unsortedIntermediateValue
- value to convertpublic Float getUnsortedEncodedValueFromSorted(Float sortedIntermediateValue)
DimensionIndexer
getUnsortedEncodedValueFromSorted
in interface DimensionIndexer<Float,Float,Float>
sortedIntermediateValue
- value to convertpublic Indexed<Float> getSortedIndexedValues()
DimensionIndexer
getSortedIndexedValues
in interface DimensionIndexer<Float,Float,Float>
public Float getMinValue()
DimensionIndexer
getMinValue
in interface DimensionIndexer<Float,Float,Float>
public Float getMaxValue()
DimensionIndexer
getMaxValue
in interface DimensionIndexer<Float,Float,Float>
public int getCardinality()
DimensionIndexer
getCardinality
in interface DimensionIndexer<Float,Float,Float>
public DimensionSelector makeDimensionSelector(DimensionSpec spec, IncrementalIndexStorageAdapter.EntryHolder currEntry, IncrementalIndex.DimensionDesc desc)
DimensionIndexer
makeDimensionSelector
in interface DimensionIndexer<Float,Float,Float>
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 LongColumnSelector makeLongColumnSelector(IncrementalIndexStorageAdapter.EntryHolder currEntry, IncrementalIndex.DimensionDesc desc)
DimensionIndexer
makeLongColumnSelector
in interface DimensionIndexer<Float,Float,Float>
currEntry
- Provides access to the current TimeAndDims object in the Cursordesc
- Descriptor object for this dimension within an IncrementalIndexpublic FloatColumnSelector makeFloatColumnSelector(IncrementalIndexStorageAdapter.EntryHolder currEntry, IncrementalIndex.DimensionDesc desc)
DimensionIndexer
makeFloatColumnSelector
in interface DimensionIndexer<Float,Float,Float>
currEntry
- Provides access to the current TimeAndDims object in the Cursordesc
- Descriptor object for this dimension within an IncrementalIndexpublic ObjectColumnSelector makeObjectColumnSelector(DimensionSpec spec, IncrementalIndexStorageAdapter.EntryHolder currEntry, IncrementalIndex.DimensionDesc desc)
DimensionIndexer
makeObjectColumnSelector
in interface DimensionIndexer<Float,Float,Float>
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 int compareUnsortedEncodedKeyComponents(Float lhs, Float rhs)
DimensionIndexer
compareUnsortedEncodedKeyComponents
in interface DimensionIndexer<Float,Float,Float>
lhs
- dimension value array from a TimeAndDims keyrhs
- dimension value array from a TimeAndDims keypublic boolean checkUnsortedEncodedKeyComponentsEqual(Float lhs, Float rhs)
DimensionIndexer
checkUnsortedEncodedKeyComponentsEqual
in interface DimensionIndexer<Float,Float,Float>
lhs
- dimension value array from a TimeAndDims keyrhs
- dimension value array from a TimeAndDims keypublic int getUnsortedEncodedKeyComponentHashCode(Float key)
DimensionIndexer
getUnsortedEncodedKeyComponentHashCode
in interface DimensionIndexer<Float,Float,Float>
key
- dimension value array from a TimeAndDims keypublic Object convertUnsortedEncodedKeyComponentToActualArrayOrList(Float key, boolean asList)
DimensionIndexer
convertUnsortedEncodedKeyComponentToActualArrayOrList
in interface DimensionIndexer<Float,Float,Float>
key
- dimension value array from a TimeAndDims keyasList
- if true, return an array; if false, return a listpublic Float convertUnsortedEncodedKeyComponentToSortedEncodedKeyComponent(Float key)
DimensionIndexer
convertUnsortedEncodedKeyComponentToSortedEncodedKeyComponent
in interface DimensionIndexer<Float,Float,Float>
key
- dimension value array from a TimeAndDims keypublic void fillBitmapsFromUnsortedEncodedKeyComponent(Float key, int rowNum, MutableBitmap[] bitmapIndexes, BitmapFactory factory)
DimensionIndexer
fillBitmapsFromUnsortedEncodedKeyComponent
in interface DimensionIndexer<Float,Float,Float>
key
- dimension value array from a TimeAndDims keyrowNum
- current row numberbitmapIndexes
- array of bitmaps, indexed by integer dimension valuefactory
- bitmap factoryCopyright © 2011–2017. All rights reserved.