Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions datafusion/expr/src/type_coercion/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,13 @@ fn get_valid_types(
default_casted_type.default_cast_for(current_type)?;
new_types.push(casted_type);
} else {
return internal_err!(
"Expect {} but received NativeType::{}, DataType: {}",
let hint = if matches!(current_native_type, NativeType::Binary) {
"\n\nHint: Binary types are not automatically coerced to String. Use CAST(column AS VARCHAR) to convert Binary data to String."
} else {
""
};
return plan_err!(
"Function '{function_name}' requires {}, but received {} (DataType: {}).{hint}",
param.desired_type(),
current_native_type,
current_type
Expand Down
Loading