You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
But now it yields:
ContextProvider not implented for SessionState
Expected behavior
A way to parse, manipulate AST, then plan separately.
The text was updated successfully, but these errors were encountered: