async fn partitions(
        &self,
        namespace_name: Arc<str>,
        table_name: Arc<str>,
        columns: Vec<String>,
        predicate: &Predicate,
        expected_schema: Arc<Schema>,
    ) -> Result<Vec<IngesterPartition>> {
        let mut ingester_partitions: Vec<IngesterPartition> = self
            .ingester_addresses
            .iter()
            .map(|ingester_address| {
                let request = GetPartitionForIngester {
                    flight_client: Arc::clone(&self.flight_client),
                    catalog_cache: Arc::clone(&self.catalog_cache),
                    ingester_address: Arc::clone(ingester_address),
                    namespace_name: Arc::clone(&namespace_name),
                    table_name: Arc::clone(&table_name),
                    columns: columns.clone(),
                    predicate,
                    expected_schema: Arc::clone(&expected_schema),
                };
                execute(request)
            })
            .collect::<FuturesUnordered<_>>()
            .try_collect::<Vec<_>>()
            .await?
            // We have a Vec<Vec<..>> flatten to Vec<_>
            .into_iter()
            .flatten()
            .collect();

        ingester_partitions.sort_by_key(|p| p.partition_id);
        Ok(ingester_partitions)
    }
/// Retrieve chunks from the ingester for the particular table and
/// predicate
Retrieve chunks from the ingester for the particular table and
predicate
Retrieve chunks from the ingester for the particular table and predicate
async fn partitions(
        &self,
        namespace_name: Arc<str>,
        table_name: Arc<str>,
        columns: Vec<String>,
        predicate: &Predicate,
        expected_schema: Arc<Schema>,
    ) -> Result<Vec<IngesterPartition>> {
        let mut ingester_partitions: Vec<IngesterPartition> = self
            .ingester_addresses
            .iter()
            .map(|ingester_address| {
                let request = GetPartitionForIngester {
                    flight_client: Arc::clone(&self.flight_client),
                    catalog_cache: Arc::clone(&self.catalog_cache),
                    ingester_address: Arc::clone(ingester_address),
                    namespace_name: Arc::clone(&namespace_name),
                    table_name: Arc::clone(&table_name),
                    columns: columns.clone(),
                    predicate,
                    expected_schema: Arc::clone(&expected_schema),
                };
                execute(request)
            })
            .collect::<FuturesUnordered<_>>()
            .try_collect::<Vec<_>>()
            .await?
            // We have a Vec<Vec<..>> flatten to Vec<_>
            .into_iter()
            .flatten()
            .collect();
        ingester_partitions.sort_by_key(|p| p.partition_id);
        Ok(ingester_partitions)
    }
async fn partitions ( & self , namespace_name : Arc < str > , table_name : Arc < str > , columns : Vec < String > , predicate : & Predicate , expected_schema : Arc < Schema > , ) -> Result < Vec < IngesterPartition > > { let mut ingester_partitions : Vec < IngesterPartition > = self . ingester_addresses . iter ( ) . map ( | ingester_address | { let request = GetPartitionForIngester { flight_client : Arc :: clone ( & self . flight_client ) , catalog_cache : Arc :: clone ( & self . catalog_cache ) , ingester_address : Arc :: clone ( ingester_address ) , namespace_name : Arc :: clone ( & namespace_name ) , table_name : Arc :: clone ( & table_name ) , columns : columns . clone ( ) , predicate , expected_schema : Arc :: clone ( & expected_schema ) , } ; execute ( request ) } ) . collect :: < FuturesUnordered < _ > > ( ) . try_collect :: < Vec < _ > > ( ) . await ? // We have a Vec<Vec<..>> flatten to Vec<_> . into_iter ( ) . flatten ( ) . collect ( ) ; ingester_partitions . sort_by_key ( | p | p . partition_id ) ; Ok ( ingester_partitions ) }
Retrieve chunks from the ingester for the particular table and
predicate
Retrieve chunks from the ingester for the particular table and predicate
&self
namespace_name
Arc<str>
table_name
Arc<str>
columns
Vec<String>
predicate
&Predicate
expected_schema
Arc<Schema>
&self
namespace_name
Arc<str>
table_name
Arc<str>
columns
Vec<String>
predicate
&Predicate
expected_schema
Arc<Schema>