alamb commented on code in PR #27674:
URL: https://github.com/apache/datafusion/pull/27674#discussion_r4699146183
##########
datafusion/sql/src/expr/function.rs:
##########
@@ -957,17 +983,31 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
}
// Could not find the relevant function, so return an error
+ let has_functions = if is_function_window {
+ !self.context_provider.udaf_names().is_empty()
+ || !self.context_provider.udwf_names().is_empty()
+ } else {
+ !self.context_provider.udf_names().is_empty()
+ || !self
+ .context_provider
+ .higher_order_function_names()
+ .is_empty()
+ || !self.context_provider.udaf_names().is_empty()
+ };
+ if !has_functions {
+ return internal_err!("No functions registered with this context.");
Review Comment:
I suggest we change to plan_err as a follow on PR
--
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]