Skip to content
Closed
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
6 changes: 6 additions & 0 deletions rust/arrow/src/datatypes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,12 @@ impl<T: ArrowNativeType> ToByteSlice for T {
}
}

impl fmt::Display for DataType {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}

impl DataType {
/// Parse a data type from a JSON representation
pub(crate) fn from(json: &Value) -> Result<DataType> {
Expand Down
7 changes: 4 additions & 3 deletions rust/datafusion/src/physical_plan/hash_aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)));
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions rust/datafusion/src/physical_plan/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)));
}
}
}
Expand Down