Skip to content

WIP: Grow VariableWithBlockBuilder by average position size#28378

Open
wendigo wants to merge 1 commit intomasterfrom
user/serafin/variable-grow
Open

WIP: Grow VariableWithBlockBuilder by average position size#28378
wendigo wants to merge 1 commit intomasterfrom
user/serafin/variable-grow

Conversation

@wendigo
Copy link
Contributor

@wendigo wendigo commented Feb 19, 2026

Description

Additional context and related issues

Release notes

( ) 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`)

@cla-bot cla-bot bot added the cla-signed label Feb 19, 2026
// proactively grow bytes array based on observed average entry size
int currentBytes = offsets[positionCount];
if (positionCount > 0 && currentBytes > 0) {
int averageBytesPerEntry = currentBytes / positionCount;
Copy link
Member

Choose a reason for hiding this comment

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

Consider using double instead of integer division. The rounding down behavior seems likely to result in underestimating the target size in most cases which will require another growing copy.

@github-actions
Copy link

This pull request has gone a while without any activity. Ask for help on #core-dev on Trino slack.

@github-actions github-actions bot added the stale label Mar 13, 2026
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