pub async fn next(&mut self) -> Result<Option<RecordBatch>, Error> {
        let Self {
            schema,
            dictionaries_by_field,
            response,
            ..
        } = self;

        let mut data = match response.next().await {
            Some(d) => d?,
            None => return Ok(None),
        };

        let mut message = ipc::root_as_message(&data.data_header[..])
            .map_err(|e| Error::InvalidFlatbuffer(e.to_string()))?;

        while message.header_type() == ipc::MessageHeader::DictionaryBatch {
            reader::read_dictionary(
                &data.data_body,
                message
                    .header_as_dictionary_batch()
                    .ok_or(Error::CouldNotGetDictionaryBatch)?,
                schema,
                dictionaries_by_field,
            )?;

            data = match response.next().await {
                Some(d) => d?,
                None => return Ok(None),
            };

            message = ipc::root_as_message(&data.data_header[..])
                .map_err(|e| Error::InvalidFlatbuffer(e.to_string()))?;
        }

        Ok(Some(flight_data_to_arrow_batch(
            &data,
            Arc::clone(schema),
            dictionaries_by_field,
        )?))
    }
/// Returns the next `RecordBatch` available for this query, or `None` if
/// there are no further results available.
Returns the next `RecordBatch` available for this query, or `None` if
there are no further results available.
Returns the next ` RecordBatch ` available for this query or ` None ` if there are no further results available .
pub async fn next(&mut self) -> Result<Option<RecordBatch>, Error> {
        let Self {
            schema,
            dictionaries_by_field,
            response,
            ..
        } = self;
        let mut data = match response.next().await {
            Some(d) => d?,
            None => return Ok(None),
        };
        let mut message = ipc::root_as_message(&data.data_header[..])
            .map_err(|e| Error::InvalidFlatbuffer(e.to_string()))?;
        while message.header_type() == ipc::MessageHeader::DictionaryBatch {
            reader::read_dictionary(
                &data.data_body,
                message
                    .header_as_dictionary_batch()
                    .ok_or(Error::CouldNotGetDictionaryBatch)?,
                schema,
                dictionaries_by_field,
            )?;
            data = match response.next().await {
                Some(d) => d?,
                None => return Ok(None),
            };
            message = ipc::root_as_message(&data.data_header[..])
                .map_err(|e| Error::InvalidFlatbuffer(e.to_string()))?;
        }
        Ok(Some(flight_data_to_arrow_batch(
            &data,
            Arc::clone(schema),
            dictionaries_by_field,
        )?))
    }
pub async fn next ( & mut self ) -> Result < Option < RecordBatch > , Error > { let Self { schema , dictionaries_by_field , response , .. } = self ; let mut data = match response . next ( ) . await { Some ( d ) => d ? , None => return Ok ( None ) , } ; let mut message = ipc :: root_as_message ( & data . data_header [ .. ] ) . map_err ( | e | Error :: InvalidFlatbuffer ( e . to_string ( ) ) ) ? ; while message . header_type ( ) == ipc :: MessageHeader :: DictionaryBatch { reader :: read_dictionary ( & data . data_body , message . header_as_dictionary_batch ( ) . ok_or ( Error :: CouldNotGetDictionaryBatch ) ? , schema , dictionaries_by_field , ) ? ; data = match response . next ( ) . await { Some ( d ) => d ? , None => return Ok ( None ) , } ; message = ipc :: root_as_message ( & data . data_header [ .. ] ) . map_err ( | e | Error :: InvalidFlatbuffer ( e . to_string ( ) ) ) ? ; } Ok ( Some ( flight_data_to_arrow_batch ( & data , Arc :: clone ( schema ) , dictionaries_by_field , ) ? ) ) }
Returns the next `RecordBatch` available for this query, or `None` if
there are no further results available.
Returns the next ` RecordBatch ` available for this query or ` None ` if there are no further results available .
&mut self
&mut self