Interface AggregationRowLookup
public interface AggregationRowLookup
Tool to identify the aggregation result row key (also row position) from a logical key representing a set of values
for the aggregation's group-by columns.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Re-usable unknown row constant to serve as the default return value fornoEntryValue()
.static final Object[]
Re-usable empty key, for use in (trivial) reverse lookups against no-key aggregations. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the row key value wherekey
exists in the aggregation result table, or thenoEntryValue()
ifkey
is not found in the table.default int
-
Field Details
-
EMPTY_KEY
Re-usable empty key, for use in (trivial) reverse lookups against no-key aggregations. -
DEFAULT_UNKNOWN_ROW
static final int DEFAULT_UNKNOWN_ROWRe-usable unknown row constant to serve as the default return value fornoEntryValue()
.- See Also:
-
-
Method Details
-
get
Gets the row key value wherekey
exists in the aggregation result table, or thenoEntryValue()
ifkey
is not found in the table.This serves to map group-by column values to the row position (also row key) in the result table. Missing keys will map to
noEntryValue()
.Keys are specified as follows:
- No group-by columns
- "Empty" keys are signified by the
EMPTY_KEY
object, or any zero-lengthObject[]
- One group-by column
- Singular keys are (boxed, if needed) objects
- Multiple group-by columns
- Compound keys are
Object[]
of (boxed, if needed) objects, in the order of the aggregation's group-by columns
All key fields must be reinterpreted to the appropriate primitive value before boxing. See
ReinterpretUtils.maybeConvertToPrimitive(io.deephaven.engine.table.ColumnSource<?>)
.- Parameters:
key
- A single (boxed) value for single-column keys, or an array of (boxed) values for compound keys- Returns:
- The row key where
key
exists in the table
-
noEntryValue
default int noEntryValue()- Returns:
- The value that will be returned from
get(Object)
if no entry exists for a given key
-