()
| 394 | /// See https://github.com/apache/datafusion/pull/17520 |
| 395 | #[tokio::test] |
| 396 | async fn test_select_no_projection() -> Result<()> { |
| 397 | let tmp_dir = TempDir::new()?; |
| 398 | // `create_ctx_with_partition` creates 10 rows per partition and we chose 1 partition |
| 399 | let ctx = create_ctx_with_partition(&tmp_dir, 1).await?; |
| 400 | |
| 401 | let results = ctx.sql("SELECT FROM test").await?.collect().await?; |
| 402 | // We should get all of the rows, just without any columns |
| 403 | let total_rows: usize = results.iter().map(|b| b.num_rows()).sum(); |
| 404 | assert_eq!(total_rows, 10); |
| 405 | // Check that none of the batches have any columns |
| 406 | for batch in &results { |
| 407 | assert_eq!(batch.num_columns(), 0); |
| 408 | } |
| 409 | // Sanity check the output, should be just empty columns |
| 410 | assert_snapshot!(batches_to_sort_string(&results), @r" |
| 411 | ++ |
| 412 | ++ |
| 413 | ++ |
| 414 | "); |
| 415 | Ok(()) |
| 416 | } |
| 417 | |
| 418 | #[tokio::test] |
| 419 | async fn test_select_cast_date_literal_to_timestamp_overflow() -> Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…