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

Simplify PartitionedOutputOperator #8437

Merged

Conversation

pettyjamesm
Copy link
Member

Simplifies PartitionedOutputOperator logic in the inner loop by hoisting "any row" replication outside of it and checking Block#mayHaveNull() before querying the null channel on each iteration.

Also adds mayHaveNull() implementations to DictionaryBlock, RunLengthEncodedBlock, and GroupByIdBlock without which that hoisted checking would be less effective.

This change also includes a fix for PartitionedOutputOperator#close() not calling systemMemoryContext#close() (memory was still being released by OperatorContext#destroy() but would use the "force free" allocation tag, resulting in incorrect query OOM top consumer reporting).

@cla-bot cla-bot bot added the cla-signed label Jun 30, 2021
@pettyjamesm pettyjamesm requested a review from dain June 30, 2021 21:15
@pettyjamesm pettyjamesm marked this pull request as ready for review June 30, 2021 21:27
@martint martint self-requested a review June 30, 2021 22:16
@pettyjamesm pettyjamesm force-pushed the improve-partitioned-output-operator branch 3 times, most recently from 35abcb3 to ebfa1bd Compare July 1, 2021 16:24
Copy link
Member

@martint martint left a comment

Choose a reason for hiding this comment

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

Just a minor comment.

@pettyjamesm pettyjamesm force-pushed the improve-partitioned-output-operator branch from ebfa1bd to a7e931d Compare July 7, 2021 21:52
@martint martint self-assigned this Jul 7, 2021
Hoists "any row" replication and nullBlock.isNull logic out of
the PartitionedOutputOperator.PagePartitioner inner loop logic
@pettyjamesm pettyjamesm force-pushed the improve-partitioned-output-operator branch from a7e931d to 8e02194 Compare July 7, 2021 22:29
@martint martint merged commit 6bbe9f1 into trinodb:master Jul 7, 2021
@martint
Copy link
Member

martint commented Jul 7, 2021

Test failures are unrelated.

@martint martint added this to the 360 milestone Jul 7, 2021
@pettyjamesm pettyjamesm deleted the improve-partitioned-output-operator branch July 7, 2021 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants