()
| 827 | /// (file is empty) |
| 828 | #[tokio::test] |
| 829 | async fn test_csv_empty_file() -> Result<()> { |
| 830 | let ctx = SessionContext::new(); |
| 831 | ctx.register_csv( |
| 832 | "empty", |
| 833 | "tests/data/empty_0_byte.csv", |
| 834 | CsvReadOptions::new().has_header(false), |
| 835 | ) |
| 836 | .await?; |
| 837 | |
| 838 | let query = "select * from empty where random() > 0.5;"; |
| 839 | let query_result = ctx.sql(query).await?.collect().await?; |
| 840 | |
| 841 | assert_snapshot!(batches_to_string(&query_result),@r" |
| 842 | ++ |
| 843 | ++ |
| 844 | "); |
| 845 | |
| 846 | Ok(()) |
| 847 | } |
| 848 | |
| 849 | /// Read a single empty csv file with header |
| 850 | /// |
nothing calls this directly
no test coverage detected
searching dependent graphs…