goldmedal commented on issue #10855:
URL: https://github.com/apache/datafusion/issues/10855#issuecomment-2158643791

   Currently, in my personal work, I just use it like
   ```rust
   let ctx = SessionContext::new();
   let new_state = ctx
       .state()
       .add_analyzer_rule(Arc::new(ModelAnalyzeRule::new()))
       .add_analyzer_rule(Arc::new(ModelGenerationRule::new()));
   let new_ctx = SessionContext::new_with_state(new_state);
   // create a plan to run a SQL query
   let df = new_ctx.sql("SELECT * FROM wrenai.default.orders").await?;
   ```
   After the API updated, I guess it would be
   ```rust
   let ctx = SessionContext::new();
   ctx.state()
       .add_analyzer_rule(Arc::new(ModelAnalyzeRule::new()))
       .add_analyzer_rule(Arc::new(ModelGenerationRule::new()));
   // create a plan to run a SQL query
   let df = ctx.sql("SELECT * FROM wrenai.default.orders").await?;
   ```


-- 
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: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to