Class ChangedKeyRows

java.lang.Object
io.deephaven.engine.table.impl.join.ChangedKeyRows

public class ChangedKeyRows extends Object
Splits the modified rows of an update into those whose key value changed and those whose key value did not, by comparing the previous key values (read at the pre-shift row keys) with the current key values (read at the post-shift row keys). A join only needs to move the rows whose key value changed between hash slots; the rest keep their slot and cost no hash lookups.

The previous key values of the changed rows are handed to an optional probe as each chunk is processed, so a hash table keyed by the previous values can drop those rows without reading the previous values a second time.

  • Constructor Details

    • ChangedKeyRows

      public ChangedKeyRows(ChunkType[] chunkTypes)
  • Method Details

    • findChanged

      public void findChanged(ColumnSource<?>[] keySources, RowSet modifiedPreShift, RowSet modifiedPostShift, @Nullable @Nullable RowSetBuilderSequential changedPreShift, RowSetBuilderSequential changedPostShift, @Nullable TypedHasherUtil.ProbeHandler previousKeyProbe)
      Find the modified rows whose key value changed.
      Parameters:
      keySources - the key sources, one per key column, read for both previous and current values
      modifiedPreShift - the modified rows in pre-shift key space, aligned positionally with modifiedPostShift
      modifiedPostShift - the modified rows in post-shift key space
      changedPreShift - if not null, output, ascending, receives the pre-shift keys of the rows whose key value changed, aligned with changedPostShift
      changedPostShift - output, ascending, receives the post-shift keys of the rows whose key value changed
      previousKeyProbe - if not null, called once per chunk with the changed rows' pre-shift row keys and their previous key values