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

Function test_from_iter_decimal64array

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

Source from the content-addressed store, hash-verified

2686
2687 #[test]
2688 fn test_from_iter_decimal64array() {
2689 let value1 = 12345;
2690 let value2 = 56789;
2691
2692 let mut array: Decimal64Array =
2693 vec![Some(value1), None, Some(value2)].into_iter().collect();
2694 array = array.with_precision_and_scale(18, 4).unwrap();
2695 assert_eq!(array.len(), 3);
2696 assert_eq!(array.data_type(), &DataType::Decimal64(18, 4));
2697 assert_eq!(value1, array.value(0));
2698 assert!(!array.is_null(0));
2699 assert!(array.is_null(1));
2700 assert_eq!(value2, array.value(2));
2701 assert!(!array.is_null(2));
2702 }
2703
2704 #[test]
2705 fn test_decimal32_iter() {

Callers

nothing calls this directly

Calls 3

collectMethod · 0.80
into_iterMethod · 0.45

Tested by

no test coverage detected