MCPcopy Create free account
hub / github.com/apache/datafusion / csv_explain_analyze

Function csv_explain_analyze

datafusion/core/tests/sql/explain_analyze.rs:831–849  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

829#[tokio::test]
830#[cfg_attr(tarpaulin, ignore)]
831async 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)]

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
execute_to_batchesFunction · 0.85
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…