/// Returns all values as a dictionary encoded `Values` format.
Returns all values as a dictionary encoded `Values` format.
Returns all values as a dictionary encoded ` Values ` format .
pub fn all_values_as_dictionary(&self) -> Values<'_> {
        let mut keys = self.all_encoded_values(vec![]);
        let values = if self.contains_null() {
            // The column's ordered set of values including None because that is a
            // reserved encoded key (`0`).
            let mut values = vec![None];
            match &self {
                Self::RleDictionary(c) => {
                    values.extend(c.dictionary().into_iter().map(|s| Some(s.as_str())));
                }
                Self::Dictionary(c) => {
                    values.extend(c.dictionary().into_iter().map(|s| Some(s.as_str())));
                }
            };
            values
        } else {
            // since column doesn't contain null we need to shift all the encoded
            // values down
            assert_eq!(NULL_ID, 0);
            for key in keys.iter_mut() {
                *key -= 1;
            }
            match &self {
                Self::RleDictionary(c) => c
                    .dictionary()
                    .into_iter()
                    .map(|s| Some(s.as_str()))
                    .collect::<Vec<_>>(),
                Self::Dictionary(c) => c
                    .dictionary()
                    .into_iter()
                    .map(|s| Some(s.as_str()))
                    .collect::<Vec<_>>(),
            }
        };
        Values::Dictionary(keys, values)
    }
pub fn all_values_as_dictionary ( & self ) -> Values < ' _ > { let mut keys = self . all_encoded_values ( vec ! [ ] ) ; let values = if self . contains_null ( ) { // The column's ordered set of values including None because that is a // reserved encoded key (`0`). let mut values = vec ! [ None ] ; match & self { Self :: RleDictionary ( c ) => { values . extend ( c . dictionary ( ) . into_iter ( ) . map ( | s | Some ( s . as_str ( ) ) ) ) ; } Self :: Dictionary ( c ) => { values . extend ( c . dictionary ( ) . into_iter ( ) . map ( | s | Some ( s . as_str ( ) ) ) ) ; } } ; values } else { // since column doesn't contain null we need to shift all the encoded // values down assert_eq ! ( NULL_ID 0 ) ; for key in keys . iter_mut ( ) { * key -= 1 ; } match & self { Self :: RleDictionary ( c ) => c . dictionary ( ) . into_iter ( ) . map ( | s | Some ( s . as_str ( ) ) ) . collect :: < Vec < _ > > ( ) , Self :: Dictionary ( c ) => c . dictionary ( ) . into_iter ( ) . map ( | s | Some ( s . as_str ( ) ) ) . collect :: < Vec < _ > > ( ) , } } ; Values :: Dictionary ( keys , values ) }
Returns all values as a dictionary encoded `Values` format.
Returns all values as a dictionary encoded ` Values ` format .
&self