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

Function test_from_iter_decimal128array

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

Source from the content-addressed store, hash-verified

2656
2657 #[test]
2658 fn test_from_iter_decimal128array() {
2659 let mut array: Decimal128Array = vec![Some(-100), None, Some(101)].into_iter().collect();
2660 array = array.with_precision_and_scale(38, 10).unwrap();
2661 assert_eq!(array.len(), 3);
2662 assert_eq!(array.data_type(), &DataType::Decimal128(38, 10));
2663 assert_eq!(-100_i128, array.value(0));
2664 assert!(!array.is_null(0));
2665 assert!(array.is_null(1));
2666 assert_eq!(101_i128, array.value(2));
2667 assert!(!array.is_null(2));
2668 }
2669
2670 #[test]
2671 fn test_decimal64_iter() {

Callers

nothing calls this directly

Calls 3

collectMethod · 0.80
into_iterMethod · 0.45

Tested by

no test coverage detected