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

Function test_decimal_from_iter

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

Source from the content-addressed store, hash-verified

2504
2505 #[test]
2506 fn test_decimal_from_iter() {
2507 let array: Decimal128Array = vec![Some(-100), None, Some(101)].into_iter().collect();
2508 assert_eq!(array.len(), 3);
2509 assert_eq!(array.data_type(), &DataType::Decimal128(38, 10));
2510 assert_eq!(-100_i128, array.value(0));
2511 assert!(!array.is_null(0));
2512 assert!(array.is_null(1));
2513 assert_eq!(101_i128, array.value(2));
2514 assert!(!array.is_null(2));
2515 }
2516
2517 #[test]
2518 fn test_decimal_iter_sized() {

Callers

nothing calls this directly

Calls 2

collectMethod · 0.80
into_iterMethod · 0.45

Tested by

no test coverage detected