pub fn _write_dictionary<K: DictionaryKey>(
    array: &dyn Array,
    buffers: &mut Vec<Schema::Buffer>,
    arrow_data: &mut Vec<u8>,
    nodes: &mut Vec<Message::FieldNode>,
    offset: &mut i64,
    is_little_endian: bool,
    write_keys: bool,
) -> usize {
    let array = array.as_any().downcast_ref::<DictionaryArray<K>>().unwrap();
    if write_keys {
        _write_primitive(array.keys(), buffers, arrow_data, offset, is_little_endian);
        array.keys().len()
    } else {
        write(
            array.values().as_ref(),
            buffers,
            arrow_data,
            nodes,
            offset,
            is_little_endian,
        );
        array.values().len()
    }
}
// use `write_keys` to either write keys or values
use `write_keys` to either write keys or values
use ` write_keys ` to either write keys or values
pub fn _write_dictionary<K: DictionaryKey>(
    array: &dyn Array,
    buffers: &mut Vec<Schema::Buffer>,
    arrow_data: &mut Vec<u8>,
    nodes: &mut Vec<Message::FieldNode>,
    offset: &mut i64,
    is_little_endian: bool,
    write_keys: bool,
) -> usize {
    let array = array.as_any().downcast_ref::<DictionaryArray<K>>().unwrap();
    if write_keys {
        _write_primitive(array.keys(), buffers, arrow_data, offset, is_little_endian);
        array.keys().len()
    } else {
        write(
            array.values().as_ref(),
            buffers,
            arrow_data,
            nodes,
            offset,
            is_little_endian,
        );
        array.values().len()
    }
}
pub fn _write_dictionary < K : DictionaryKey > ( array : & dyn Array , buffers : & mut Vec < Schema :: Buffer > , arrow_data : & mut Vec < u8 > , nodes : & mut Vec < Message :: FieldNode > , offset : & mut i64 , is_little_endian : bool , write_keys : bool , ) -> usize { let array = array . as_any ( ) . downcast_ref :: < DictionaryArray < K > > ( ) . unwrap ( ) ; if write_keys { _write_primitive ( array . keys ( ) , buffers , arrow_data , offset , is_little_endian ) ; array . keys ( ) . len ( ) } else { write ( array . values ( ) . as_ref ( ) , buffers , arrow_data , nodes , offset , is_little_endian , ) ; array . values ( ) . len ( ) } }
use `write_keys` to either write keys or values
use ` write_keys ` to either write keys or values
array
&dyn Array
buffers
&mut Vec<Schema::Buffer>
arrow_data
&mut Vec<u8>
nodes
&mut Vec<Message::FieldNode>
offset
&mut i64
is_little_endian
bool
write_keys
bool