()
| 69 | #[test] |
| 70 | #[cfg(not(feature = "force_validate"))] |
| 71 | fn test_decimal_null_offset_nulls() { |
| 72 | let decimal_array = create_decimal_array(vec![Some(1), Some(2), None, Some(3)], 10, 3); |
| 73 | let decimal_array = decimal_array.slice(1, 3).into_data(); // 2, null, 3 |
| 74 | let arrays = vec![&decimal_array]; |
| 75 | let mut a = MutableArrayData::new(arrays, true, 2); |
| 76 | a.extend(0, 0, 2); // 2, null |
| 77 | a.extend_nulls(3); // 2, null, null, null, null |
| 78 | a.extend(0, 1, 3); //2, null, null, null, null, null, 3 |
| 79 | let result = a.freeze(); |
| 80 | let array = Decimal128Array::from(result); |
| 81 | let expected = |
| 82 | create_decimal_array(vec![Some(2), None, None, None, None, None, Some(3)], 10, 3); |
| 83 | assert_eq!(array, expected); |
| 84 | } |
| 85 | |
| 86 | /// tests extending from a primitive array w/ offset nor nulls |
| 87 | #[test] |
nothing calls this directly
no test coverage detected