Package io.deephaven.engine.table
Interface DataIndex
- All Superinterfaces:
BasicDataIndex
,LivenessReferent
- All Known Implementing Classes:
AbstractDataIndex
,RemappedDataIndex
,TableBackedDataIndex
Expansion of
BasicDataIndex
to include methods for transforming the index and fast retrieval of row keys from
lookup keys.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Provides a lookup function from a lookup key to the row key in the index table. -
Method Summary
Modifier and TypeMethodDescriptionremapKeyColumns
(@NotNull Map<ColumnSource<?>, ColumnSource<?>> oldToNewColumnMap) Create a newDataIndex
using the same indexBasicDataIndex.table()
, with the indexed columns inBasicDataIndex.keyColumnNamesByIndexedColumn()
remapped according tooldToNewColumnMap
.@NotNull DataIndex.RowKeyLookup
Build alookup function
of row keys for this index.default @NotNull DataIndex.RowKeyLookup
rowKeyLookup
(@NotNull ColumnSource<?>[] lookupColumns) Return alookup function
function of index row keys for this index.@NotNull BasicDataIndex
transform
(@NotNull DataIndexTransformer transformer) Transform and return a newBasicDataIndex
with the provided transform operations applied.Methods inherited from interface io.deephaven.engine.table.BasicDataIndex
isRefreshing, keyColumnNames, keyColumnNamesByIndexedColumn, keyColumns, keyColumns, rowSetColumn, rowSetColumnName, table
Methods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReference
-
Method Details
-
rowKeyLookup
Build alookup function
of row keys for this index. IfBasicDataIndex.isRefreshing()
istrue
, this lookup function is only guaranteed to be accurate for the current cycle. Lookup keys should be in the order of the index's key columns.- Returns:
- A function that provides map-like lookup of index
BasicDataIndex.table()
row keys from an index lookup key
-
rowKeyLookup
@NotNull @FinalDefault default @NotNull DataIndex.RowKeyLookup rowKeyLookup(@NotNull @NotNull ColumnSource<?>[] lookupColumns) Return alookup function
function of index row keys for this index. IfBasicDataIndex.isRefreshing()
istrue
, this lookup function is only guaranteed to be accurate for the current cycle. Lookup keys should be in the order oflookupColumns
.- Parameters:
lookupColumns
- TheColumnSources
to use for the lookup key- Returns:
- A function that provides map-like lookup of index
BasicDataIndex.table()
row keys from an index lookup key. The result must not be used concurrently by more than one thread.
-
transform
Transform and return a newBasicDataIndex
with the provided transform operations applied. Some transformations will force the result to be a static snapshot even when this DataIndexis refreshing
.- Parameters:
transformer
- TheDataIndexTransformer
specifying the desired transformations- Returns:
- The transformed
BasicDataIndex
-
remapKeyColumns
Create a newDataIndex
using the same indexBasicDataIndex.table()
, with the indexed columns inBasicDataIndex.keyColumnNamesByIndexedColumn()
remapped according tooldToNewColumnMap
. This is used when it is known that an operation has produced new columns that are equivalent to the old indexed columns. The result index may keepthis
index reachable andlive
for its own lifetime, if necessary.- Parameters:
oldToNewColumnMap
- Map from the old indexedColumnSources
to the new indexed ColumnSources- Returns:
- The remapped
DataIndex
-