MCPcopy Create free account
hub / github.com/apache/arrow-rs / equal

Function equal

arrow-data/src/equal/mod.rs:161–166  ·  view source on GitHub ↗

Logically compares two [ArrayData]. Two arrays are logically equal if and only if: their data types are equal their lengths are equal their null counts are equal their null bitmaps are equal each of their items are equal Two items are equal when their in-memory representation is physically equal (i.e. has the same bit content). The physical comparison depend on the data type. # Panics This fu

(lhs: &ArrayData, rhs: &ArrayData)

Source from the content-addressed store, hash-verified

159/// Arrow specification. (e.g. wrong number of buffers, buffer `len` does not
160/// correspond to the declared `len`)
161pub fn equal(lhs: &ArrayData, rhs: &ArrayData) -> bool {
162 utils::base_equal(lhs, rhs)
163 && lhs.null_count() == rhs.null_count()
164 && utils::equal_nulls(lhs, rhs, 0, 0, lhs.len())
165 && equal_values(lhs, rhs, 0, 0, lhs.len())
166}
167
168// See arrow/tests/array_equal.rs for tests

Callers 1

eqMethod · 0.85

Calls 5

base_equalFunction · 0.85
equal_nullsFunction · 0.85
equal_valuesFunction · 0.85
null_countMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected