abandy commented on code in PR #45029:
URL: https://github.com/apache/arrow/pull/45029#discussion_r1885922720
##########
swift/Arrow/Sources/Arrow/ArrowReaderHelper.swift:
##########
@@ -289,3 +289,10 @@ func validateFileData(_ data: Data) -> Bool {
let endString = String(decoding: data[(data.count - markerLength)...], as:
UTF8.self)
return startString == FILEMARKER && endString == FILEMARKER
}
+
+func getUInt32(_ data: Data, offset: Int) -> UInt32 {
+ let token = data.withUnsafeBytes { rawBuffer in
+ rawBuffer.loadUnaligned(fromByteOffset: offset, as: UInt32.self)
Review Comment:
The method throws an error if the offset is out of range. We can add a
custom error but we use this same method in other places in the code and they
do not throw a custom error.
--
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]