()
| 1676 | |
| 1677 | #[test] |
| 1678 | fn test_init_nulls() { |
| 1679 | let schema = Arc::new(Schema::new(vec![ |
| 1680 | Field::new("c_int", DataType::UInt64, true), |
| 1681 | Field::new("c_float", DataType::Float32, true), |
| 1682 | Field::new("c_string", DataType::Utf8, true), |
| 1683 | Field::new("c_bool", DataType::Boolean, true), |
| 1684 | Field::new("c_null", DataType::Null, true), |
| 1685 | ])); |
| 1686 | let file = File::open("test/data/init_null_test.csv").unwrap(); |
| 1687 | |
| 1688 | let mut csv = ReaderBuilder::new(schema) |
| 1689 | .with_header(true) |
| 1690 | .build(file) |
| 1691 | .unwrap(); |
| 1692 | |
| 1693 | let batch = csv.next().unwrap().unwrap(); |
| 1694 | |
| 1695 | assert!(batch.column(1).is_null(0)); |
| 1696 | assert!(!batch.column(1).is_null(1)); |
| 1697 | assert!(batch.column(1).is_null(2)); |
| 1698 | assert!(!batch.column(1).is_null(3)); |
| 1699 | assert!(!batch.column(1).is_null(4)); |
| 1700 | } |
| 1701 | |
| 1702 | #[test] |
| 1703 | fn test_init_nulls_with_inference() { |
nothing calls this directly
no test coverage detected