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

Function prune_not_eq_data

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

Source from the content-addressed store, hash-verified

3818
3819 #[test]
3820 fn prune_not_eq_data() {
3821 let schema = Arc::new(Schema::new(vec![Field::new("s1", DataType::Utf8, true)]));
3822
3823 prune_with_expr(
3824 // Prune using s2 != 'M'
3825 col("s1").not_eq(lit("M")),
3826 &schema,
3827 &TestStatistics::new().with(
3828 "s1",
3829 ContainerStats::new_utf8(
3830 vec![Some("A"), Some("A"), Some("N"), Some("M"), None, Some("A")], // min
3831 vec![Some("Z"), Some("L"), Some("Z"), Some("M"), None, None], // max
3832 ),
3833 ),
3834 // s1 [A, Z] ==> might have values that pass predicate
3835 // s1 [A, L] ==> all rows pass the predicate
3836 // s1 [N, Z] ==> all rows pass the predicate
3837 // s1 [M, M] ==> all rows do not pass the predicate
3838 // No stats for s2 ==> some rows could pass
3839 // s2 [3, None] (null max) ==> some rows could pass
3840 &[true, true, true, false, true, true],
3841 );
3842 }
3843
3844 /// Creates setup for boolean chunk pruning
3845 ///

Callers

nothing calls this directly

Calls 6

newFunction · 0.85
prune_with_exprFunction · 0.85
not_eqMethod · 0.80
colFunction · 0.50
litFunction · 0.50
withMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…