Skip to content

Fix PositionsAppender#build for null Block#12670

Merged
sopel39 merged 1 commit intotrinodb:masterfrom
starburstdata:ls/019-poo-null-block-fix
Jun 3, 2022
Merged

Fix PositionsAppender#build for null Block#12670
sopel39 merged 1 commit intotrinodb:masterfrom
starburstdata:ls/019-poo-null-block-fix

Conversation

@lukasz-stec
Copy link
Copy Markdown
Member

Description

If the created block had only null positions
the dedicated PositionAppender's were
not correctly reset.

Is this change a fix, improvement, new feature, refactoring, or other?

Fix

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)
core query engine, PartitionedOutputOperator
How would you describe this change to a non-technical end user or system administrator?

bug fix

Related issues, pull requests, and links

Fixes #12667

Documentation

( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

( ) No release notes entries required.
( ) Release notes entries required with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

Copy link
Copy Markdown
Member

@sopel39 sopel39 Jun 3, 2022

Choose a reason for hiding this comment

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

Think about other edge cases too:

  1. Empty block
  2. Rle followed by empty block
  3. Empty rle followed by null block

Can be separate PR too

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Since build must reset the appenders state I added these cases in one go in io.trino.operator.output.TestPositionsAppender#testConsecutiveBuilds

If the created block had only null positions
the dedicated PositionAppender's were
not correctly reset.
@lukasz-stec lukasz-stec force-pushed the ls/019-poo-null-block-fix branch from 480f4d4 to d7d2757 Compare June 3, 2022 07:55
Copy link
Copy Markdown
Member Author

@lukasz-stec lukasz-stec left a comment

Choose a reason for hiding this comment

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

comments addressed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Since build must reset the appenders state I added these cases in one go in io.trino.operator.output.TestPositionsAppender#testConsecutiveBuilds

@lukasz-stec lukasz-stec requested a review from sopel39 June 3, 2022 07:57
Copy link
Copy Markdown
Member

@sopel39 sopel39 left a comment

Choose a reason for hiding this comment

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

thanks!

@sopel39 sopel39 merged commit 8c13833 into trinodb:master Jun 3, 2022
@github-actions github-actions bot added this to the 384 milestone Jun 3, 2022
@sopel39 sopel39 mentioned this pull request Jun 3, 2022
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.

Trino 383 Regression: Declared positions (3062) does not match block 1's number of entries

2 participants