Skip to content

PARQUET-2199: Fix checkBlockSizeReached zero record size perf issue#1004

Open
songhuicheng wants to merge 1 commit into
apache:masterfrom
songhuicheng:zero_record_size
Open

PARQUET-2199: Fix checkBlockSizeReached zero record size perf issue#1004
songhuicheng wants to merge 1 commit into
apache:masterfrom
songhuicheng:zero_record_size

Conversation

@songhuicheng

Copy link
Copy Markdown

Parquet checks Block size after writing records to decide when it shall flush. This is relatively expensive, so it estimates the next check based on record size, record count etc.

For small records less than 1byte after compression, the average record size is 0 after integer division. This caused overflow when calculating the next record count for block size check. It results in block size being checked for every record and slows down write.

Fix the zero record size issue with float type record size.

Make sure you have checked all steps below.

Parquet checks Block size after writing records to decide when it shall flush.
This is relatively expensive, so it estimates the next check based on record size, record count etc.

For small records less than 1byte after compression, the average record size is 0 after integer division.
This caused overflow when calculating the next record count for block size check.
It results in block size being checked for every record and slows down write.

Fix the zero record size issue with float type record size.
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has had no activity for at least 2 months. If you are still working on this change or plan to move it forward, please leave a comment or push a new commit so we know to keep it open. Otherwise, this PR will be closed automatically in about one month. Thank you for your contribution to Apache Parquet!

@github-actions github-actions Bot added the stale label Jun 28, 2026
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.

1 participant