Class DoubleColumnAccessorBase
java.lang.Object
org.apache.druid.query.rowsandcols.column.accessor.DoubleColumnAccessorBase
- All Implemented Interfaces:
ColumnAccessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareRows(int lhsRowNum, int rhsRowNum) Compares two rows using a comparison that follows the same semantics asComparator.compare(T, T)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.getObject(int rowNum) Get theObjectrepresentation of the row.getType()Get the type of the ColumnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.query.rowsandcols.column.ColumnAccessor
getDouble, isNull, numRows
-
Constructor Details
-
DoubleColumnAccessorBase
public DoubleColumnAccessorBase()
-
-
Method Details
-
getType
Description copied from interface:ColumnAccessorGet the type of the Column- Specified by:
getTypein interfaceColumnAccessor- Returns:
- the type of the Column
-
getObject
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.
-
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
-