()
| 2486 | |
| 2487 | #[test] |
| 2488 | fn test_skip_empty_lines() { |
| 2489 | let schema = Schema::new(vec![Field::new("a", DataType::Int64, true)]); |
| 2490 | let builder = ReaderBuilder::new(Arc::new(schema)).with_batch_size(64); |
| 2491 | let json_content = " |
| 2492 | {\"a\": 1} |
| 2493 | {\"a\": 2} |
| 2494 | {\"a\": 3}"; |
| 2495 | let mut reader = builder.build(Cursor::new(json_content)).unwrap(); |
| 2496 | let batch = reader.next().unwrap().unwrap(); |
| 2497 | |
| 2498 | assert_eq!(1, batch.num_columns()); |
| 2499 | assert_eq!(3, batch.num_rows()); |
| 2500 | |
| 2501 | let schema = reader.schema(); |
| 2502 | let c = schema.column_with_name("a").unwrap(); |
| 2503 | assert_eq!(&DataType::Int64, c.1.data_type()); |
| 2504 | } |
| 2505 | |
| 2506 | #[test] |
| 2507 | fn test_with_multiple_batches() { |
nothing calls this directly
no test coverage detected