()
| 552 | |
| 553 | #[test] |
| 554 | fn test_cast_simple_column() { |
| 555 | let source = Arc::new(Int32Array::from(vec![1, 2, 3])) as ArrayRef; |
| 556 | let target_field = field("ints", DataType::Int64); |
| 557 | let result = |
| 558 | cast_column(&source, target_field.data_type(), &DEFAULT_CAST_OPTIONS) |
| 559 | .unwrap(); |
| 560 | let result = result.as_any().downcast_ref::<Int64Array>().unwrap(); |
| 561 | assert_eq!(result.len(), 3); |
| 562 | assert_eq!(result.value(0), 1); |
| 563 | assert_eq!(result.value(1), 2); |
| 564 | assert_eq!(result.value(2), 3); |
| 565 | } |
| 566 | |
| 567 | #[test] |
| 568 | fn test_cast_column_with_options() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…