forked from deephaven/deephaven-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Open Addressing to support AsOfJoin (deephaven#2396)
* implemented static and incremental OA hashing for asOf joings
- Loading branch information
Showing
36 changed files
with
6,088 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...le/src/main/java/io/deephaven/engine/table/impl/RightIncrementalAsOfJoinStateManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package io.deephaven.engine.table.impl; | ||
|
||
import io.deephaven.engine.rowset.RowSequence; | ||
import io.deephaven.engine.rowset.RowSet; | ||
import io.deephaven.engine.table.ColumnSource; | ||
import io.deephaven.engine.table.impl.sources.LongSparseArraySource; | ||
import io.deephaven.engine.table.impl.util.ContiguousWritableRowRedirection; | ||
import io.deephaven.engine.table.impl.util.LongColumnSourceWritableRowRedirection; | ||
import io.deephaven.engine.table.impl.util.WritableRowRedirection; | ||
import io.deephaven.engine.table.impl.util.WritableRowRedirectionLockFree; | ||
|
||
import java.util.Arrays; | ||
import java.util.Objects; | ||
import java.util.function.LongUnaryOperator; | ||
import java.util.stream.Collectors; | ||
|
||
public abstract class RightIncrementalAsOfJoinStateManager { | ||
public static final long NO_RIGHT_ENTRY_VALUE = RowSequence.NULL_ROW_KEY; | ||
|
||
protected final ColumnSource<?>[] keySourcesForErrorMessages; | ||
|
||
protected RightIncrementalAsOfJoinStateManager(ColumnSource<?>[] keySourcesForErrorMessages) { | ||
this.keySourcesForErrorMessages = keySourcesForErrorMessages; | ||
} | ||
|
||
// produce a pretty key for error messages | ||
protected String extractKeyStringFromSourceTable(long leftKey) { | ||
if (keySourcesForErrorMessages.length == 1) { | ||
return Objects.toString(keySourcesForErrorMessages[0].get(leftKey)); | ||
} | ||
return "[" + Arrays.stream(keySourcesForErrorMessages).map(ls -> Objects.toString(ls.get(leftKey))).collect(Collectors.joining(", ")) + "]"; | ||
} | ||
} |
Oops, something went wrong.