You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2023/01/17 23:05:06 UTC

[GitHub] [arrow-datafusion] avantgardnerio opened a new issue, #4957: Split `create_logical_plan()` into parsing and planning

avantgardnerio opened a new issue, #4957:
URL: https://github.com/apache/arrow-datafusion/issues/4957

   **Describe the bug**
   
   It's not really a bug, more of an API regression. When #4607 got merged, consumers of the DataFusion public API lost the ability to (easily) inspect or alter the AST of a SQL statement before it got planned. This is because the function that runs it became non-trivial in that it copies tables into a new context, so now the consumer would either have to duplicate the table copying logic, or go without.
   
   **To Reproduce**
   
   This used to work:
   
   ```
           let statements = DFParser::parse_sql(sql)?;
           let statements: Vec<_> = statements.into_iter().collect();
   
          // Do something with AST here
   
           let state = df_ctx.state();
           let planner = SqlToRel::new(&state);
           let plan = planner.statement_to_plan(stmt).map_err(|e| err!("", e))?;
           let df = Arc::new(DataFrame::new(df_ctx.state(), plan));
   ```
   
   But now it yields: `ContextProvider not implented for SessionState`
   
   **Expected behavior**
   
   A way to parse, manipulate AST, then plan separately.
   


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

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


[GitHub] [arrow-datafusion] avantgardnerio closed issue #4957: Split `create_logical_plan()` into parsing and planning

Posted by GitBox <gi...@apache.org>.
avantgardnerio closed issue #4957: Split `create_logical_plan()` into parsing and planning
URL: https://github.com/apache/arrow-datafusion/issues/4957


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