()
| 342 | |
| 343 | #[tokio::test] |
| 344 | async fn read_char_column() -> Result<()> { |
| 345 | let session_ctx = SessionContext::new(); |
| 346 | let state = session_ctx.state(); |
| 347 | let task_ctx = session_ctx.task_ctx(); |
| 348 | let projection = Some(vec![0]); |
| 349 | let exec = |
| 350 | get_exec(&state, "aggregate_test_100.csv", projection, None, true).await?; |
| 351 | |
| 352 | let batches = collect(exec, task_ctx).await.expect("Collect batches"); |
| 353 | |
| 354 | assert_eq!(1, batches.len()); |
| 355 | assert_eq!(1, batches[0].num_columns()); |
| 356 | assert_eq!(100, batches[0].num_rows()); |
| 357 | |
| 358 | let array = as_string_array(batches[0].column(0))?; |
| 359 | let mut values: Vec<&str> = vec![]; |
| 360 | for i in 0..5 { |
| 361 | values.push(array.value(i)); |
| 362 | } |
| 363 | |
| 364 | assert_eq!(vec!["c", "d", "b", "a", "b"], values); |
| 365 | |
| 366 | Ok(()) |
| 367 | } |
| 368 | |
| 369 | #[tokio::test] |
| 370 | async fn test_infer_schema_stream() -> Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…