Package io.deephaven.engine.table
Interface DataIndex
- All Superinterfaces:
BasicDataIndex,LivenessReferent
- All Known Subinterfaces:
DataIndexer.RetainableDataIndex
- 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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceProvides 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 newDataIndexusing the same indexBasicDataIndex.table(), with the indexed columns inBasicDataIndex.keyColumnNamesByIndexedColumn()remapped according tooldToNewColumnMap.default @NotNull DataIndex.RowKeyLookupBuild alookup functionof row keys for this index.default @NotNull DataIndex.RowKeyLookuprowKeyLookup(@NotNull ColumnSource<?>[] lookupColumns) Return alookup functionfunction of index row keys for this index.@NotNull DataIndex.RowKeyLookuprowKeyLookup(DataIndexOptions options) Build alookup functionof row keys for this index.@NotNull BasicDataIndextransform(@NotNull DataIndexTransformer transformer) Transform and return a newBasicDataIndexwith the provided transform operations applied.Methods inherited from interface io.deephaven.engine.table.BasicDataIndex
isRefreshing, keyColumnNames, keyColumnNamesByIndexedColumn, keyColumns, keyColumns, rowSetColumn, rowSetColumn, rowSetColumnName, table, table, tableIsCachedMethods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReference
-
Method Details
-
rowKeyLookup
Build alookup functionof 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
Build alookup functionof 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.- Parameters:
options- parameters for building the table, if required by this RowKeyLookup- 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 functionfunction 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- TheColumnSourcesto 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 newBasicDataIndexwith the provided transform operations applied. Some transformations will force the result to be a static snapshot even when this DataIndexis refreshing.- Parameters:
transformer- TheDataIndexTransformerspecifying the desired transformations- Returns:
- The transformed
BasicDataIndex
-
remapKeyColumns
Create a newDataIndexusing 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 keepthisindex reachable andlivefor its own lifetime, if necessary.- Parameters:
oldToNewColumnMap- Map from the old indexedColumnSourcesto the new indexed ColumnSources- Returns:
- The remapped
DataIndex
-