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

Function test_create_hashes_equivalence

datafusion/common/src/hash_utils.rs:1793–1809  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1791
1792 #[test]
1793 fn test_create_hashes_equivalence() {
1794 let array: ArrayRef = Arc::new(Int32Array::from(vec![1, 2, 3, 4]));
1795 let random_state = RandomState::with_seed(0);
1796
1797 let mut hashes1 = vec![0; array.len()];
1798 create_hashes(
1799 &[Arc::clone(&array) as ArrayRef],
1800 &random_state,
1801 &mut hashes1,
1802 )
1803 .unwrap();
1804
1805 let mut hashes2 = vec![0; array.len()];
1806 create_hashes([array], &random_state, &mut hashes2).unwrap();
1807
1808 assert_eq!(hashes1, hashes2);
1809 }
1810
1811 #[test]
1812 fn test_with_hashes() {

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
create_hashesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…