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

Function test_from_iter_decimal32array

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

Source from the content-addressed store, hash-verified

2720
2721 #[test]
2722 fn test_from_iter_decimal32array() {
2723 let value1 = 12345;
2724 let value2 = 56789;
2725
2726 let mut array: Decimal32Array =
2727 vec![Some(value1), None, Some(value2)].into_iter().collect();
2728 array = array.with_precision_and_scale(9, 2).unwrap();
2729 assert_eq!(array.len(), 3);
2730 assert_eq!(array.data_type(), &DataType::Decimal32(9, 2));
2731 assert_eq!(value1, array.value(0));
2732 assert!(!array.is_null(0));
2733 assert!(array.is_null(1));
2734 assert_eq!(value2, array.value(2));
2735 assert!(!array.is_null(2));
2736 }
2737
2738 #[test]
2739 fn test_unary_opt() {

Callers

nothing calls this directly

Calls 3

collectMethod · 0.80
into_iterMethod · 0.45

Tested by

no test coverage detected