Package org.apache.druid.segment
Class AbstractDimensionSelector
java.lang.Object
org.apache.druid.segment.AbstractDimensionSelector
- All Implemented Interfaces:
HotLoopCallee,BaseDoubleColumnValueSelector,BaseFloatColumnValueSelector,BaseLongColumnValueSelector,BaseNullableColumnValueSelector,BaseObjectColumnValueSelector<Object>,ColumnValueSelector<Object>,DimensionDictionarySelector,DimensionSelector
- Direct Known Subclasses:
PossiblyNullDimensionSelector
An abstract class that provides an implementation of
getObject().
Don't extend this abstract class if you could provide a more efficient implementation for those methods, implement
DimensionSelector directly then.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.druid.segment.DimensionSelector
DimensionSelector.NullDimensionSelectorHolder -
Field Summary
Fields inherited from interface org.apache.druid.segment.ColumnValueSelector
EMPTY_ARRAYFields inherited from interface org.apache.druid.segment.DimensionDictionarySelector
CARDINALITY_UNKNOWN -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.segment.BaseObjectColumnValueSelector
classOfObjectMethods inherited from interface org.apache.druid.segment.DimensionDictionarySelector
getValueCardinality, idLookup, lookupName, lookupNameUtf8, nameLookupPossibleInAdvance, supportsLookupNameUtf8Methods inherited from interface org.apache.druid.segment.DimensionSelector
defaultGetObject, getDouble, getFloat, getLong, getRow, isNull, makeValueMatcher, makeValueMatcherMethods inherited from interface org.apache.druid.query.monomorphicprocessing.HotLoopCallee
inspectRuntimeShape
-
Constructor Details
-
AbstractDimensionSelector
public AbstractDimensionSelector()
-
-
Method Details
-
getObject
Description copied from interface:BaseObjectColumnValueSelectorReturns the currently-selected object. The behavior of this method depends on the type of selector, which can be determined by callingColumnSelectorFactory.getColumnCapabilities(String)on the sameColumnSelectorFactorythat you got this selector from. If the capabilties are nonnull, the selector type is given byTypeSignature.getType(). String selectors, where type isColumnType.STRING, may return any type of object from this method, especially in cases where the selector is casting objects to string at selection time. Callers are encouraged to avoid the need to deal with various objects by usingColumnSelectorFactory.makeDimensionSelector(org.apache.druid.query.dimension.DimensionSpec)instead. Numeric selectors, whereTypeSignature.isNumeric(), may return any type ofNumber. Callers that wish to deal with more specific types should treat the originalColumnValueSelectoras aBaseLongColumnValueSelector,BaseDoubleColumnValueSelector, orBaseFloatColumnValueSelectorinstead. Array selectors, whereTypeSignature.isArray(), must returnObject[]. The array may contain null elements, and the array itself may also be null. Selectors of unknown type, whereColumnSelectorFactory.getColumnCapabilities(String)returns null, may return any type of object. Callers must be prepared for a wide variety of possible input objects. This case is common during ingestion, where selectors are built on top of external data.- Specified by:
getObjectin interfaceBaseObjectColumnValueSelector<Object>
-