Skip to content

Conversation

@chenjian2664
Copy link
Contributor

Replaces manual null appending with RunLengthEncodedBlock when adding columns with null values

Description

Additional context and related issues

Release notes

(x) This is not user-visible or is 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`)

Replaces manual null appending with `RunLengthEncodedBlock` when adding columns with null values
@cla-bot cla-bot bot added the cla-signed label Jul 7, 2025
@github-actions github-actions bot added the memory Memory connector label Jul 7, 2025
@chenjian2664 chenjian2664 requested review from ebyhr and wendigo July 7, 2025 11:50
@wendigo wendigo merged commit 85a8300 into trinodb:master Jul 7, 2025
52 checks passed
@github-actions github-actions bot added this to the 477 milestone Jul 7, 2025
BlockBuilder builder = type.createBlockBuilder(null, page.getPositionCount());
IntStream.range(0, page.getPositionCount()).forEach(_ -> builder.appendNull());
page = page.appendColumn(builder.build());
page = page.appendColumn(RunLengthEncodedBlock.create(columnTypes.get(i), null, page.getPositionCount()));
Copy link

Choose a reason for hiding this comment

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

Wanting to confirm is this the correct variable? Seems like j is iterating over column indexes while i is iterating over pages.

Copy link
Member

Choose a reason for hiding this comment

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

Good catch, fixed this in #26167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed memory Memory connector

Development

Successfully merging this pull request may close these issues.

4 participants