Skip to content

Commit b075bbb

Browse files
committed
Revert "Reverting previous two commits"
This reverts commit 706d6e8.
1 parent 706d6e8 commit b075bbb

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

datafusion/expr/src/test/function_stub.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ impl Default for Min {
328328
impl Min {
329329
pub fn new() -> Self {
330330
Self {
331-
aliases: vec!["MIN".to_string()],
331+
aliases: vec!["min".to_string()],
332332
signature: Signature::variadic_any(Volatility::Immutable),
333333
}
334334
}
@@ -340,7 +340,7 @@ impl AggregateUDFImpl for Min {
340340
}
341341

342342
fn name(&self) -> &str {
343-
"min"
343+
"MIN"
344344
}
345345

346346
fn signature(&self) -> &Signature {
@@ -399,7 +399,7 @@ pub struct Max {
399399

400400
impl std::fmt::Debug for Max {
401401
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
402-
f.debug_struct("Max")
402+
f.debug_struct("Min")
403403
.field("name", &self.name())
404404
.field("signature", &self.signature)
405405
.finish()
@@ -415,7 +415,7 @@ impl Default for Max {
415415
impl Max {
416416
pub fn new() -> Self {
417417
Self {
418-
aliases: vec!["MAX".to_string()],
418+
aliases: vec!["max".to_string()],
419419
signature: Signature::variadic_any(Volatility::Immutable),
420420
}
421421
}
@@ -427,7 +427,7 @@ impl AggregateUDFImpl for Max {
427427
}
428428

429429
fn name(&self) -> &str {
430-
"max"
430+
"MAX"
431431
}
432432

433433
fn signature(&self) -> &Signature {

datafusion/functions-aggregate/src/min_max.rs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,22 @@
1515
// under the License.
1616

1717
//! [`Max`] and [`MaxAccumulator`] accumulator for the `max` function
18-
//! [`Min`] and [`MinAccumulator`] accumulator for the `min` function
18+
//! [`Min`] and [`MinAccumulator`] accumulator for the `max` function
19+
20+
// distributed with this work for additional information
21+
// regarding copyright ownership. The ASF licenses this file
22+
// to you under the Apache License, Version 2.0 (the
23+
// "License"); you may not use this file except in compliance
24+
// with the License. You may obtain a copy of the License at
25+
//
26+
// http://www.apache.org/licenses/LICENSE-2.0
27+
//
28+
// Unless required by applicable law or agreed to in writing,
29+
// software distributed under the License is distributed on an
30+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
31+
// KIND, either express or implied. See the License for the
32+
// specific language governing permissions and limitations
33+
// under the License.
1934

2035
use arrow::array::{
2136
ArrayRef, BinaryArray, BinaryViewArray, BooleanArray, Date32Array, Date64Array,
@@ -77,7 +92,7 @@ pub struct Max {
7792
impl Max {
7893
pub fn new() -> Self {
7994
Self {
80-
aliases: vec!["MAX".to_owned()],
95+
aliases: vec!["max".to_owned()],
8196
signature: Signature::user_defined(Volatility::Immutable),
8297
}
8398
}
@@ -131,7 +146,7 @@ impl AggregateUDFImpl for Max {
131146
}
132147

133148
fn name(&self) -> &str {
134-
"max"
149+
"MAX"
135150
}
136151

137152
fn signature(&self) -> &Signature {
@@ -883,7 +898,7 @@ impl Min {
883898
pub fn new() -> Self {
884899
Self {
885900
signature: Signature::user_defined(Volatility::Immutable),
886-
aliases: vec!["MIN".to_owned()],
901+
aliases: vec!["min".to_owned()],
887902
}
888903
}
889904
}
@@ -900,7 +915,7 @@ impl AggregateUDFImpl for Min {
900915
}
901916

902917
fn name(&self) -> &str {
903-
"min"
918+
"MIN"
904919
}
905920

906921
fn signature(&self) -> &Signature {

0 commit comments

Comments
 (0)