MCPcopy Create free account
hub / github.com/apache/arrow-rs / check_valid_utf8

Method check_valid_utf8

parquet/src/arrow/buffer/offset_buffer.rs:128–130  ·  view source on GitHub ↗

Validates that `&self.values[start_offset..]` is a valid UTF-8 sequence This MUST be combined with validating that the offsets start on a character boundary, otherwise it would be possible for the values array to be a valid UTF-8 sequence, but not the individual string slices it contains [`Self::try_push`] can perform this validation check on insertion

(&self, start_offset: usize)

Source from the content-addressed store, hash-verified

126 ///
127 /// [`Self::try_push`] can perform this validation check on insertion
128 pub fn check_valid_utf8(&self, start_offset: usize) -> Result<()> {
129 check_valid_utf8(&self.values.as_slice()[start_offset..])
130 }
131
132 /// Converts this into an [`ArrayRef`] with the provided `data_type` and `null_buffer`
133 pub fn into_array(self, null_buffer: Option<Buffer>, data_type: ArrowType) -> ArrayRef {

Callers 2

readMethod · 0.80
test_utf8_validationFunction · 0.80

Calls 2

check_valid_utf8Function · 0.85
as_sliceMethod · 0.45

Tested by 1

test_utf8_validationFunction · 0.64