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

Function int32_setup

datafusion/pruning/src/pruning_predicate.rs:3958–3969  ·  view source on GitHub ↗

Creates a setup for chunk pruning, modeling a int32 column "i" with 5 different containers (e.g. RowGroups). They have [min, max]: i [-5, 5] i [1, 11] i [-11, -1] i [NULL, NULL] i [1, NULL]

()

Source from the content-addressed store, hash-verified

3956 /// i [NULL, NULL]
3957 /// i [1, NULL]
3958 fn int32_setup() -> (SchemaRef, TestStatistics) {
3959 let schema = Arc::new(Schema::new(vec![Field::new("i", DataType::Int32, true)]));
3960
3961 let statistics = TestStatistics::new().with(
3962 "i",
3963 ContainerStats::new_i32(
3964 vec![Some(-5), Some(1), Some(-11), None, Some(1)], // min
3965 vec![Some(5), Some(11), Some(-1), None, None], // max
3966 ),
3967 );
3968 (schema, statistics)
3969 }
3970
3971 #[test]
3972 fn prune_int32_col_gt_zero() {

Calls 2

newFunction · 0.85
withMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…