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

Method assert_invariants

datafusion/pruning/src/pruning_predicate.rs:2191–2205  ·  view source on GitHub ↗

Ensure that the lengths of all arrays are consistent

(&self)

Source from the content-addressed store, hash-verified

2189
2190 /// Ensure that the lengths of all arrays are consistent
2191 fn assert_invariants(&self) {
2192 let mut prev_len = None;
2193
2194 for len in self.arrays().iter().map(|a| a.len()) {
2195 // Get a length, if we don't already have one
2196 match prev_len {
2197 None => {
2198 prev_len = Some(len);
2199 }
2200 Some(prev_len) => {
2201 assert_eq!(prev_len, len);
2202 }
2203 }
2204 }
2205 }
2206
2207 /// Add min values
2208 fn with_min(mut self, min: ArrayRef) -> Self {

Callers 3

with_null_countsMethod · 0.80
with_row_countsMethod · 0.80
with_containedMethod · 0.80

Calls 4

mapMethod · 0.45
iterMethod · 0.45
arraysMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected