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

Function test_decimal64

arrow-array/src/array/primitive_array.rs:2382–2397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2380
2381 #[test]
2382 fn test_decimal64() {
2383 let values: Vec<_> = vec![0, 1, -1, i64::MIN, i64::MAX];
2384 let array: PrimitiveArray<Decimal64Type> =
2385 PrimitiveArray::from_iter(values.iter().copied());
2386 assert_eq!(array.values(), &values);
2387
2388 let array: PrimitiveArray<Decimal64Type> =
2389 PrimitiveArray::from_iter_values(values.iter().copied());
2390 assert_eq!(array.values(), &values);
2391
2392 let array = PrimitiveArray::<Decimal64Type>::from(values.clone());
2393 assert_eq!(array.values(), &values);
2394
2395 let array = PrimitiveArray::<Decimal64Type>::from(array.to_data());
2396 assert_eq!(array.values(), &values);
2397 }
2398
2399 #[test]
2400 fn test_decimal128() {

Callers

nothing calls this directly

Calls 4

from_iterFunction · 0.50
iterMethod · 0.45
cloneMethod · 0.45
to_dataMethod · 0.45

Tested by

no test coverage detected