Skip to content

Conversation

@Jefffrey
Copy link
Contributor

Which issue does this PR close?

N/A

Rationale for this change

Removing dead code and remove functions from public API.

What changes are included in this PR?

See comments.

Are these changes tested?

Existing tests.

Are there any user-facing changes?

Yes, some functions removed from public API, but they likely weren't intended to be in our public API.

@github-actions github-actions bot added the functions Changes to functions implementation label Jan 28, 2026
Comment on lines -40 to -53
macro_rules! define_digest_function {
($NAME: ident, $METHOD: ident, $DOC: expr) => {
#[doc = $DOC]
pub fn $NAME(args: &[ColumnarValue]) -> Result<ColumnarValue> {
let [data] = take_function_args(&DigestAlgorithm::$METHOD.to_string(), args)?;
digest_process(data, DigestAlgorithm::$METHOD)
}
};
}
define_digest_function!(
sha224,
Sha224,
"computes sha224 hash digest of the given input"
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are unused but part of our public API; I don't see a good reason to have them exposed so removed them


#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum DigestAlgorithm {
pub(crate) enum DigestAlgorithm {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed from public API

}

/// computes md5 hash digest of the given input
pub fn md5(args: &[ColumnarValue]) -> Result<ColumnarValue> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed from public API, also moved to md5 file which is the only place its used

}

pub fn digest_process(
pub(crate) fn digest_process(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed from public API

@Jefffrey Jefffrey marked this pull request as ready for review January 28, 2026 13:35
@alamb alamb added the api change Changes the API exposed to users of the crate label Feb 3, 2026
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks like a nice cleanup to me

I suppose we could be nicer and deprecate the functions rather than just straight up removing them. However, given the limited impact if someone hits this on upgrade maybe they can just copy the code over 🤔

@Jefffrey Jefffrey added this pull request to the merge queue Feb 4, 2026
Merged via the queue into apache:main with commit 613f87d Feb 4, 2026
28 checks passed
@Jefffrey
Copy link
Contributor Author

Jefffrey commented Feb 4, 2026

Thanks @alamb

@Jefffrey Jefffrey deleted the refactor-crypto branch February 4, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api change Changes the API exposed to users of the crate functions Changes to functions implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants