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