fn split<'a>(
        &'a mut self,
        plan: &'a LogicalPlan,
        partition_filters: &'a Option<String>,
    ) -> BoxFuture<'a, Result<Vec<HBeeTableDesc>>> {
        async move {
            let new_inputs = plan.inputs();
            if new_inputs.len() > 1 {
                Err(not_impl_err!(
                    "Operations with more than one inputs are not supported",
                ))
            } else if new_inputs.len() == 1 {
                let mut filter_exprs = vec![];
                if let LogicalPlan::Filter { predicate, .. } = &plan {
                    plan_utils::split_expr(predicate, &mut filter_exprs);
                }
                let table_descs = self.split(new_inputs[0], partition_filters).await?;
                Ok(table_descs)
            } else if let Some(catalog_table) = Self::as_catalog(&plan) {
                let table_descs = catalog_table.split(partition_filters).await?;
                Ok(table_descs)
            } else {
                Err(not_impl_err!("Split only works with catalog tables",))
            }
        }
        .boxed() // recursion in an `async fn` requires boxing
    }
/// Takes a plan and if the source is a catalog, distibutes the files accordingly
/// Each resulting HBee table is a good workload for a given hbee
/// Only works with linear plans (only one datasource)
Takes a plan and if the source is a catalog, distibutes the files accordingly
Each resulting HBee table is a good workload for a given hbee
Only works with linear plans (only one datasource)
Takes a plan and if the source is a catalog distibutes the files accordingly Each resulting HBee table is a good workload for a given hbee Only works with linear plans ( only one datasource )
fn split<'a>(
        &'a mut self,
        plan: &'a LogicalPlan,
        partition_filters: &'a Option<String>,
    ) -> BoxFuture<'a, Result<Vec<HBeeTableDesc>>> {
        async move {
            let new_inputs = plan.inputs();
            if new_inputs.len() > 1 {
                Err(not_impl_err!(
                    "Operations with more than one inputs are not supported",
                ))
            } else if new_inputs.len() == 1 {
                let mut filter_exprs = vec![];
                if let LogicalPlan::Filter { predicate, .. } = &plan {
                    plan_utils::split_expr(predicate, &mut filter_exprs);
                }
                let table_descs = self.split(new_inputs[0], partition_filters).await?;
                Ok(table_descs)
            } else if let Some(catalog_table) = Self::as_catalog(&plan) {
                let table_descs = catalog_table.split(partition_filters).await?;
                Ok(table_descs)
            } else {
                Err(not_impl_err!("Split only works with catalog tables",))
            }
        }
        .boxed() // recursion in an `async fn` requires boxing
    }
fn split < ' a > ( & ' a mut self , plan : & ' a LogicalPlan , partition_filters : & ' a Option < String > , ) -> BoxFuture < ' a , Result < Vec < HBeeTableDesc > > > { async move { let new_inputs = plan . inputs ( ) ; if new_inputs . len ( ) > 1 { Err ( not_impl_err ! ( " " ) ) } else if new_inputs . len ( ) == 1 { let mut filter_exprs = vec ! [ ] ; if let LogicalPlan :: Filter { predicate , .. } = & plan { plan_utils :: split_expr ( predicate , & mut filter_exprs ) ; } let table_descs = self . split ( new_inputs [ 0 ] , partition_filters ) . await ? ; Ok ( table_descs ) } else if let Some ( catalog_table ) = Self :: as_catalog ( & plan ) { let table_descs = catalog_table . split ( partition_filters ) . await ? ; Ok ( table_descs ) } else { Err ( not_impl_err ! ( " " ) ) } } . boxed ( ) // recursion in an `async fn` requires boxing }
Takes a plan and if the source is a catalog, distibutes the files accordingly
Each resulting HBee table is a good workload for a given hbee
Only works with linear plans (only one datasource)
Takes a plan and if the source is a catalog distibutes the files accordingly Each resulting HBee table is a good workload for a given hbee Only works with linear plans ( only one datasource )
&'a mut self
plan
&'a LogicalPlan
partition_filters
&'a Option<String>
&'a mut self
plan
&'a LogicalPlan
partition_filters
&'a Option<String>