Class StaticHashedNaturalJoinStateManager

java.lang.Object
io.deephaven.engine.table.impl.StaticNaturalJoinStateManager
io.deephaven.engine.table.impl.naturaljoin.StaticHashedNaturalJoinStateManager
Direct Known Subclasses:
StaticNaturalJoinStateManagerTypedBase

public abstract class StaticHashedNaturalJoinStateManager extends StaticNaturalJoinStateManager
  • Constructor Details

    • StaticHashedNaturalJoinStateManager

      protected StaticHashedNaturalJoinStateManager(ColumnSource<?>[] keySourcesForErrorMessages, NaturalJoinType joinType, boolean addOnly)
  • Method Details

    • buildFromLeftSide

      public abstract void buildFromLeftSide(Table leftTable, ColumnSource<?>[] leftSources, IntegerArraySource leftHashSlots)
    • buildFromRightSide

      public abstract void buildFromRightSide(Table rightTable, ColumnSource<?>[] rightSources)
    • decorateLeftSide

      public abstract void decorateLeftSide(RowSet leftRowSet, ColumnSource<?>[] leftSources, LongArraySource leftRedirections)
      Specified by:
      decorateLeftSide in class StaticNaturalJoinStateManager
    • decorateLeftSideIndexed

      public abstract void decorateLeftSideIndexed(RowSet indexTableRowSet, ColumnSource<?>[] indexSources, ColumnSource<RowSet> indexRowSets, LongArraySource leftRedirections)
      Probe the rows of a left data index table, storing one redirection per group. A duplicate right key error names the key of the offending group's first left row, since keySourcesForErrorMessages are columns of the left table rather than of the data index table.
      Parameters:
      indexTableRowSet - the data index table's row set
      indexSources - the data index table's key columns
      indexRowSets - the data index table's row set column, mapping each group to its left rows
      leftRedirections - receives the right row key (or RowSequence.NULL_ROW_KEY) for each group, by position
    • decorateWithRightSide

      public abstract void decorateWithRightSide(Table rightTable, ColumnSource<?>[] rightSources)
    • buildRowRedirectionFromHashSlot

      public abstract WritableRowRedirection buildRowRedirectionFromHashSlot(QueryTable leftTable, IntegerArraySource leftHashSlots, JoinControl.RedirectionType redirectionType)
    • buildRowRedirectionFromRedirections

      public abstract WritableRowRedirection buildRowRedirectionFromRedirections(QueryTable leftTable, LongArraySource leftRedirections, JoinControl.RedirectionType redirectionType)
    • buildIndexedRowRedirectionFromRedirections

      public abstract WritableRowRedirection buildIndexedRowRedirectionFromRedirections(QueryTable leftTable, RowSet indexTableRowSet, LongArraySource leftRedirections, ColumnSource<RowSet> indexRowSets, JoinControl.RedirectionType redirectionType)
    • buildIndexedRowRedirectionFromHashSlots

      public abstract WritableRowRedirection buildIndexedRowRedirectionFromHashSlots(QueryTable leftTable, RowSet indexTableRowSet, IntegerArraySource leftHashSlots, ColumnSource<RowSet> indexRowSets, JoinControl.RedirectionType redirectionType)
    • buildIndexedRowRedirection

      protected WritableRowRedirection buildIndexedRowRedirection(QueryTable leftTable, RowSet indexTableRowSet, LongUnaryOperator groupPositionToRightSide, ColumnSource<RowSet> leftRowSets, JoinControl.RedirectionType redirectionType, boolean keySourcesFromLeftTable)
      Parameters:
      keySourcesFromLeftTable - whether keySourcesForErrorMessages are columns of the left table (as when building from redirections) rather than columns of the data index table (as when building from hash slots); determines which keyspace error row keys are produced in
    • errorOnDuplicates

      public void errorOnDuplicates(long size, LongUnaryOperator positionToRightSide, LongUnaryOperator positionToErrorRowKey)
      Throw the duplicate right key error for the first build position whose slot was marked as a duplicate.
      Parameters:
      size - the number of build positions
      positionToRightSide - maps a build position to its slot's right state
      positionToErrorRowKey - maps a build position to a row key in the keyspace of keySourcesForErrorMessages (the left table when built from the left input, the data index table when built from a left data index)
    • errorOnDuplicatesIndexed

      public abstract void errorOnDuplicatesIndexed(IntegerArraySource leftHashSlots, RowSet indexTableRowSet)
      Throw the duplicate right key error after a build from a left data index; the error key sources are columns of the data index table.
      Parameters:
      leftHashSlots - the hash slot of each data index table row, by position
      indexTableRowSet - the data index table's row set
    • errorOnDuplicatesSingle

      public abstract void errorOnDuplicatesSingle(IntegerArraySource leftHashSlots, long size, RowSet rowSet)
      Throw the duplicate right key error after a build from the left table; the error key sources are columns of the left table.
      Parameters:
      leftHashSlots - the hash slot of each left row, by position
      size - the number of left rows
      rowSet - the left table's row set