diff --git a/datafusion/physical-plan/src/joins/sort_merge_join.rs b/datafusion/physical-plan/src/joins/sort_merge_join.rs index 2da88173a410c..6ba227adff94f 100644 --- a/datafusion/physical-plan/src/joins/sort_merge_join.rs +++ b/datafusion/physical-plan/src/joins/sort_merge_join.rs @@ -1517,10 +1517,11 @@ fn compare_join_arrays( }, DataType::Date32 => compare_value!(Date32Array), DataType::Date64 => compare_value!(Date64Array), - _ => { - return not_impl_err!( - "Unsupported data type in sort merge join comparator" - ); + dt => { + return not_impl_err!("{}", format!( + "Unsupported data type in sort merge join comparator: {}", + dt + )); } } if !res.is_eq() { @@ -1583,10 +1584,11 @@ fn is_join_arrays_equal( }, DataType::Date32 => compare_value!(Date32Array), DataType::Date64 => compare_value!(Date64Array), - _ => { - return not_impl_err!( - "Unsupported data type in sort merge join comparator" - ); + dt => { + return not_impl_err!("{}", format!( + "Unsupported data type in sort merge join comparator: {}", + dt + )); } } if !is_equal {