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

Function pack_fixed_values_impl

parquet/src/arrow/buffer/dictionary_buffer.rs:258–274  ·  view source on GitHub ↗
(
    array: &FixedSizeBinaryArray,
)

Source from the content-addressed store, hash-verified

256}
257
258fn pack_fixed_values_impl<K: ArrowDictionaryKeyType>(
259 array: &FixedSizeBinaryArray,
260) -> Result<ArrayRef> {
261 let mut builder = FixedSizeBinaryDictionaryBuilder::<K>::with_capacity(
262 array.len(),
263 1024,
264 array.value_length(),
265 );
266 for x in array {
267 match x {
268 Some(x) => builder.append_value(x),
269 None => builder.append_null(),
270 }
271 }
272 let raw = builder.finish();
273 Ok(Arc::new(raw))
274}
275
276#[cfg(test)]
277mod tests {

Callers

nothing calls this directly

Calls 5

lenMethod · 0.45
value_lengthMethod · 0.45
append_valueMethod · 0.45
append_nullMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected