You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "NiwakaDev (via GitHub)" <gi...@apache.org> on 2023/07/31 21:59:50 UTC

[GitHub] [arrow-datafusion] NiwakaDev commented on a diff in pull request #7138: feat: allow `datafusion-cli` to accept multiple statements

NiwakaDev commented on code in PR #7138:
URL: https://github.com/apache/arrow-datafusion/pull/7138#discussion_r1279924919


##########
datafusion-cli/src/exec.rs:
##########
@@ -192,17 +193,20 @@ async fn exec_and_print(
     let now = Instant::now();
 
     let sql = unescape_input(&sql)?;
-    let plan = ctx.state().create_logical_plan(&sql).await?;
-    let df = match &plan {
-        LogicalPlan::Ddl(DdlStatement::CreateExternalTable(cmd)) => {
-            create_external_table(ctx, cmd).await?;
-            ctx.execute_logical_plan(plan).await?
-        }
-        _ => ctx.execute_logical_plan(plan).await?,
-    };
+    let statements = DFParser::parse_sql(&sql)?;

Review Comment:
   Done. Please let me know if there are any errors or omissions.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org