tustvold commented on a change in pull request #1082:
URL: https://github.com/apache/arrow-rs/pull/1082#discussion_r783415855
##########
File path: parquet/src/arrow/array_reader/byte_array.rs
##########
@@ -192,7 +211,16 @@ impl<I: OffsetSizeTrait + ScalarValue> OffsetBuffer<I> {
self.offsets.len() - 1
}
- fn try_push(&mut self, data: &[u8]) -> Result<()> {
+ fn try_push(&mut self, data: &[u8], validate_utf8: bool) -> Result<()> {
+ if validate_utf8 {
+ if let Err(e) = std::str::from_utf8(data) {
Review comment:
Definitely something to look into. It would also be interesting to see
if it is faster to validate the entire string buffer and do codepoint
validation at the offsets separately, or to validate each individual string as
is done here. I'm not honestly sure which will be faster
--
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]