Package org.apache.druid.segment.shim
Class ShimObjectColumnValueSelector
java.lang.Object
org.apache.druid.segment.ObjectColumnSelector<Object>
org.apache.druid.segment.shim.ShimObjectColumnValueSelector
- All Implemented Interfaces:
HotLoopCallee,BaseDoubleColumnValueSelector,BaseFloatColumnValueSelector,BaseLongColumnValueSelector,BaseNullableColumnValueSelector,BaseObjectColumnValueSelector<Object>,ColumnValueSelector<Object>
-
Field Summary
Fields inherited from interface org.apache.druid.segment.ColumnValueSelector
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionShimObjectColumnValueSelector(ShimCursor cursor, VectorObjectSelector vectorSelector) -
Method Summary
Modifier and TypeMethodDescriptionClass<?> Most-specific class of object returned byBaseObjectColumnValueSelector.getObject(), if known in advance.Returns the currently-selected object.voidinspectRuntimeShape(RuntimeShapeInspector inspector) Implementations of this method should callinspector.visit()with all fields of this class, which meet two conditions: 1.Methods inherited from class org.apache.druid.segment.ObjectColumnSelector
getDouble, getFloat, getLong, isNull
-
Constructor Details
-
ShimObjectColumnValueSelector
-
-
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. -
classOfObject
Description copied from interface:BaseObjectColumnValueSelectorMost-specific class of object returned byBaseObjectColumnValueSelector.getObject(), if known in advance. This method returnsObjectwhen selectors do not know in advance what class of object they may return. -
inspectRuntimeShape
Description copied from interface:HotLoopCalleeImplementations of this method should callinspector.visit()with all fields of this class, which meet two conditions: 1. They are used in methods of this class, annotated withCalledFromHotLoop2. They are either: a. Nullable objects b. Instances of HotLoopCallee c. Objects, which don't always have a specific class in runtime. For example, a field of typeSetcould beHashSetorTreeSetin runtime, depending on how this instance (the instance on which inspectRuntimeShape() is called) is configured. d. ByteBuffer or similar objects, where byte order matters e. boolean flags, affecting branch taking f. Arrays of objects, meeting any of conditions a-e.
-