Class NullColumn.Accessor
- java.lang.Object
-
- org.apache.druid.query.rowsandcols.column.NullColumn.Accessor
-
- All Implemented Interfaces:
BinarySearchableAccessor,ColumnAccessor
- Enclosing class:
- NullColumn
public static class NullColumn.Accessor extends Object implements BinarySearchableAccessor
-
-
Constructor Summary
Constructors Constructor Description Accessor(ColumnType type, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareRows(int lhsRowNum, int rhsRowNum)Compares two rows using a comparison that follows the same semantics asComparator.compare(T, T)FindResultfindComplex(int startIndex, int endIndex, Object val)FindResultfindDouble(int startIndex, int endIndex, double val)FindResultfindFloat(int startIndex, int endIndex, float val)FindResultfindLong(int startIndex, int endIndex, long val)FindResultfindNull(int startIndex, int endIndex)FindResultfindString(int startIndex, int endIndex, String val)doublegetDouble(int rowNum)Get the primitivedoublerepresentation of the row.floatgetFloat(int rowNum)Get the primitivefloatrepresentation of the row.intgetInt(int rowNum)Get the primitiveintrepresentation of the row.longgetLong(int rowNum)Get the primitivelongrepresentation of the row.ObjectgetObject(int rowNum)Get theObjectrepresentation of the row.ColumnTypegetType()Get the type of the ColumnbooleanisNull(int rowNum)Get whether the value of a row is nullintnumRows()Get the number of rows
-
-
-
Constructor Detail
-
Accessor
public Accessor(ColumnType type, int size)
-
-
Method Detail
-
getType
public ColumnType getType()
Description copied from interface:ColumnAccessorGet the type of the Column- Specified by:
getTypein interfaceColumnAccessor- Returns:
- the type of the Column
-
numRows
public int numRows()
Description copied from interface:ColumnAccessorGet the number of rows- Specified by:
numRowsin interfaceColumnAccessor- Returns:
- the number of rows
-
isNull
public boolean isNull(int rowNum)
Description copied from interface:ColumnAccessorGet whether the value of a row is null- Specified by:
isNullin interfaceColumnAccessor- Parameters:
rowNum- the row id, 0-indexed- Returns:
- true if the value is null
-
getObject
@Nullable public Object getObject(int rowNum)
Description copied from interface:ColumnAccessorGet theObjectrepresentation of the row.- Specified by:
getObjectin interfaceColumnAccessor- Parameters:
rowNum- the row id, 0-indexed- Returns:
- the
Objectrepresentation of the row. ReturnsnullIfColumnAccessor.isNull(int)is true.
-
getDouble
public double getDouble(int rowNum)
Description copied from interface:ColumnAccessorGet the primitivedoublerepresentation of the row.- Specified by:
getDoublein interfaceColumnAccessor- Parameters:
rowNum- the row id, 0-indexed- Returns:
- the primitive
doublerepresentation of the row. Returns0DIfColumnAccessor.isNull(int)is true.
-
getFloat
public float getFloat(int rowNum)
Description copied from interface:ColumnAccessorGet the primitivefloatrepresentation of the row.- Specified by:
getFloatin interfaceColumnAccessor- Parameters:
rowNum- the row id, 0-indexed- Returns:
- the primitive
floatrepresentation of the row. Returns0FIfColumnAccessor.isNull(int)is true.
-
getLong
public long getLong(int rowNum)
Description copied from interface:ColumnAccessorGet the primitivelongrepresentation of the row.- Specified by:
getLongin interfaceColumnAccessor- Parameters:
rowNum- the row id, 0-indexed- Returns:
- the primitive
longrepresentation of the row. Returns0LIfColumnAccessor.isNull(int)is true.
-
getInt
public int getInt(int rowNum)
Description copied from interface:ColumnAccessorGet the primitiveintrepresentation of the row.- Specified by:
getIntin interfaceColumnAccessor- Parameters:
rowNum- the row id, 0-indexed- Returns:
- the primitive
intrepresentation of the row. Returns0IfColumnAccessor.isNull(int)is true.
-
compareRows
public int compareRows(int lhsRowNum, int rhsRowNum)Description copied from interface:ColumnAccessorCompares two rows using a comparison that follows the same semantics asComparator.compare(T, T)This is not comparing the row Ids, but the values referred to by the row ids.
- Specified by:
compareRowsin interfaceColumnAccessor- Parameters:
lhsRowNum- the row id of the left-hand-side of the comparisonrhsRowNum- the row id of the right-hand-side of the comparison- Returns:
- the result of the comparison of the two rows
-
findNull
public FindResult findNull(int startIndex, int endIndex)
- Specified by:
findNullin interfaceBinarySearchableAccessor
-
findDouble
public FindResult findDouble(int startIndex, int endIndex, double val)
- Specified by:
findDoublein interfaceBinarySearchableAccessor
-
findFloat
public FindResult findFloat(int startIndex, int endIndex, float val)
- Specified by:
findFloatin interfaceBinarySearchableAccessor
-
findLong
public FindResult findLong(int startIndex, int endIndex, long val)
- Specified by:
findLongin interfaceBinarySearchableAccessor
-
findString
public FindResult findString(int startIndex, int endIndex, String val)
- Specified by:
findStringin interfaceBinarySearchableAccessor
-
findComplex
public FindResult findComplex(int startIndex, int endIndex, Object val)
- Specified by:
findComplexin interfaceBinarySearchableAccessor
-
-