niebayes commented on code in PR #15119: URL: https://github.com/apache/datafusion/pull/15119#discussion_r2009375028
########## datafusion/core/src/execution/context/mod.rs: ########## @@ -1632,7 +1632,7 @@ impl FunctionRegistry for SessionContext { } fn expr_planners(&self) -> Vec<Arc<dyn ExprPlanner>> { - self.state.read().expr_planners() + self.state.read().expr_planners().to_vec() Review Comment: @Omega359 I agree, it's better to align the types. I tried to align the types but ran into some difficulties. If both functions return a slice, SessionContext::expr_planners would encounter the error `Cannot return a reference of temporary values`. If both return a Vec, then SessionState's implementation of ContextProvider::get_expr_planners would also face the same issue. The only way to resolve this would be to change the return type of ContextProvider::get_expr_planners to Vec, but that would be a breaking change. -- 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