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

Function test_decimal

arrow/tests/array_transform.rs:43–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41#[test]
42#[cfg(not(feature = "force_validate"))]
43fn test_decimal() {
44 let decimal_array =
45 create_decimal_array(vec![Some(1), Some(2), None, Some(3)], 10, 3).into_data();
46 let arrays = vec![&decimal_array];
47 let mut a = MutableArrayData::new(arrays, true, 3);
48 a.extend(0, 0, 3);
49 a.extend(0, 2, 3);
50 let result = a.freeze();
51 let array = Decimal128Array::from(result);
52 let expected = create_decimal_array(vec![Some(1), Some(2), None, None], 10, 3);
53 assert_eq!(array, expected);
54}
55#[test]
56#[cfg(not(feature = "force_validate"))]
57fn test_decimal_offset() {

Callers

nothing calls this directly

Calls 4

freezeMethod · 0.80
create_decimal_arrayFunction · 0.70
into_dataMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected