()
| 845 | |
| 846 | #[test] |
| 847 | fn test_create_decimal_array() { |
| 848 | let size = 10; |
| 849 | let fields = vec![ |
| 850 | Field::new("a", DataType::Decimal128(10, -2), true), |
| 851 | Field::new("b", DataType::Decimal256(10, -2), true), |
| 852 | ]; |
| 853 | let schema = Schema::new(fields); |
| 854 | let schema_ref = Arc::new(schema); |
| 855 | let batch = create_random_batch(schema_ref.clone(), size, 0.35, 0.7).unwrap(); |
| 856 | |
| 857 | assert_eq!(batch.schema(), schema_ref); |
| 858 | assert_eq!(batch.num_columns(), schema_ref.fields().len()); |
| 859 | for array in batch.columns() { |
| 860 | assert_eq!(array.len(), size); |
| 861 | } |
| 862 | } |
| 863 | |
| 864 | #[test] |
| 865 | fn create_non_nullable_decimal_array_with_null_density() { |
nothing calls this directly
no test coverage detected