Class DataIndexUtils

java.lang.Object
io.deephaven.engine.table.impl.dataindex.DataIndexUtils

public class DataIndexUtils extends Object
Tools for working with data indices.
  • Constructor Details

    • DataIndexUtils

      public DataIndexUtils()
  • Method Details

    • makeBoxedKeySource

      public static ChunkSource.WithPrev<Values> makeBoxedKeySource(@NotNull @NotNull ColumnSource<?>... keySources)
      Make a ChunkSource that produces data index lookup keys from keySources.
      Parameters:
      keySources - The individual key sources
      Returns:
      The boxed key source
    • makeKeySet

      public static DataIndexKeySet makeKeySet(int keyColumnCount)
      Make a DataIndexKeySet that stores data index lookup keys that have keyColumnCount components.
      Parameters:
      keyColumnCount - The number of key components
      Returns:
      The key set
    • makeKeySet

      public static DataIndexKeySet makeKeySet(int keyColumnCount, int initialCapacity)
      Make a DataIndexKeySet that stores data index lookup keys that have keyColumnCount components.
      Parameters:
      keyColumnCount - The number of key components
      initialCapacity - The initial capacity
      Returns:
      The key set
    • lookupKeysEqual

      public static boolean lookupKeysEqual(@Nullable @Nullable Object key1, @Nullable @Nullable Object key2)
      Test equality between two data index lookup keys.
      Returns:
      Whether the two keys are equal
    • hashLookupKey

      public static int hashLookupKey(@Nullable @Nullable Object key)
      Compute the hash code for a data index lookup key.
      Parameters:
      key - The lookup key
      Returns:
      The hash code
    • buildRowKeyMappingFunction

      public static ToLongFunction<Object> buildRowKeyMappingFunction(Table indexTable, String[] keyColumnNames)
      Build a mapping function from the lookup keys of the provided index Table to row keys in the table.
      Parameters:
      indexTable - The Table to search
      keyColumnNames - The key columns to search
      Returns:
      A mapping function from lookup keys to indexTable row keys