Skip to content

Commit

Permalink
Update src/expr/src/vector_op/array_min_max.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
wangrunji0408 authored Sep 7, 2023
1 parent 9ffd065 commit 913bbd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/expr/src/vector_op/array_min_max.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ pub fn array_min<T: Scalar>(list: ListRef<'_>) -> Result<Option<T>> {
#[function("array_max(list) -> varchar")]
#[function("array_max(list) -> bytea")]
pub fn array_max<T: Scalar>(list: ListRef<'_>) -> Result<Option<T>> {
let min_value = list.iter().flatten().map(DefaultOrdered).max();
match min_value.map(|v| v.0).to_owned_datum() {
let max_value = list.iter().flatten().map(DefaultOrdered).max();
match max_value.map(|v| v.0).to_owned_datum() {
Some(s) => Ok(Some(s.try_into()?)),
None => Ok(None),
}
Expand Down

0 comments on commit 913bbd8

Please sign in to comment.