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

Function prune_int32_col_lt_neg_one

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

Source from the content-addressed store, hash-verified

4223
4224 #[test]
4225 fn prune_int32_col_lt_neg_one() {
4226 let (schema, statistics) = int32_setup();
4227
4228 // Expression "i > -1" and "-i < 1"
4229 // i [-5, 5] ==> some rows could pass (must keep)
4230 // i [1, 11] ==> all rows must pass (must keep)
4231 // i [-11, -1] ==> no rows can pass (not keep)
4232 // i [NULL, NULL] ==> unknown (must keep)
4233 // i [1, NULL] ==> all rows must pass (must keep)
4234 let expected_ret = &[true, true, false, true, true];
4235
4236 prune_with_expr(
4237 // i > -1
4238 col("i").gt(lit(-1)),
4239 &schema,
4240 &statistics,
4241 expected_ret,
4242 );
4243
4244 prune_with_expr(
4245 // -i < 1
4246 Expr::Negative(Box::new(col("i"))).lt(lit(1)),
4247 &schema,
4248 &statistics,
4249 expected_ret,
4250 );
4251 }
4252
4253 #[test]
4254 fn prune_int32_is_null() {

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…