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

Function create_hashes_for_decimal_array

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

Source from the content-addressed store, hash-verified

1126
1127 #[test]
1128 fn create_hashes_for_decimal_array() -> Result<()> {
1129 let array = vec![1, 2, 3, 4]
1130 .into_iter()
1131 .map(Some)
1132 .collect::<Decimal128Array>()
1133 .with_precision_and_scale(20, 3)
1134 .unwrap();
1135 let array_ref: ArrayRef = Arc::new(array);
1136 let random_state = RandomState::with_seed(0);
1137 let hashes_buff = &mut vec![0; array_ref.len()];
1138 let hashes = create_hashes(&[array_ref], &random_state, hashes_buff)?;
1139 assert_eq!(hashes.len(), 4);
1140 Ok(())
1141 }
1142
1143 #[test]
1144 fn create_hashes_for_empty_fixed_size_lit() -> Result<()> {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
create_hashesFunction · 0.85
mapMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…