public interface DimensionSelector extends ColumnValueSelector, HotLoopCallee
Modifier and Type | Field and Description |
---|---|
static int |
CARDINALITY_UNKNOWN |
Modifier and Type | Method and Description |
---|---|
default Object |
defaultGetObject()
Converts the current result of
getRow() into null, if the row is empty, a String, if the row has size 1,
or a String[] array, if the row has size > 1, using lookupName(int) . |
default double |
getDouble()
Deprecated.
|
default float |
getFloat()
Deprecated.
|
default long |
getLong()
Deprecated.
|
IndexedInts |
getRow()
Gets all values for the row inside of an IntBuffer.
|
int |
getValueCardinality()
Value cardinality is the cardinality of the different occurring values.
|
IdLookup |
idLookup()
Returns
IdLookup if available for this DimensionSelector, or null. |
String |
lookupName(int id)
The Name is the String name of the actual field.
|
ValueMatcher |
makeValueMatcher(com.google.common.base.Predicate<String> predicate) |
ValueMatcher |
makeValueMatcher(String value) |
boolean |
nameLookupPossibleInAdvance()
Returns true if it is possible to
lookupName(int) by ids from 0 to getValueCardinality()
before the rows with those ids are returned. |
inspectRuntimeShape
classOfObject, getObject
static final int CARDINALITY_UNKNOWN
@CalledFromHotLoop IndexedInts getRow()
ValueMatcher makeValueMatcher(@Nullable String value)
value
- nullable dimension valueValueMatcher makeValueMatcher(com.google.common.base.Predicate<String> predicate)
int getValueCardinality()
@CalledFromHotLoop @Nullable String lookupName(int id)
id
- id to lookup the field name forboolean nameLookupPossibleInAdvance()
lookupName(int)
by ids from 0 to getValueCardinality()
before the rows with those ids are returned.
Returns false if lookupName(int)
could be called with ids, returned from the most recent call of getRow()
on this DimensionSelector, but not earlier. If getValueCardinality()
of this DimensionSelector
additionally returns CARDINALITY_UNKNOWN
, lookupName()
couldn't be called with ids, returned by
not the most recent call of getRow()
, i. e. names for ids couldn't be looked up "later". If getValueCardinality()
returns a non-negative number, lookupName()
could be called with any ids, returned
from #getRow()
since the creation of this DimensionSelector.
If lookupName(int)
is called with an ineligible id, result is undefined: exception could be thrown, or
null returned, or some other random value.
@Nullable IdLookup idLookup()
IdLookup
if available for this DimensionSelector, or null.@Deprecated default float getFloat()
getFloat
in interface BaseFloatColumnValueSelector
@Deprecated default double getDouble()
getDouble
in interface BaseDoubleColumnValueSelector
@Deprecated default long getLong()
getLong
in interface BaseLongColumnValueSelector
@Nullable default Object defaultGetObject()
getRow()
into null, if the row is empty, a String, if the row has size 1,
or a String[] array, if the row has size > 1, using lookupName(int)
.
This method is not the default implementation of BaseObjectColumnValueSelector.getObject()
to minimize the chance that implementations
"forget" to override it with more optimized version.Copyright © 2011–2018. All rights reserved.