()
| 829 | #[tokio::test] |
| 830 | #[cfg_attr(tarpaulin, ignore)] |
| 831 | async fn csv_explain_analyze() { |
| 832 | // This test uses the execute function to run an actual plan under EXPLAIN ANALYZE |
| 833 | let ctx = SessionContext::new(); |
| 834 | register_aggregate_csv_by_sql(&ctx).await; |
| 835 | let sql = "EXPLAIN ANALYZE SELECT count(*), c1 FROM aggregate_test_100 group by c1"; |
| 836 | let actual = execute_to_batches(&ctx, sql).await; |
| 837 | let formatted = arrow::util::pretty::pretty_format_batches(&actual) |
| 838 | .unwrap() |
| 839 | .to_string(); |
| 840 | |
| 841 | // Only test basic plumbing and try to avoid having to change too |
| 842 | // many things. explain_analyze_baseline_metrics covers the values |
| 843 | // in greater depth |
| 844 | let needle = "ProjectionExec: expr=[count(Int64(1))@1 as count(*), c1@0 as c1], metrics=[output_rows=5"; |
| 845 | assert_contains!(&formatted, needle); |
| 846 | |
| 847 | let verbose_needle = "Output Rows"; |
| 848 | assert_not_contains!(formatted, verbose_needle); |
| 849 | } |
| 850 | |
| 851 | #[tokio::test] |
| 852 | #[cfg_attr(tarpaulin, ignore)] |
nothing calls this directly
no test coverage detected
searching dependent graphs…