Package org.apache.druid.frame.field
Class NumericFieldReader
- java.lang.Object
-
- org.apache.druid.frame.field.NumericFieldReader
-
- All Implemented Interfaces:
FieldReader
- Direct Known Subclasses:
DoubleFieldReader,FloatFieldReader,LongFieldReader
public abstract class NumericFieldReader extends Object implements FieldReader
Reads the fields created by theNumericFieldWriter. See the Javadoc for the writer for format details- See Also:
NumericFieldWriter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNumericFieldReader.SelectorHelper class which allows the inheritors to fetch the nullity of the field located at fieldPointer's position in the dataRegion.
-
Constructor Summary
Constructors Constructor Description NumericFieldReader(boolean forArray)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ColumnValueSelector<?>getColumnValueSelector(org.apache.datasketches.memory.Memory memory, ReadableFieldPointer fieldPointer, byte nullIndicatorByte)Creates a column value selector for the element written at fieldPointer's position in the memory.abstract ValueTypegetValueType()ValueTypeof the inheritor's elementbooleanisComparable()Whether this field is comparable.booleanisNull(org.apache.datasketches.memory.Memory memory, long position)Whether the provided memory position points to a null value.ColumnValueSelector<?>makeColumnValueSelector(org.apache.datasketches.memory.Memory memory, ReadableFieldPointer fieldPointer)Create aColumnValueSelectorbacked by some memory and a moveable pointer.DimensionSelectormakeDimensionSelector(org.apache.datasketches.memory.Memory memory, ReadableFieldPointer fieldPointer, ExtractionFn extractionFn)Create aDimensionSelectorbacked by some memory and a moveable pointer.
-
-
-
Method Detail
-
makeColumnValueSelector
public ColumnValueSelector<?> makeColumnValueSelector(org.apache.datasketches.memory.Memory memory, ReadableFieldPointer fieldPointer)
Description copied from interface:FieldReaderCreate aColumnValueSelectorbacked by some memory and a moveable pointer.- Specified by:
makeColumnValueSelectorin interfaceFieldReader
-
makeDimensionSelector
public DimensionSelector makeDimensionSelector(org.apache.datasketches.memory.Memory memory, ReadableFieldPointer fieldPointer, @Nullable ExtractionFn extractionFn)
Description copied from interface:FieldReaderCreate aDimensionSelectorbacked by some memory and a moveable pointer.- Specified by:
makeDimensionSelectorin interfaceFieldReader
-
isNull
public boolean isNull(org.apache.datasketches.memory.Memory memory, long position)Description copied from interface:FieldReaderWhether the provided memory position points to a null value.- Specified by:
isNullin interfaceFieldReader
-
isComparable
public boolean isComparable()
Description copied from interface:FieldReaderWhether this field is comparable. Comparable fields can be compared as unsigned bytes.- Specified by:
isComparablein interfaceFieldReader
-
getColumnValueSelector
public abstract ColumnValueSelector<?> getColumnValueSelector(org.apache.datasketches.memory.Memory memory, ReadableFieldPointer fieldPointer, byte nullIndicatorByte)
Creates a column value selector for the element written at fieldPointer's position in the memory. The nullilty check is handled by the nullIndicatorByte
-
-