Package org.apache.druid.segment
Class ObjectColumnSelector<T>
- java.lang.Object
-
- org.apache.druid.segment.ObjectColumnSelector<T>
-
- All Implemented Interfaces:
HotLoopCallee,BaseDoubleColumnValueSelector,BaseFloatColumnValueSelector,BaseLongColumnValueSelector,BaseNullableColumnValueSelector,BaseObjectColumnValueSelector<T>,ColumnValueSelector<T>
- Direct Known Subclasses:
ObjectAggregateCombiner,SettableObjectColumnValueSelector
public abstract class ObjectColumnSelector<T> extends Object implements ColumnValueSelector<T>
Restricts selector usage to only allowBaseObjectColumnValueSelector.getObject(). This class is convenient for implementation of "object-sourcing"ColumnValueSelectors. This class should appear ONLY in "extends" clause or anonymous class creation, but NOT in "user" code, whereBaseObjectColumnValueSelectormust be used instead.
-
-
Field Summary
-
Fields inherited from interface org.apache.druid.segment.ColumnValueSelector
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description ObjectColumnSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetDouble()floatgetFloat()longgetLong()booleanisNull()Returns true if the primitive long, double, or float value returned by this selector should be treated as null.-
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.BaseObjectColumnValueSelector
classOfObject, getObject
-
Methods inherited from interface org.apache.druid.query.monomorphicprocessing.HotLoopCallee
inspectRuntimeShape
-
-
-
-
Method Detail
-
getFloat
public final float getFloat()
- Specified by:
getFloatin interfaceBaseFloatColumnValueSelector
-
getDouble
public final double getDouble()
- Specified by:
getDoublein interfaceBaseDoubleColumnValueSelector
-
getLong
public final long getLong()
- Specified by:
getLongin interfaceBaseLongColumnValueSelector
-
isNull
public final boolean isNull()
Description copied from interface:BaseNullableColumnValueSelectorReturns true if the primitive long, double, or float value returned by this selector should be treated as null. Users ofBaseLongColumnValueSelector.getLong(),BaseDoubleColumnValueSelector.getDouble()andBaseFloatColumnValueSelector.getFloat()must check this method first, or else they may improperly use placeholder values returned by the primitive get methods. Users ofBaseObjectColumnValueSelector.getObject()should not call this method. Instead, call "getObject" and check if it is null.- Specified by:
isNullin interfaceBaseNullableColumnValueSelector
-
-