From c58b8e433f300c2faf59339b90c707f40cd75267 Mon Sep 17 00:00:00 2001 From: Richard Tia Date: Thu, 14 Jul 2022 20:20:54 -0700 Subject: [PATCH] feat: add least and greatest functions --- extensions/functions_comparison.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/extensions/functions_comparison.yaml b/extensions/functions_comparison.yaml index 7d11f3c7a..81a14ff32 100644 --- a/extensions/functions_comparison.yaml +++ b/extensions/functions_comparison.yaml @@ -214,3 +214,30 @@ scalar_functions: variadic: min: 2 return: any1 + - + name: "least" + description: >- + Returns the smallest value. Only return null if 'all' arguments evaluate to null. + + String comparison is done in lexicographical ordering, one character at a time, from left to right. + Uppercase letters are less than lowercase letters. + impls: + - args: + - value: T + variadic: + min: 2 + return: T + + - + name: "greatest" + description: >- + Returns the largest value. Only return null if 'all' arguments evaluate to null. + + String comparison is done in lexicographical ordering, one character at a time, from left to right. + Uppercase letters are less than lowercase letters. + impls: + - args: + - value: T + variadic: + min: 2 + return: T