alamb commented on issue #1164: URL: https://github.com/apache/datafusion-ballista/issues/1164#issuecomment-2612012112
> the problem is that SessionContext will execute DDL statements immediately and LogicalPlan::DDL will be swapped with LogicalPlan::Empty, thus no DDL information will reach the planner. I am sorry if I am misunderstanding and I am not faimilar with the Balilsta code. From the DataFusion side, however, you can avoid immediately executing DDL by using lower level APIs on SessionState So instead of running [`SessionContext::sql`](https://docs.rs/datafusion/latest/datafusion/execution/context/struct.SessionContext.html#method.sql) You could do what it does ([source](https://docs.rs/datafusion/latest/src/datafusion/execution/context/mod.rs.html#611-614)): ```rust let plan = self.state().create_logical_plan(sql).await?; match plan { LogicalPlan::DML(...) => { // do whatever ballista needs here } _ => ctx.execute_logical_plan() } ``` Then you could perhaps `Propagate DDLs Statements to QueryPlanner` -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org