Skip to content

Comments

Fix null projects handling in RowPositionsAppender#15948

Merged
sopel39 merged 1 commit intotrinodb:masterfrom
starburstdata:ls/064-row-appender-null-project
Feb 3, 2023
Merged

Fix null projects handling in RowPositionsAppender#15948
sopel39 merged 1 commit intotrinodb:masterfrom
starburstdata:ls/064-row-appender-null-project

Conversation

@lukasz-stec
Copy link
Member

Description

In case of null projection with UnknownType,
Rle with null ByteArrayBlock value is created.
This breaks RowPositionsAppender assumption
about incoming block type.

Additional context and related issues

Release notes

( X) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

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

@cla-bot cla-bot bot added the cla-signed label Feb 2, 2023
In case of null projection with UnknownType,
Rle with null ByteArrayBlock value is created.
This breaks RowPositionsAppender assumption
about incoming block type.
@lukasz-stec lukasz-stec force-pushed the ls/064-row-appender-null-project branch from 669608d to dd4e339 Compare February 2, 2023 15:03
@lukasz-stec lukasz-stec marked this pull request as ready for review February 3, 2023 09:28
@lukasz-stec lukasz-stec requested review from Dith3r and sopel39 February 3, 2023 09:30
ensureCapacity(rlePositionCount);
AbstractRowBlock sourceRowBlock = (AbstractRowBlock) value;
if (sourceRowBlock.isNull(0)) {
if (value instanceof AbstractRowBlock sourceRowBlock) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think there might be other places where we assume AbstractRowBlock always

public static Object[][] types()
{
return Arrays.stream(TestType.values())
.filter(testType -> !testType.equals(TestType.UNKNOWN))
Copy link
Member

Choose a reason for hiding this comment

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

nit: why to filter it

Copy link
Member Author

Choose a reason for hiding this comment

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

UnknownType does not support values other than null and tests are producing non null blocks based on the type provided

Copy link
Member

Choose a reason for hiding this comment

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

would be good to add comment

@sopel39
Copy link
Member

sopel39 commented Feb 3, 2023

CI hit: #15429

@sopel39 sopel39 merged commit f38f7df into trinodb:master Feb 3, 2023
@sopel39 sopel39 mentioned this pull request Feb 3, 2023
@github-actions github-actions bot added this to the 407 milestone Feb 3, 2023
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