Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Dec 13, 2023
1 parent 66304c0 commit b245ad6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions datafusion/expr/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,10 @@ impl ScalarFunctionDefinition {
ScalarFunctionDefinition::UDF(udf) => {
Ok(udf.signature().volatility == crate::Volatility::Volatile)
}
ScalarFunctionDefinition::Name(_) => {
internal_err!("Cannot determine volatility of unresolved function")
ScalarFunctionDefinition::Name(func) => {
internal_err!(
"Cannot determine volatility of unresolved function: {func}"
)
}
}
}
Expand Down Expand Up @@ -1869,6 +1871,6 @@ mod test {
// Unresolved function
ScalarFunctionDefinition::Name(Arc::from("UnresolvedFunc"))
.is_volatile()
.expect_err("Unresolved function should not be resolved");
.expect_err("Shouldn't determine volatility of unresolved function");
}
}

0 comments on commit b245ad6

Please sign in to comment.