We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b0ed2d commit 62d712eCopy full SHA for 62d712e
datafusion/expr/src/type_coercion/functions.rs
@@ -635,8 +635,13 @@ fn get_valid_types(
635
default_casted_type.default_cast_for(current_type)?;
636
new_types.push(casted_type);
637
} else {
638
- return internal_err!(
639
- "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."
640
+ } else {
641
+ ""
642
+ };
643
+ return plan_err!(
644
+ "Function '{function_name}' requires {}, but received {} (DataType: {}).{hint}",
645
param.desired_type(),
646
current_native_type,
647
current_type
0 commit comments