jecsand838 commented on code in PR #7889: URL: https://github.com/apache/arrow-rs/pull/7889#discussion_r2200253393
########## arrow-avro/src/reader/record.rs: ########## @@ -611,6 +619,46 @@ fn sign_extend_to<const N: usize>(raw: &[u8]) -> Result<[u8; N], ArrowError> { Ok(arr) } +#[inline] +fn hex_char_to_u8(c: u8) -> Result<u8, ArrowError> { + match c { + b'0'..=b'9' => Ok(c - b'0'), + b'a'..=b'f' => Ok(c - b'a' + 10), + b'A'..=b'F' => Ok(c - b'A' + 10), + _ => Err(ArrowError::ParseError(format!( + "Invalid hex character '{c}' in UUID string", + ))), + } +} + +#[inline] +fn parse_uuid_bytes(s_bytes: &[u8]) -> Result<[u8; 16], ArrowError> { Review Comment: I got that pushed up. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org