Skip to content

Add output size calculation to BinarySortableSerializer#25359

Merged
xiaoxmeng merged 1 commit into
prestodb:masterfrom
emilysun201309:export-D76008301
Jun 19, 2025
Merged

Add output size calculation to BinarySortableSerializer#25359
xiaoxmeng merged 1 commit into
prestodb:masterfrom
emilysun201309:export-D76008301

Conversation

@emilysun201309

@emilysun201309 emilysun201309 commented Jun 18, 2025

Copy link
Copy Markdown
Contributor

Summary: BinarySortableSerializer::serializedSizeInBytes does a pass over the input data to calculate the output size in bytes. This is used to pre-determine the output buffer size to allocate.

Differential Revision: D76008301


== RELEASE NOTES ==
Prestissimo (Native Execution) Changes
* Add BinarySortableSerializer::serializedSizeInBytes method that returns the serialized byte size of a given input row at 'rowId'. This allows us to pre-allocated the exact output buffer size needed for serialization, avoiding wasted memory space. 

@emilysun201309 emilysun201309 requested a review from a team as a code owner June 18, 2025 16:50
@facebook-github-bot

Copy link
Copy Markdown
Collaborator

This pull request was exported from Phabricator. Differential Revision: D76008301

@prestodb-ci

Copy link
Copy Markdown
Contributor

Saved that user @emilysun201309 is from Meta

@steveburnett

Copy link
Copy Markdown
Contributor

Thanks for the release note! Consider if you can add in the release note entry, describing what this means for a Presto user.

xiaoxmeng
xiaoxmeng previously approved these changes Jun 18, 2025
@facebook-github-bot

Copy link
Copy Markdown
Collaborator

This pull request was exported from Phabricator. Differential Revision: D76008301

emilysun201309 added a commit to emilysun201309/presto that referenced this pull request Jun 18, 2025
Summary:
Pull Request resolved: prestodb#25359

`BinarySortableSerializer::serializedSizeInBytes` does a pass over the input data to calculate the output size in bytes. This is used to pre-determine the output buffer size to allocate.

Reviewed By: xiaoxmeng

Differential Revision: D76008301
Summary:
Pull Request resolved: prestodb#25359

`BinarySortableSerializer::serializedSizeInBytes` does a pass over the input data to calculate the output size in bytes. This is used to pre-determine the output buffer size to allocate.

Reviewed By: xiaoxmeng

Differential Revision: D76008301
@facebook-github-bot

Copy link
Copy Markdown
Collaborator

This pull request was exported from Phabricator. Differential Revision: D76008301

@xiaoxmeng xiaoxmeng merged commit ba9c38e into prestodb:master Jun 19, 2025
175 of 179 checks passed
@emilysun201309 emilysun201309 deleted the export-D76008301 branch June 19, 2025 16:29
@prestodb-ci prestodb-ci mentioned this pull request Jul 28, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants