MCPcopy Create free account
hub / github.com/apache/datafusion / prune_int32_col_gt_zero

Function prune_int32_col_gt_zero

datafusion/pruning/src/pruning_predicate.rs:3972–3993  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3970
3971 #[test]
3972 fn prune_int32_col_gt_zero() {
3973 let (schema, statistics) = int32_setup();
3974
3975 // Expression "i > 0" and "-i < 0"
3976 // i [-5, 5] ==> some rows could pass (must keep)
3977 // i [1, 11] ==> all rows must pass (must keep)
3978 // i [-11, -1] ==> no rows can pass (not keep)
3979 // i [NULL, NULL] ==> unknown (must keep)
3980 // i [1, NULL] ==> unknown (must keep)
3981 let expected_ret = &[true, true, false, true, true];
3982
3983 // i > 0
3984 prune_with_expr(col("i").gt(lit(0)), &schema, &statistics, expected_ret);
3985
3986 // -i < 0
3987 prune_with_expr(
3988 Expr::Negative(Box::new(col("i"))).lt(lit(0)),
3989 &schema,
3990 &statistics,
3991 expected_ret,
3992 );
3993 }
3994
3995 #[test]
3996 fn prune_int32_col_lte_zero() {

Callers

nothing calls this directly

Calls 7

int32_setupFunction · 0.85
prune_with_exprFunction · 0.85
newFunction · 0.85
colFunction · 0.50
litFunction · 0.50
gtMethod · 0.45
ltMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…