dongjoon-hyun opened a new pull request, #470:
URL: https://github.com/apache/spark-connect-swift/pull/470

   ### What changes were proposed in this pull request?
   
   This PR aims to add a pure Swift `SHA256` utility (FIPS 180-4) to 
`SparkConnect` module.
   
   - `SHA256.digest(data:)` returns the 32-byte SHA-256 digest as `[UInt8]`.
   - `SHA256.hexString(data:)` returns the digest as a 64-character lowercase 
hex `String`.
   
   ### Why are the changes needed?
   
   This is a prerequisite for uploading cache artifacts whose names are derived 
from the SHA-256 hash of the serialized data (`cache/<sha256-hex>`), which will 
be used by `CachedLocalRelation`-based large `createDataFrame` support.
   
   The implementation is dependency-free pure Swift in the same style as the 
existing `CRC32.swift`:
   - `CryptoKit` is Apple-platform-only and unavailable on Linux.
   - `swift-crypto` exists only as a transitive dependency and this PR avoids 
adding a new direct dependency.
   
   The hex conversion uses a lookup table instead of `String(format:)` for 
`FoundationEssentials` compatibility on Linux.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. This adds a new utility only.
   
   ### How was this patch tested?
   
   Pass the CIs with the newly added `SHA256Tests` suite.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Fable 5


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to