Skip to content

feat(compressor): measure inputs and blocks by the bytes their rows reference - #10445

Merged
joseph-isaacs merged 13 commits into
developfrom
ji/exact-size-compressor-baseline
Oct 12, 2026
Merged

joseph-isaacs merged 13 commits into
developfrom
ji/exact-size-compressor-baseline

Conversation

@joseph-isaacs

@joseph-isaacs joseph-isaacs commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Second of three stacked PRs, on top of vortex-data/vortex#10439. Uses the exact uncompressed size where nbytes() overstated view arrays that share a decompressed Parquet page.

Changes

  • CascadingCompressor measures the input, and each leaf a scheme competes against, by the bytes its rows reference. A dictionary of distinct strings no longer looks like a 20x win against a 2 MiB shared page. Sampling scores slices the same way.
  • The repartition writer coalesces blocks by the exact size, so 27 KiB string blocks reach the 1 MiB block_size_minimum instead of each being emitted alone. The Python dataset test's fragment count drops from 26 to 16 as the string column's blocks now line up with the numeric columns'.
  • The compressing layout caches the exact size on each chunk before compression so the compressor reads it instead of recomputing it. The statistic is serialized with the others, so a written file grows by a few bytes per leaf; the stock ticker file size test moves by 24 bytes.
  • A dtype the aggregate cannot measure, such as variant, is sized by the bytes it holds.

🤖 Generated with Claude Code

https://claude.ai/code/session_015LWq6yREM1uAD9mbD2ZAst


Generated by Claude Code


Generated by Claude Code

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

Labels

changelog/performance A performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants