Skip to content

Commit ecc135f

Browse files
committed
Revert to 7ea7cb4: feat(min_max): enhance documentation and clarify error messages
1 parent 963523d commit ecc135f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • datafusion/functions-aggregate-common/src

datafusion/functions-aggregate-common/src/min_max.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ macro_rules! min_max_generic {
141141
}};
142142
}
143143

144-
// min/max of two scalar values of the same type
144+
// min/max of two logically compatible scalar values.
145+
// Dictionary scalars are unwrapped to their inner values for comparison,
146+
// then rewrapped with the dictionary key type when both inputs are dictionaries.
145147
macro_rules! min_max {
146148
($VALUE:expr, $DELTA:expr, $OP:ident) => {{
147149
Ok(match ($VALUE, $DELTA) {
@@ -431,7 +433,7 @@ macro_rules! min_max {
431433

432434
e => {
433435
return internal_err!(
434-
"MIN/MAX is not expected to receive scalars of incompatible types {:?}",
436+
"MIN/MAX is not expected to receive logically incompatible scalar values {:?}",
435437
e
436438
)
437439
}

0 commit comments

Comments
 (0)