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

Function explain_logical_plan_only

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

Source from the content-addressed store, hash-verified

1065
1066#[tokio::test]
1067async fn explain_logical_plan_only() {
1068 let mut config = ConfigOptions::new();
1069 config.explain.logical_plan_only = true;
1070 let ctx = SessionContext::new_with_config(config.into());
1071 let sql = "EXPLAIN select count(*) from (values ('a', 1, 100), ('a', 2, 150)) as t (c1,c2,c3)";
1072 let actual = execute(&ctx, sql).await;
1073 let actual = normalize_vec_for_explain(actual);
1074 let actual = actual.into_iter().map(|r| r.join("\n")).collect::<String>();
1075
1076 assert_snapshot!(
1077 actual,
1078 @r#"
1079 logical_plan
1080 Projection: count(Int64(1)) AS count(*)
1081 Aggregate: groupBy=[[]], aggr=[[count(Int64(1))]]
1082 SubqueryAlias: t
1083 Projection:
1084 Values: (Utf8("a"), Int64(1), Int64(100)), (Utf8("a"), Int64(2), Int64(150))
1085 "#
1086 );
1087}
1088
1089#[tokio::test]
1090async fn explain_physical_plan_only() {

Callers

nothing calls this directly

Calls 7

newFunction · 0.85
executeFunction · 0.70
intoMethod · 0.45
mapMethod · 0.45
into_iterMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…