You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The change eliminates 2,170 FoR wrappers where FoR doesn't reduce bit width
(e.g., l_partkey min=2 still needs 18 bits, l_suppkey min=1 still needs 14
bits). That part is correct.
But it introduces 185 new patches. The key example is the RunEnd ends column:
develop: fastlanes.for(u32, metadata=6) -> bitpacked(u32, bit_width=17,
patches=None) — subtracting min=6 makes max=131066 fit in 17 bits
ji/for-estim: bitpacked(u32, bit_width=17, patches=Some(...)) — max=131072
needs 18 bits, so value 131072 becomes a patch
The FoR estimation now considers these cases not worth it, but removing FoR
forces the bitpacked encoding to use patches for edge-case values. Patch
handling during decompression is the likely cause of the +46% decompress
regression.
The fix would be to make the FoR estimator account for cases where subtracting
the minimum reduces the bit width (i.e., where (max - min).ilog2() <
max.ilog2()). Those cases should still strongly prefer FoR.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⏺ Here's the full picture:
Encoding Tree Diff Summary
The change eliminates 2,170 FoR wrappers where FoR doesn't reduce bit width
(e.g., l_partkey min=2 still needs 18 bits, l_suppkey min=1 still needs 14
bits). That part is correct.
But it introduces 185 new patches. The key example is the RunEnd ends column:
patches=None) — subtracting min=6 makes max=131066 fit in 17 bits
needs 18 bits, so value 131072 becomes a patch
The FoR estimation now considers these cases not worth it, but removing FoR
forces the bitpacked encoding to use patches for edge-case values. Patch
handling during decompression is the likely cause of the +46% decompress
regression.
The fix would be to make the FoR estimator account for cases where subtracting
the minimum reduces the bit width (i.e., where (max - min).ilog2() <
max.ilog2()). Those cases should still strongly prefer FoR.