Repository navigation
fix(compressor): amortize fixed table bytes in sampled estimates - #11402
Open
robert3005 wants to merge 2 commits into
Open
robert3005 wants to merge 2 commits into
robert3005 wants to merge 2 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
On unique text such as TPC-H
o_comment, OnPair is 25–38% smaller than FSST on every chunk, yet the compressor picked FSST on about half of them. The ~1,000-row sample used for scheme selection put the two at almost the same size, so the winner was a coin flip per chunk.The sample penalises OnPair in two ways:
Changes
Scheme::fixed_nbytes(new, defaults to0): a scheme reports the output bytes that do not grow with row count, and the sampler charges only the share the sample makes up of the full array. OnPair reports its dictionary, FSST its symbol table.Measured on 8 chunks each of 8,192, 24,576 and 65,536 rows, before the rebase onto #9762:
o_comment,l_commentand synthetic URLs now pick OnPair on every chunk, and random hex and random printable text pick FSST, which is the smaller scheme in each case.