Interface IncrementalIndexRowSelector
- All Superinterfaces:
ColumnInspector,Expr.InputBindingInspector
- All Known Implementing Classes:
IncrementalIndex,OnHeapAggregateProjection,OnheapIncrementalIndex
Interface that abstracts selecting data from a
FactsHolder-
Method Summary
Modifier and TypeMethodDescriptiongetColumnFormat(String columnName) GetColumnFormatfor a dimension, metrics, or time column, or null if the column does not existgetDimension(String columnName) getIncrementalIndex.DimensionDescfor the specified column, if available, which provides access to things likeDimensionIndexerandDimensionHandleras well as column capabilities and position within the rowgetDimensionNames(boolean includeTime) Returns list of dimension names for the row selector, optionally including the time column.Returns list ofIncrementalIndex.DimensionDescfor the row selectorgetFacts()Get theFactsHoldercontaining all of theIncrementalIndexRowbacking this selectorintHighest valueIncrementalIndexRow.getRowIndex()available in this selector.GetIncrementalIndex.MetricDescwhich provides column capabilities and position in the aggregators section of the rowdoublegetMetricDoubleValue(int rowOffset, int aggOffset) floatgetMetricFloatValue(int rowOffset, int aggOffset) longgetMetricLongValue(int rowOffset, int aggOffset) Returns list of all metric column names for the row selectorgetMetricObjectValue(int rowOffset, int aggOffset) Ordering for the data in the facts tableintPosition of the time column ingetOrdering()booleanisEmpty()Are there anyIncrementalIndexRowstored in theFactsHolder?booleanisNull(int rowOffset, int aggOffset) intnumRows()Number of rows inFactsHolderMethods inherited from interface org.apache.druid.segment.ColumnInspector
getColumnCapabilities, getTypeMethods inherited from interface org.apache.druid.math.expr.Expr.InputBindingInspector
areNumeric, areNumeric, areSameTypes, areSameTypes, areScalar, areScalar, canVectorize, canVectorize
-
Method Details
-
getDimensions
List<IncrementalIndex.DimensionDesc> getDimensions()Returns list ofIncrementalIndex.DimensionDescfor the row selector -
getDimensionNames
Returns list of dimension names for the row selector, optionally including the time column. If time is included, the order columns appear in this list will matchgetOrdering() -
getMetricNames
Returns list of all metric column names for the row selector -
getDimension
getIncrementalIndex.DimensionDescfor the specified column, if available, which provides access to things likeDimensionIndexerandDimensionHandleras well as column capabilities and position within the row -
getMetric
GetIncrementalIndex.MetricDescwhich provides column capabilities and position in the aggregators section of the row -
getColumnFormat
GetColumnFormatfor a dimension, metrics, or time column, or null if the column does not exist -
getOrdering
Ordering for the data in the facts table -
getTimePosition
int getTimePosition()Position of the time column ingetOrdering() -
isEmpty
boolean isEmpty()Are there anyIncrementalIndexRowstored in theFactsHolder? -
numRows
int numRows()Number of rows inFactsHolder -
getFacts
FactsHolder getFacts()Get theFactsHoldercontaining all of theIncrementalIndexRowbacking this selector -
getLastRowIndex
int getLastRowIndex()Highest valueIncrementalIndexRow.getRowIndex()available in this selector. Note that these values do not reflect the position of the row in theFactsHolder, rather just the order in which they were processed -
getMetricFloatValue
float getMetricFloatValue(int rowOffset, int aggOffset) - Parameters:
rowOffset- row to get float aggregator valueaggOffset- position of the aggregator in the aggregators array of the data schema- Returns:
- float value of the metric
-
getMetricLongValue
long getMetricLongValue(int rowOffset, int aggOffset) - Parameters:
rowOffset- row to get long aggregator valueaggOffset- position of the aggregator in the aggregators array of the data schema- Returns:
- long value of the aggregator for this row
-
getMetricDoubleValue
double getMetricDoubleValue(int rowOffset, int aggOffset) - Parameters:
rowOffset- row to get double aggregator valueaggOffset- position of the aggregator in the aggregators array of the data schema- Returns:
- double value of the aggregator for this row
-
getMetricObjectValue
- Parameters:
rowOffset- row to get long aggregator valueaggOffset- position of the aggregator in the aggregators array of the data schema- Returns:
- long value of the aggregator for this row
-
isNull
boolean isNull(int rowOffset, int aggOffset) - Parameters:
rowOffset- row to check for a aggregator valueaggOffset- position of the aggregator in the aggregators array of the data schema- Returns:
- is the value null for this row?
-