-
Notifications
You must be signed in to change notification settings - Fork 512
row-spine: per-column arrangement compression (alpha, default off) #37111
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
Open
frankmcsherry
wants to merge
15
commits into
MaterializeInc:main
Choose a base branch
from
frankmcsherry:pr-column-codecs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5663aa0
row-spine: add canonical Huffman byte codec (entropy layer foundation)
frankmcsherry 1b0163c
row-spine: per-column compression framework (ColumnCodec / RowCodec)
frankmcsherry 3ee798f
row-spine: wire RowCodec into DatumContainer (per-column compression)
frankmcsherry 97919bf
row-spine: box the Huffman codec variant and charge its storage in se…
frankmcsherry 19875d9
row-spine: add Frame-of-Reference and Dictionary column codecs
frankmcsherry fda70ed
compute: gate per-column compression behind enable_arrangement_column…
frankmcsherry db4cf16
row-spine: shorten CMP_SCRATCH static decls to satisfy rustfmt max_width
frankmcsherry 2fde2c9
ci: register enable_arrangement_column_compression_alpha in test-flag…
frankmcsherry c360dd8
compute: make per-column compression flag replica-scoped
frankmcsherry 7a0f6ea
row-spine: guard column codec against mixed arity; address review
frankmcsherry d75d3e4
row-spine: reuse a thread-local decode scratch on the read paths
frankmcsherry aef6edc
feature-benchmark: track per-column arrangement compression
frankmcsherry a6b0cfc
row-spine: buffer the Huffman bit reader and add a decode table
frankmcsherry 5833fa7
row-spine: make per-column codecs cardinality-robust and merge/mid-fo…
frankmcsherry da903d2
feature-benchmark: drop spurious f-string in ArrangementColumnCompres…
frankmcsherry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -308,6 +308,16 @@ impl ComputeState { | |
| std::sync::atomic::Ordering::Relaxed, | ||
| ); | ||
|
|
||
| // Per-column arrangement compression is replica-scoped (see | ||
| // `ENABLE_ARRANGEMENT_COLUMN_COMPRESSION_ALPHA`), so its per-replica-resolved value | ||
| // arrives in `worker_config`; mirror it into the process-global flag row-spine reads at | ||
| // seal time. Safe to re-apply on every tick: each batch records its own codec, so a flip | ||
| // only affects batches sealed afterwards. | ||
| mz_row_spine::COLUMN_COMPRESSION.store( | ||
| ENABLE_ARRANGEMENT_COLUMN_COMPRESSION_ALPHA.get(config), | ||
| std::sync::atomic::Ordering::Relaxed, | ||
| ); | ||
|
|
||
| // NB: arrangement dictionary compression is deliberately NOT applied here. Unlike the | ||
| // settings above, it is captured once at replica creation (see `handle_create_instance` | ||
| // and `InstanceConfig::arrangement_dictionary_compression`) and held fixed, so that | ||
|
|
@@ -489,6 +499,8 @@ impl<'a> ActiveComputeState<'a> { | |
| config.arrangement_dictionary_compression, | ||
| std::sync::atomic::Ordering::Relaxed, | ||
| ); | ||
| // NB: per-column compression is replica-scoped and applied in `apply_worker_config` | ||
| // (called just above), not captured on `InstanceConfig`. | ||
|
Comment on lines
+502
to
+503
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Comment reads like a note-to-self. |
||
|
|
||
| if let Some(offset) = config.expiration_offset { | ||
| self.compute_state.apply_expiration_offset(offset); | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see a test/nightly run with compression enabled.