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

Function pack_values_impl

parquet/src/arrow/buffer/dictionary_buffer.rs:244–256  ·  view source on GitHub ↗
(
    array: &GenericByteArray<T>,
)

Source from the content-addressed store, hash-verified

242}
243
244fn pack_values_impl<K: ArrowDictionaryKeyType, T: ByteArrayType>(
245 array: &GenericByteArray<T>,
246) -> Result<ArrayRef> {
247 let mut builder = GenericByteDictionaryBuilder::<K, T>::with_capacity(array.len(), 1024, 1024);
248 for x in array {
249 match x {
250 Some(x) => builder.append_value(x),
251 None => builder.append_null(),
252 }
253 }
254 let raw = builder.finish();
255 Ok(Arc::new(raw))
256}
257
258fn pack_fixed_values_impl<K: ArrowDictionaryKeyType>(
259 array: &FixedSizeBinaryArray,

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected