Skip to content

Commit 6bf2326

Browse files
authored
chore: More details to No UDF registered error (#15843)
1 parent 00617a0 commit 6bf2326

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

datafusion/core/src/execution/session_state.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,23 +1753,23 @@ impl FunctionRegistry for SessionState {
17531753
let result = self.scalar_functions.get(name);
17541754

17551755
result.cloned().ok_or_else(|| {
1756-
plan_datafusion_err!("There is no UDF named \"{name}\" in the registry")
1756+
plan_datafusion_err!("There is no UDF named \"{name}\" in the registry. Use session context `register_udf` function to register a custom UDF")
17571757
})
17581758
}
17591759

17601760
fn udaf(&self, name: &str) -> datafusion_common::Result<Arc<AggregateUDF>> {
17611761
let result = self.aggregate_functions.get(name);
17621762

17631763
result.cloned().ok_or_else(|| {
1764-
plan_datafusion_err!("There is no UDAF named \"{name}\" in the registry")
1764+
plan_datafusion_err!("There is no UDAF named \"{name}\" in the registry. Use session context `register_udaf` function to register a custom UDAF")
17651765
})
17661766
}
17671767

17681768
fn udwf(&self, name: &str) -> datafusion_common::Result<Arc<WindowUDF>> {
17691769
let result = self.window_functions.get(name);
17701770

17711771
result.cloned().ok_or_else(|| {
1772-
plan_datafusion_err!("There is no UDWF named \"{name}\" in the registry")
1772+
plan_datafusion_err!("There is no UDWF named \"{name}\" in the registry. Use session context `register_udwf` function to register a custom UDWF")
17731773
})
17741774
}
17751775

0 commit comments

Comments
 (0)