NGA-TRAN commented on a change in pull request #434:
URL: https://github.com/apache/arrow-datafusion/pull/434#discussion_r640958296



##########
File path: datafusion/tests/sql.rs
##########
@@ -1573,6 +1575,101 @@ async fn csv_explain() {
     assert_eq!(expected, actual);
 }
 
+#[tokio::test]
+async fn csv_explain_plans() {
+    // This test verify the look of each plan in its full cycle plan creation
+
+    let mut ctx = ExecutionContext::new();
+    register_aggregate_csv_by_sql(&mut ctx).await;
+    let sql = "EXPLAIN SELECT c1 FROM aggregate_test_100 where c2 > 10";
+
+    // Logical plan
+    // Create plan
+    let msg = format!("Creating logical plan for '{}'", sql);
+    let plan = ctx.create_logical_plan(&sql).expect(&msg);
+    let logical_schema = plan.schema();
+    // 
+    println!("SQL: {}", sql);
+    // Verify schema
+    let expected = "Explain [plan_type:Utf8, plan:Utf8]";
+    let actual = format!("{}", plan.display_indent_schema());
+    assert_eq!(expected, actual);
+    // Verify the text format of the plan
+    let expected = "Explain";

Review comment:
       Agree. I actually made this happen in a different branch but want to 
verify with you first. Will bring it in here




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to