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

Method from_iter

arrow-array/src/array/dictionary_array.rs:660–666  ·  view source on GitHub ↗
(iter: I)

Source from the content-addressed store, hash-verified

658/// ```
659impl<'a, T: ArrowDictionaryKeyType> FromIterator<Option<&'a str>> for DictionaryArray<T> {
660 fn from_iter<I: IntoIterator<Item = Option<&'a str>>>(iter: I) -> Self {
661 let it = iter.into_iter();
662 let (lower, _) = it.size_hint();
663 let mut builder = StringDictionaryBuilder::with_capacity(lower, 256, 1024);
664 builder.extend(it);
665 builder.finish()
666 }
667}
668
669/// Constructs a `DictionaryArray` from an iterator of strings.

Callers

nothing calls this directly

Calls 5

into_iterMethod · 0.45
size_hintMethod · 0.45
extendMethod · 0.45
finishMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected