Make BOOLEAN explicitly unsupported for per-value encryption#196
Merged
Conversation
avalerio-tkd
commented
Dec 15, 2025
Collaborator
- Making BOOLEAN explicitly unsupported for per-value encryption and always defaults to per-block encryption.
- Updated EncryptionSequencer to check explicitly for BOOLEAN and RLE_DICTIONARY, and updated comments.
…always defaults to per-block encryption. - Updated EncryptionSequencer to check explicitly for BOOLEAN and RLE_DICTIONARY, and updated comments.
argmarco-tkd
approved these changes
Dec 15, 2025
argmarco-tkd
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, thanks! - left a few comments, none that need a new review from my side.
| // only references to them. | ||
| if (format == Format::RLE_DICTIONARY) { | ||
| throw DBPSUnsupportedException("Unsupported format: RLE_DICTIONARY is not supported for per-value operations"); | ||
| throw DBPSUnsupportedException("Unsupported format: RLE_DICTIONARY is not supported for per-value operations " |
| const bool is_datatype_supported = true; | ||
|
|
||
| // Datatype: All datatypes are supported except BOOLEAN. | ||
| // BOOLEAN is permanently unsupported for per-value encryption and always defaults to per-block encryption. |
Collaborator
There was a problem hiding this comment.
in here, I'd either (a) remove the 'permanently' wording and just leave it as "boolean defaults to per-value' OR (b) add a reason as to why it's permanently unsupported.
I believe (a) is the way to go.
Collaborator
Author
There was a problem hiding this comment.
Done. Thanks.
| bool result = sequencer.ConvertAndEncrypt(boolean_data); | ||
| ASSERT_TRUE(result) << "BOOLEAN encryption failed: " << sequencer.error_stage_ << " - " << sequencer.error_message_; | ||
|
|
||
| // Verify it used per-block encryption mode |
Collaborator
There was a problem hiding this comment.
typo: "if", I believe.
Collaborator
Author
There was a problem hiding this comment.
Fixed the wording.
| ASSERT_TRUE(result) << "BOOLEAN encryption failed: " << sequencer.error_stage_ << " - " << sequencer.error_message_; | ||
|
|
||
| // Verify it used per-block encryption mode | ||
| ASSERT_TRUE(sequencer.encryption_metadata_.count("encrypt_mode_dict_page") > 0); |
Collaborator
There was a problem hiding this comment.
assertion makes sense, but maybe just do == 1 ?
Collaborator
Author
|
Thanks for the review. Merging. |
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
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.