Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions datafusion/src/physical_optimizer/pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ mod tests {
let result = p.prune(&statistics).unwrap_err();
assert!(
result.to_string().contains(
"Data type Boolean not supported for scalar operation on dyn array"
"Data type Boolean not supported for scalar operation 'lt_eq' on dyn array"
),
"{}",
result
Expand All @@ -1399,7 +1399,7 @@ mod tests {
let result = p.prune(&statistics).unwrap_err();
assert!(
result.to_string().contains(
"Data type Boolean not supported for scalar operation on dyn array"
"Data type Boolean not supported for scalar operation 'lt_eq' on dyn array"
),
"{}",
result
Expand Down
39 changes: 20 additions & 19 deletions datafusion/src/physical_plan/expressions/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ macro_rules! compute_utf8_op_scalar {
)?))
} else {
Err(DataFusionError::Internal(format!(
"compute_utf8_op_scalar failed to cast literal value {}",
"compute_utf8_op_scalar for '{}' failed to cast literal value {}",
stringify!($OP),
$RIGHT
)))
}
Expand Down Expand Up @@ -171,8 +172,8 @@ macro_rules! binary_string_array_op_scalar {
let result: Result<Arc<dyn Array>> = match $LEFT.data_type() {
DataType::Utf8 => compute_utf8_op_scalar!($LEFT, $RIGHT, $OP, StringArray),
other => Err(DataFusionError::Internal(format!(
"Data type {:?} not supported for scalar operation on string array",
other
"Data type {:?} not supported for scalar operation '{}' on string array",
other, stringify!($OP)
))),
};
Some(result)
Expand All @@ -184,8 +185,8 @@ macro_rules! binary_string_array_op {
match $LEFT.data_type() {
DataType::Utf8 => compute_utf8_op!($LEFT, $RIGHT, $OP, StringArray),
other => Err(DataFusionError::Internal(format!(
"Data type {:?} not supported for binary operation on string arrays",
other
"Data type {:?} not supported for binary operation '{}' on string arrays",
other, stringify!($OP)
))),
}
}};
Expand All @@ -208,8 +209,8 @@ macro_rules! binary_primitive_array_op {
DataType::Float32 => compute_op!($LEFT, $RIGHT, $OP, Float32Array),
DataType::Float64 => compute_op!($LEFT, $RIGHT, $OP, Float64Array),
other => Err(DataFusionError::Internal(format!(
"Data type {:?} not supported for binary operation on primitive arrays",
other
"Data type {:?} not supported for binary operation '{}' on primitive arrays",
other, stringify!($OP)
))),
}
}};
Expand All @@ -232,8 +233,8 @@ macro_rules! binary_primitive_array_op_scalar {
DataType::Float32 => compute_op_scalar!($LEFT, $RIGHT, $OP, Float32Array),
DataType::Float64 => compute_op_scalar!($LEFT, $RIGHT, $OP, Float64Array),
other => Err(DataFusionError::Internal(format!(
"Data type {:?} not supported for scalar operation on primitive array",
other
"Data type {:?} not supported for scalar operation '{}' on primitive array",
other, stringify!($OP)
))),
};
Some(result)
Expand Down Expand Up @@ -276,8 +277,8 @@ macro_rules! binary_array_op_scalar {
compute_op_scalar!($LEFT, $RIGHT, $OP, Date64Array)
}
other => Err(DataFusionError::Internal(format!(
"Data type {:?} not supported for scalar operation on dyn array",
other
"Data type {:?} not supported for scalar operation '{}' on dyn array",
other, stringify!($OP)
))),
};
Some(result)
Expand Down Expand Up @@ -320,8 +321,8 @@ macro_rules! binary_array_op {
compute_op!($LEFT, $RIGHT, $OP, Date64Array)
}
other => Err(DataFusionError::Internal(format!(
"Data type {:?} not supported for binary operation on dyn arrays",
other
"Data type {:?} not supported for binary operation '{}' on dyn arrays",
other, stringify!($OP)
))),
}
}};
Expand Down Expand Up @@ -352,8 +353,8 @@ macro_rules! binary_string_array_flag_op {
compute_utf8_flag_op!($LEFT, $RIGHT, $OP, LargeStringArray, $NOT, $FLAG)
}
other => Err(DataFusionError::Internal(format!(
"Data type {:?} not supported for binary_string_array_flag_op operation on string array",
other
"Data type {:?} not supported for binary_string_array_flag_op operation '{}' on string array",
other, stringify!($OP)
))),
}
}};
Expand Down Expand Up @@ -394,8 +395,8 @@ macro_rules! binary_string_array_flag_op_scalar {
compute_utf8_flag_op_scalar!($LEFT, $RIGHT, $OP, LargeStringArray, $NOT, $FLAG)
}
other => Err(DataFusionError::Internal(format!(
"Data type {:?} not supported for binary_string_array_flag_op_scalar operation on string array",
other
"Data type {:?} not supported for binary_string_array_flag_op_scalar operation '{}' on string array",
other, stringify!($OP)
))),
};
Some(result)
Expand All @@ -420,8 +421,8 @@ macro_rules! compute_utf8_flag_op_scalar {
Ok(Arc::new(array))
} else {
Err(DataFusionError::Internal(format!(
"compute_utf8_flag_op_scalar failed to cast literal value {}",
$RIGHT
"compute_utf8_flag_op_scalar failed to cast literal value {} for operation '{}'",
$RIGHT, stringify!($OP)
)))
}
}};
Expand Down