Skip to content
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

RowKey-Agnostic ColumnSource Optimizations #3329

Merged
merged 5 commits into from
Jan 19, 2023

Conversation

nbauernfeind
Copy link
Member

There are some cases where we do not actually need to wrap column sources with redirections. These three sets of ColumnSources are agnostic to the row key: SingleValue, ImmutableConstant, and NullValue. Since all rows are identical for columns of these types we can avoid wrapping them in scenarios where we do not rely on NULL_ROW_KEY mappings.

We do need NULL_ROW_KEY mappings for naturalJoin, leftOuterJoin, and asOfJoin. It may make sense for me to back-out the maybeRedirect calls in some of the hash table, and/or aggregation, implementations when we know that we've created column sources that will always be redirected.

This change set includes some of the performance improvements suggested in #2425.

Includes the following DHE ports:

  • DH-12201: Create BooleanSingleValueSource
  • DH-12310: SingleValue Column Sources Must Handle NULL_ROW_KEY

Nightlies ran here. They failed normal Check CI due to spotless. I've squashed the spotless fix into the commit already; and believe that we can use the CI run from regular PR actions to confirm they pass.

Port DH-12201: Create BooleanSingleValueSource
Port DH-12310: SingleValue Column Sources Must Handle NULL_ROW_KEY
@Override
public void fillPrevChunk(@NotNull FillContext context,
@NotNull WritableChunk<? super Values> destination, @NotNull RowSequence rowSequence) {
// We can only hold one value, fill the chunk with the value obtained from an arbitrarily valid rowKey
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question, except prev, although at least prev has logic you might want to avoid replicating.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed up the comment - but yeah, it feels easier to maintain to not duplicate

@nbauernfeind nbauernfeind requested a review from rcaudy January 19, 2023 18:43
@nbauernfeind nbauernfeind merged commit 14fc5bd into deephaven:main Jan 19, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants