Skip to content

Commit

Permalink
Revert "Reverting previous two commits"
Browse files Browse the repository at this point in the history
This reverts commit 706d6e8.
  • Loading branch information
edmondop committed Aug 2, 2024
1 parent 706d6e8 commit b075bbb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
10 changes: 5 additions & 5 deletions datafusion/expr/src/test/function_stub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ impl Default for Min {
impl Min {
pub fn new() -> Self {
Self {
aliases: vec!["MIN".to_string()],
aliases: vec!["min".to_string()],
signature: Signature::variadic_any(Volatility::Immutable),
}
}
Expand All @@ -340,7 +340,7 @@ impl AggregateUDFImpl for Min {
}

fn name(&self) -> &str {
"min"
"MIN"
}

fn signature(&self) -> &Signature {
Expand Down Expand Up @@ -399,7 +399,7 @@ pub struct Max {

impl std::fmt::Debug for Max {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_struct("Max")
f.debug_struct("Min")
.field("name", &self.name())
.field("signature", &self.signature)
.finish()
Expand All @@ -415,7 +415,7 @@ impl Default for Max {
impl Max {
pub fn new() -> Self {
Self {
aliases: vec!["MAX".to_string()],
aliases: vec!["max".to_string()],
signature: Signature::variadic_any(Volatility::Immutable),
}
}
Expand All @@ -427,7 +427,7 @@ impl AggregateUDFImpl for Max {
}

fn name(&self) -> &str {
"max"
"MAX"
}

fn signature(&self) -> &Signature {
Expand Down
25 changes: 20 additions & 5 deletions datafusion/functions-aggregate/src/min_max.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,22 @@
// under the License.

//! [`Max`] and [`MaxAccumulator`] accumulator for the `max` function
//! [`Min`] and [`MinAccumulator`] accumulator for the `min` function
//! [`Min`] and [`MinAccumulator`] accumulator for the `max` function

// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

use arrow::array::{
ArrayRef, BinaryArray, BinaryViewArray, BooleanArray, Date32Array, Date64Array,
Expand Down Expand Up @@ -77,7 +92,7 @@ pub struct Max {
impl Max {
pub fn new() -> Self {
Self {
aliases: vec!["MAX".to_owned()],
aliases: vec!["max".to_owned()],
signature: Signature::user_defined(Volatility::Immutable),
}
}
Expand Down Expand Up @@ -131,7 +146,7 @@ impl AggregateUDFImpl for Max {
}

fn name(&self) -> &str {
"max"
"MAX"
}

fn signature(&self) -> &Signature {
Expand Down Expand Up @@ -883,7 +898,7 @@ impl Min {
pub fn new() -> Self {
Self {
signature: Signature::user_defined(Volatility::Immutable),
aliases: vec!["MIN".to_owned()],
aliases: vec!["min".to_owned()],
}
}
}
Expand All @@ -900,7 +915,7 @@ impl AggregateUDFImpl for Min {
}

fn name(&self) -> &str {
"min"
"MIN"
}

fn signature(&self) -> &Signature {
Expand Down

0 comments on commit b075bbb

Please sign in to comment.