()
| 1393 | |
| 1394 | #[tokio::test] |
| 1395 | async fn test_distinct_on() -> Result<()> { |
| 1396 | let t = test_table().await?; |
| 1397 | let plan = t |
| 1398 | .distinct_on(vec![col("c1")], vec![col("aggregate_test_100.c1")], None) |
| 1399 | .unwrap(); |
| 1400 | |
| 1401 | let sql_plan = |
| 1402 | create_plan("select distinct on (c1) c1 from aggregate_test_100").await?; |
| 1403 | |
| 1404 | assert_same_plan(&plan.logical_plan().clone(), &sql_plan); |
| 1405 | |
| 1406 | let df_results = plan.clone().collect().await?; |
| 1407 | |
| 1408 | assert_snapshot!( |
| 1409 | batches_to_sort_string(&df_results), |
| 1410 | @r" |
| 1411 | +----+ |
| 1412 | | c1 | |
| 1413 | +----+ |
| 1414 | | a | |
| 1415 | | b | |
| 1416 | | c | |
| 1417 | | d | |
| 1418 | | e | |
| 1419 | +----+ |
| 1420 | " |
| 1421 | ); |
| 1422 | |
| 1423 | Ok(()) |
| 1424 | } |
| 1425 | |
| 1426 | #[tokio::test] |
| 1427 | async fn test_distinct_on_sort_by() -> Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…