-
Notifications
You must be signed in to change notification settings - Fork 311
HPCC-35514 Merge BlockCompressor logic into HybridCompressor #20769
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
Conversation
|
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-35514 Jirabot Action Result: |
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.
Pull request overview
This pull request refactors the index compression code by merging the BlockCompressedIndexCompressor class logic directly into the HybridIndexCompressor class, eliminating code duplication and simplifying the compression architecture.
Key changes:
- Consolidated two separate compressor implementations into a single, more maintainable class
- Moved
HybridIndexCompressorfrom keybuild.cpp to jhblockcompressed.cpp/hpp for better code organization - Replaced indirect delegation through
BlockCompressedIndexCompressorwith direct use ofCBlockCompressedBuildContextfor leaf nodes
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| system/jhtree/keybuild.cpp | Removed the old HybridIndexCompressor class implementation (65 lines) that was duplicating functionality |
| system/jhtree/jhblockcompressed.hpp | Removed BlockCompressedIndexCompressor class declaration and updated HybridIndexCompressor declaration with new implementation |
| system/jhtree/jhblockcompressed.cpp | Implemented the merged HybridIndexCompressor that directly manages leaf compression context instead of delegating to a separate compressor class |
system/jhtree/jhblockcompressed.cpp
Outdated
| leafContext.compressionMethod = COMPRESS_METHOD_ZSTDS6; | ||
|
|
||
| auto processOption = [this] (const char * option, const char * value) | ||
| auto processOption = [this, &isTLK, &helper](const char * option, const char * value) |
Copilot
AI
Jan 2, 2026
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.
The lambda captures 'isTLK' and 'helper' by reference but does not use them. These variables are only used outside the lambda on lines 445-446 and 448. The lambda only modifies member variables of 'this', so the capture list should be simplified to '[this]' instead of '[this, &isTLK, &helper]'.
| auto processOption = [this, &isTLK, &helper](const char * option, const char * value) | |
| auto processOption = [this](const char * option, const char * value) |
jpmcmu
left a comment
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.
@ghalliday A question, but otherwise looks good to me.
|
|
||
| if (options) | ||
| const char * colon = strchr(compression, ':'); | ||
| if (colon) |
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.
Will the compression always have a colon?
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.
It will always have a colon if options are specified. Previous conditional code was because the block compressor was stripping the colon prefix.
Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
|
Jirabot Action Result: |
Type of change:
Checklist:
Smoketest:
Testing: