-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnionSourceManager: Do Not Generate Shifts on Empty Constituents #3610
Conversation
engine/table/src/main/java/io/deephaven/engine/table/impl/BaseTable.java
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/BaseTable.java
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Outdated
Show resolved
Hide resolved
if (slotAllocationChanged) { | ||
currFirstRowKeys[nextCurrentSlot + 1] = checkOverflow(nextSlotPrevFirstRowKey + shiftDelta); | ||
resultRows.insertWithShift(currFirstRowKey, constituent.getRowSet()); | ||
if (shiftDelta != 0) { | ||
// don't bother shifting if the constituent is empty | ||
if (shiftDelta != 0 && constituent.size() > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move the line above (insertWithShift
) into this if
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is shiftDelta
guaranteed to be non-zero here? We clear resultRows
past the first shifted row when we set slotAllocationChanged
to true. If it is valid for shiftDelta to be zero, then we must add the constituent to the result set unconditionally.
I'll drop the shiftDelta
of zero check. I believe with your partition table related changes that constituents can be removed causing negative shifts; and thus a shift of zero is possible. However, shiftRange
does ignore shifts of zero.
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UnionSourceManager.java
Outdated
Show resolved
Hide resolved
…ces/UnionSourceManager.java Co-authored-by: Ryan Caudy <[email protected]>
…Table.java Co-authored-by: Ryan Caudy <[email protected]>
…ces/UnionSourceManager.java Co-authored-by: Ryan Caudy <[email protected]>
Fixes #3594.
Nightlies are running at: https://github.com/nbauernfeind/deephaven-core/actions/runs/4545546046