pub fn find_table_name<'a, T: TableProvider + 'static>(
    plan: &'a LogicalPlan,
) -> Result<&'a str> {
    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 {
        // recurse
        find_table_name::<T>(new_inputs[0])
    } else {
        if let Some(result_table) = as_table_name::<T>(&plan) {
            Ok(result_table)
        } else {
            Err(not_impl_err!(
                "Expected root to be a {}",
                std::any::type_name::<T>()
            ))
        }
    }
}
/// Search a TableProvider of the given type in the plan.
/// Only works with linear plans (only one datasource).
Search a TableProvider of the given type in the plan.
Only works with linear plans (only one datasource).
Search a TableProvider of the given type in the plan . Only works with linear plans ( only one datasource ) .
pub fn find_table_name<'a, T: TableProvider + 'static>(
    plan: &'a LogicalPlan,
) -> Result<&'a str> {
    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 {
        // recurse
        find_table_name::<T>(new_inputs[0])
    } else {
        if let Some(result_table) = as_table_name::<T>(&plan) {
            Ok(result_table)
        } else {
            Err(not_impl_err!(
                "Expected root to be a {}",
                std::any::type_name::<T>()
            ))
        }
    }
}
pub fn find_table_name < ' a , T : TableProvider + ' static > ( plan : & ' a LogicalPlan , ) -> Result < & ' a str > { let new_inputs = plan . inputs ( ) ; if new_inputs . len ( ) > 1 { Err ( not_impl_err ! ( " " ) ) } else if new_inputs . len ( ) == 1 { // recurse find_table_name :: < T > ( new_inputs [ 0 ] ) } else { if let Some ( result_table ) = as_table_name :: < T > ( & plan ) { Ok ( result_table ) } else { Err ( not_impl_err ! ( " " std any type_name T ( ) ) ) } } }
Search a TableProvider of the given type in the plan.
Search a TableProvider of the given type in the plan .
plan
&'a LogicalPlan
plan
&'a LogicalPlan