Skip to content

[SPARK-56492][CORE][SQL] Support digestToHexString/md5Hex/sha256Hex in JavaUtils#55353

Closed
dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
dongjoon-hyun:SPARK-56492
Closed

[SPARK-56492][CORE][SQL] Support digestToHexString/md5Hex/sha256Hex in JavaUtils#55353
dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
dongjoon-hyun:SPARK-56492

Conversation

@dongjoon-hyun
Copy link
Copy Markdown
Member

@dongjoon-hyun dongjoon-hyun commented Apr 15, 2026

What changes were proposed in this pull request?

This PR replaces org.apache.commons.codec.digest.DigestUtils with JDK's java.security.MessageDigest and java.util.HexFormat by adding digestToHexString/md5Hex/sha256Hex utility methods to JavaUtils. It also adds a Scalastyle rule to ban org.apache.commons.codec.digest imports going forward.

Why are the changes needed?

Apache Spark can use JDK built-in APIs (java.security.MessageDigest + java.util.HexFormat) instead of the third-party commons-codec library for SHA digest computation. This reduces external dependency usage where standard library alternatives exist.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass the CIs.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-opus-4-6)

@dongjoon-hyun dongjoon-hyun marked this pull request as draft April 15, 2026 19:55
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-56492][CORE][SQL] Add SparkStringUtils.digestToHexString [SPARK-56492][CORE][SQL] Support digestToHexString/md5Hex/sha256Hex in JavaUtils Apr 15, 2026
@dongjoon-hyun dongjoon-hyun marked this pull request as ready for review April 15, 2026 21:13
@dongjoon-hyun
Copy link
Copy Markdown
Member Author

All tests passed.

@dongjoon-hyun
Copy link
Copy Markdown
Member Author

Could you review this PR too, please, @viirya ?

@dongjoon-hyun
Copy link
Copy Markdown
Member Author

Thank you so much, @viirya ~

@dongjoon-hyun dongjoon-hyun deleted the SPARK-56492 branch April 16, 2026 01:49
@dongjoon-hyun
Copy link
Copy Markdown
Member Author

Merged to master for Apache Spark 4.2.0.

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