jayzhan211 commented on code in PR #11487:
URL: https://github.com/apache/datafusion/pull/11487#discussion_r1682349054


##########
datafusion/sql/tests/cases/plan_to_sql.rs:
##########
@@ -155,7 +157,8 @@ fn roundtrip_statement() -> Result<()> {
 
         let context = MockContextProvider::default()
             .with_udaf(sum_udaf())
-            .with_udaf(count_udaf());
+            .with_udaf(count_udaf())
+            .with_expr_planner(Arc::new(CoreFunctionPlanner::default()));

Review Comment:
   I prefer not to re-introduce `with_expr_planner` back for context provider.
   
   It is better to use session state in context, and add planner into session 
state.
   
   Similar to SessionContextProvider
   ```rust
   struct SessionContextProvider<'a> {
       state: &'a SessionState,
       ...
   }
   ```



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

Reply via email to