From 913bbd8689a5565af5c3ff6059e3630d17a6d36e Mon Sep 17 00:00:00 2001 From: Runji Wang Date: Thu, 7 Sep 2023 15:58:49 +0800 Subject: [PATCH] Update src/expr/src/vector_op/array_min_max.rs --- src/expr/src/vector_op/array_min_max.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/expr/src/vector_op/array_min_max.rs b/src/expr/src/vector_op/array_min_max.rs index 286e8a7e72017..1ff1a4086f2cd 100644 --- a/src/expr/src/vector_op/array_min_max.rs +++ b/src/expr/src/vector_op/array_min_max.rs @@ -51,8 +51,8 @@ pub fn array_min(list: ListRef<'_>) -> Result> { #[function("array_max(list) -> varchar")] #[function("array_max(list) -> bytea")] pub fn array_max(list: ListRef<'_>) -> Result> { - 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), }