-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dictionary compression #2408
Merged
Merged
Dictionary compression #2408
Conversation
This file contains 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
benjaminwinger
force-pushed
the
dictionary-compression
branch
from
November 14, 2023 15:54
0b3cb66
to
4307f0c
Compare
ray6080
approved these changes
Nov 14, 2023
benjaminwinger
force-pushed
the
dictionary-compression
branch
2 times, most recently
from
November 14, 2023 23:08
d13813d
to
ed46f11
Compare
benjaminwinger
force-pushed
the
string-serialization
branch
2 times, most recently
from
November 15, 2023 17:26
1518e90
to
a92953d
Compare
benjaminwinger
force-pushed
the
dictionary-compression
branch
from
November 15, 2023 21:40
ed46f11
to
7f32cac
Compare
benjaminwinger
force-pushed
the
string-serialization
branch
5 times, most recently
from
November 16, 2023 19:59
feb92bb
to
54a2273
Compare
benjaminwinger
force-pushed
the
dictionary-compression
branch
2 times, most recently
from
November 17, 2023 21:55
15c1ed8
to
64a5a36
Compare
benjaminwinger
force-pushed
the
dictionary-compression
branch
from
November 17, 2023 23:07
64a5a36
to
9ace9bf
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2408 +/- ##
==========================================
+ Coverage 90.86% 91.39% +0.52%
==========================================
Files 1023 1023
Lines 37044 37284 +240
==========================================
+ Hits 33659 34074 +415
+ Misses 3385 3210 -175 ☔ View full report in Codecov by Sentry. |
benjaminwinger
force-pushed
the
dictionary-compression
branch
from
November 18, 2023 03:14
9ace9bf
to
a66a925
Compare
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.
Note that this depends on #2304
This is implemented inside of StringColumn and StringColumnChunk. With the string column layout being hard-coded into the class, it doesn't really seem to fit the abstractions used for the compression of single chunks.
Implemented in two parts:
prepareForFlush
method goes over the data again and de-duplicates it. In this case references to the original data are stable and we can use string_view instead of string. This is necessary if we want to remove unused entries, e.g. when strings are read from the disk, existing values are modified, and the original values are no longer used.If the extra memory overhead when copying is a concern, we could remove (1), since (2) is sufficient for on-disk de-duplication, but (1) should speed up copying when there is a lot of duplication (I don't have any benchmarks for this though, and will do some benchmarking and profiling to compare the costs if I have time).
It would also be possible to reduce the memory overhead of (1) by using string_views and updating them to point to the new buffer after a resize, but that will also add some new costs.