Apache DataFusion SQL Query Engine
ARROW-11209: [Rust] DF - Better error message on unsupported GROUP BY
Dmitry Patsuraf3a9ba014215
diff --git a/rust/datafusion/src/physical_plan/hash_aggregate.rs b/rust/datafusion/src/physical_plan/hash_aggregate.rsindex b17b8ef609..a902584b39 100644--- a/rust/datafusion/src/physical_plan/hash_aggregate.rs+++ b/rust/datafusion/src/physical_plan/hash_aggregate.rs@@ -828,9 +828,10 @@ pub(crate) fn create_group_by_values(}_ => {// This is internal because we should have caught this before.- return Err(DataFusionError::Internal(- "Unsupported GROUP BY data type".to_string(),- ));+ return Err(DataFusionError::Internal(format!(+ "Unsupported GROUP BY for {}",+ col.data_type(),+ )));}}}diff --git a/rust/datafusion/src/physical_plan/hash_join.rs b/rust/datafusion/src/physical_plan/hash_join.rsindex e9119bdddd..7ed06792b0 100644--- a/rust/datafusion/src/physical_plan/hash_join.rs+++ b/rust/datafusion/src/physical_plan/hash_join.rs@@ -449,9 +449,10 @@ pub(crate) fn create_key(}_ => {// This is internal because we should have caught this before.- return Err(DataFusionError::Internal(- "Unsupported GROUP BY data type".to_string(),- ));+ return Err(DataFusionError::Internal(format!(+ "Unsupported GROUP BY for {}",+ col.data_type(),+ )));}}}