pub fn action(&self, relation: &mut MirRelationExpr) -> Result<(), crate::TransformError> {
        match relation {
            MirRelationExpr::Map { input, scalars } => {
                if scalars.iter().any(scalar_contains_isnull) {
                    let mut metadata = input.typ();
                    for scalar in scalars.iter_mut() {
                        scalar_nonnullable(scalar, &metadata);
                        let typ = scalar.typ(&metadata);
                        metadata.column_types.push(typ);
                    }
                }
            }
            MirRelationExpr::Filter { input, predicates } => {
                if predicates.iter().any(scalar_contains_isnull) {
                    let metadata = input.typ();
                    for predicate in predicates.iter_mut() {
                        scalar_nonnullable(predicate, &metadata);
                    }
                }
            }
            MirRelationExpr::Reduce {
                input,
                group_key: _,
                aggregates,
                monotonic: _,
                expected_group_size: _,
            } => {
                if aggregates.iter().any(|a| {
                    scalar_contains_isnull(&(a).expr) || matches!(&(a).func, AggregateFunc::Count)
                }) {
                    let metadata = input.typ();
                    for aggregate in aggregates.iter_mut() {
                        scalar_nonnullable(&mut aggregate.expr, &metadata);
                        aggregate_nonnullable(aggregate, &metadata);
                    }
                }
            }
            _ => {}
        }
        Ok(())
    }
/// Harvests information about non-nullability of columns from sources.
Harvests information about non-nullability of columns from sources.
Harvests information about non - nullability of columns from sources .
pub fn action(&self, relation: &mut MirRelationExpr) -> Result<(), crate::TransformError> {
        match relation {
            MirRelationExpr::Map { input, scalars } => {
                if scalars.iter().any(scalar_contains_isnull) {
                    let mut metadata = input.typ();
                    for scalar in scalars.iter_mut() {
                        scalar_nonnullable(scalar, &metadata);
                        let typ = scalar.typ(&metadata);
                        metadata.column_types.push(typ);
                    }
                }
            }
            MirRelationExpr::Filter { input, predicates } => {
                if predicates.iter().any(scalar_contains_isnull) {
                    let metadata = input.typ();
                    for predicate in predicates.iter_mut() {
                        scalar_nonnullable(predicate, &metadata);
                    }
                }
            }
            MirRelationExpr::Reduce {
                input,
                group_key: _,
                aggregates,
                monotonic: _,
                expected_group_size: _,
            } => {
                if aggregates.iter().any(|a| {
                    scalar_contains_isnull(&(a).expr) || matches!(&(a).func, AggregateFunc::Count)
                }) {
                    let metadata = input.typ();
                    for aggregate in aggregates.iter_mut() {
                        scalar_nonnullable(&mut aggregate.expr, &metadata);
                        aggregate_nonnullable(aggregate, &metadata);
                    }
                }
            }
            _ => {}
        }
        Ok(())
    }
pub fn action ( & self , relation : & mut MirRelationExpr ) -> Result < ( ) , crate :: TransformError > { match relation { MirRelationExpr :: Map { input , scalars } => { if scalars . iter ( ) . any ( scalar_contains_isnull ) { let mut metadata = input . typ ( ) ; for scalar in scalars . iter_mut ( ) { scalar_nonnullable ( scalar , & metadata ) ; let typ = scalar . typ ( & metadata ) ; metadata . column_types . push ( typ ) ; } } } MirRelationExpr :: Filter { input , predicates } => { if predicates . iter ( ) . any ( scalar_contains_isnull ) { let metadata = input . typ ( ) ; for predicate in predicates . iter_mut ( ) { scalar_nonnullable ( predicate , & metadata ) ; } } } MirRelationExpr :: Reduce { input , group_key : _ , aggregates , monotonic : _ , expected_group_size : _ , } => { if aggregates . iter ( ) . any ( | a | { scalar_contains_isnull ( & ( a ) . expr ) || matches ! ( ( a ) func AggregateFunc Count ) } ) { let metadata = input . typ ( ) ; for aggregate in aggregates . iter_mut ( ) { scalar_nonnullable ( & mut aggregate . expr , & metadata ) ; aggregate_nonnullable ( aggregate , & metadata ) ; } } } _ => { } } Ok ( ( ) ) }
Harvests information about non-nullability of columns from sources.
Harvests information about non - nullability of columns from sources .
&self
relation
&mut MirRelationExpr
&self
relation
&mut MirRelationExpr