Class SettableObjectColumnValueSelector<T>
- java.lang.Object
-
- org.apache.druid.segment.ObjectColumnSelector<T>
-
- org.apache.druid.segment.selector.settable.SettableObjectColumnValueSelector<T>
-
- All Implemented Interfaces:
HotLoopCallee
,BaseDoubleColumnValueSelector
,BaseFloatColumnValueSelector
,BaseLongColumnValueSelector
,BaseNullableColumnValueSelector
,BaseObjectColumnValueSelector<T>
,ColumnValueSelector<T>
,SettableColumnValueSelector<T>
public class SettableObjectColumnValueSelector<T> extends ObjectColumnSelector<T> implements SettableColumnValueSelector<T>
-
-
Field Summary
-
Fields inherited from interface org.apache.druid.segment.ColumnValueSelector
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description SettableObjectColumnValueSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<T>
classOfObject()
Most-specific class of object returned byBaseObjectColumnValueSelector.getObject()
, if known in advance.T
getObject()
Returns the currently-selected object.void
setValueFrom(ColumnValueSelector selector)
-
Methods inherited from class org.apache.druid.segment.ObjectColumnSelector
getDouble, getFloat, getLong, isNull
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.segment.BaseDoubleColumnValueSelector
getDouble
-
Methods inherited from interface org.apache.druid.segment.BaseFloatColumnValueSelector
getFloat
-
Methods inherited from interface org.apache.druid.segment.BaseLongColumnValueSelector
getLong
-
Methods inherited from interface org.apache.druid.segment.BaseNullableColumnValueSelector
isNull
-
Methods inherited from interface org.apache.druid.segment.selector.settable.SettableColumnValueSelector
inspectRuntimeShape
-
-
-
-
Method Detail
-
setValueFrom
public void setValueFrom(ColumnValueSelector selector)
- Specified by:
setValueFrom
in interfaceSettableColumnValueSelector<T>
-
getObject
@Nullable public T getObject()
Description copied from interface:BaseObjectColumnValueSelector
Returns 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 sameColumnSelectorFactory
that 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 originalColumnValueSelector
as aBaseLongColumnValueSelector
,BaseDoubleColumnValueSelector
, orBaseFloatColumnValueSelector
instead. 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:
getObject
in interfaceBaseObjectColumnValueSelector<T>
-
classOfObject
public Class<T> classOfObject()
Description copied from interface:BaseObjectColumnValueSelector
Most-specific class of object returned byBaseObjectColumnValueSelector.getObject()
, if known in advance. This method returnsObject
when selectors do not know in advance what class of object they may return.- Specified by:
classOfObject
in interfaceBaseObjectColumnValueSelector<T>
-
-