MCPcopy Create free account
hub / github.com/apache/datafusion / append_view_from_buffer

Function append_view_from_buffer

datafusion/functions/src/unicode/substr.rs:333–343  ·  view source on GitHub ↗
(
    views_buf: &mut Vec<u128>,
    substr: &str,
    byte_offset: usize,
)

Source from the content-addressed store, hash-verified

331
332#[inline]
333fn append_view_from_buffer(
334 views_buf: &mut Vec<u128>,
335 substr: &str,
336 byte_offset: usize,
337) -> bool {
338 let byte_offset =
339 u32::try_from(byte_offset).expect("validated string buffer offset fits in i32");
340 let view = make_view(substr.as_bytes(), 0, byte_offset);
341 views_buf.push(view);
342 substr.len() > 12
343}
344
345#[expect(clippy::needless_range_loop)]
346fn generic_string_substr<T: OffsetSizeTrait>(

Callers 1

generic_string_substrFunction · 0.85

Calls 2

pushMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…