build_is_null_column_expr

Function build_is_null_column_expr 

Source
fn build_is_null_column_expr(
    expr: &Arc<dyn PhysicalExpr>,
    schema: &Schema,
    required_columns: &mut RequiredColumns,
    with_not: bool,
) -> Option<Arc<dyn PhysicalExpr>>
Expand description

Given an expression reference to expr, if expr is a column expression, returns a pruning expression in terms of IsNull that will evaluate to true if the column may contain null, and false if definitely does not contain null. If with_not is true, build a pruning expression for col IS NOT NULL: col_count != col_null_count The pruning expression evaluates to true ONLY if the column definitely CONTAINS at least one NULL value. In this case we can know that IS NOT NULL can not be true and thus can prune the row group / value