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

Function prune_null_stats

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

Source from the content-addressed store, hash-verified

2556
2557 #[test]
2558 fn prune_null_stats() {
2559 // if null_count = row_count then we should prune the container for i = 0
2560 // regardless of the statistics
2561 let schema = Arc::new(Schema::new(vec![Field::new("i", DataType::Int32, true)]));
2562
2563 let statistics = TestStatistics::new().with(
2564 "i",
2565 ContainerStats::new_i32(
2566 vec![Some(0)], // min
2567 vec![Some(0)], // max
2568 )
2569 .with_null_counts(vec![Some(1)])
2570 .with_row_counts(vec![Some(1)]),
2571 );
2572
2573 let expected_ret = &[false];
2574
2575 // i = 0
2576 prune_with_expr(col("i").eq(lit(0)), &schema, &statistics, expected_ret);
2577 }
2578
2579 #[test]
2580 fn test_build_statistics_record_batch() {

Callers

nothing calls this directly

Calls 8

newFunction · 0.85
prune_with_exprFunction · 0.85
with_row_countsMethod · 0.80
with_null_countsMethod · 0.80
colFunction · 0.50
litFunction · 0.50
withMethod · 0.45
eqMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…