Skip to content

Refactor to move Parquet and AttributeMap logic out of encryption_sequencer #184

Merged
avalerio-tkd merged 5 commits into
mainfrom
av_sequncer_decryption_017
Dec 7, 2025
Merged

Refactor to move Parquet and AttributeMap logic out of encryption_sequencer #184
avalerio-tkd merged 5 commits into
mainfrom
av_sequncer_decryption_017

Conversation

@avalerio-tkd

Copy link
Copy Markdown
Collaborator
  • Renamed decoding_utils to parquet_utils
  • Moved Parquet specific logic out of encryption_sequencer to parquet_utils
  • Moved string-to-variant conversion logic out of encryption_sequencer to bytes_utils.h
  • Small cleanups.

- Moved Parquet specific logic out of encryption_sequencer to parquet_utils
- Moved string-to-variant conversion logic out of encryption_sequencer to bytes_utils.h
- Small cleanups.
- Moved Parquet specific logic out of encryption_sequencer to parquet_utils
- Moved string-to-variant conversion logic out of encryption_sequencer to bytes_utils.h
- Small cleanups.

@argmarco-tkd argmarco-tkd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Left a few nits, but I don't need a new PR.

std::to_string(offset) + ", size=" + std::to_string(raw.size()) + ")");
}
uint32_t len = *reinterpret_cast<const uint32_t*>(raw.data() + offset);
uint32_t len = read_u32_le(raw, offset);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice. this is clearer.

// Get the page type from the encoding attributes.
auto page_type = std::get<std::string>(encoding_attributes.at("page_type"));

if (page_type == "DATA_PAGE_V1") {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (for future devs) - it may be worth adding a couple of lines for each type of DATA_PAGE that describe the nuances of compression

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments added.

Comment on lines +354 to +355
auto result = DecompressAndSplit(
plaintext, CompressionCodec::UNCOMPRESSED, attribs_conv);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from a unit testing perspective, do we have tests covering the exception throwing of the non-supported compression codecs? (that can be done in a later PR, if we think it pertinent.).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added unittest.

Comment thread src/common/bytes_utils.h
// Utility functions for creating an AttributesMap

// Common alias for converted encoding attributes used across modules.
using AttributesMap = std::map<std::string, std::variant<int32_t, bool, std::string>>;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why only int32_t (as oppossed to other int types also?) - let's add a comment.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Added comment.

@avalerio-tkd avalerio-tkd merged commit de3c1fa into main Dec 7, 2025
2 checks passed
@avalerio-tkd

Copy link
Copy Markdown
Collaborator Author

Thanks for the review. Merging.

@avalerio-tkd avalerio-tkd deleted the av_sequncer_decryption_017 branch December 7, 2025 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants