diff --git a/extensions/functions_comparison.yaml b/extensions/functions_comparison.yaml index 8cf67572a..3109db9d6 100644 --- a/extensions/functions_comparison.yaml +++ b/extensions/functions_comparison.yaml @@ -218,8 +218,8 @@ scalar_functions: - name: "least" description: >- - Evaluates each argument and returns the smallest one. The function will return - null if any argument evaluates to null. + Evaluates each argument and returns the smallest one. + The function will return null if any argument evaluates to null. impls: - args: - value: T @@ -227,15 +227,45 @@ scalar_functions: min: 2 return: T nullability: MIRROR + - + name: "least_skip_null" + description: >- + Evaluates each argument and returns the smallest one. + The function will return null only if all arguments evaluate to null. + impls: + - args: + - value: T + variadic: + min: 2 + return: T + # NOTE: The return type nullability as described above cannot be expressed currently + # See https://github.com/substrait-io/substrait/issues/601 + # Using MIRROR for now until it can be expressed + nullability: MIRROR - name: "greatest" description: >- - Evaluates each argument and returns the largest one. The function will return - null if any argument evaluates to null. + Evaluates each argument and returns the largest one. + The function will return null if any argument evaluates to null. + impls: + - args: + - value: T + variadic: + min: 2 + return: T + nullability: MIRROR + - + name: "greatest_skip_null" + description: >- + Evaluates each argument and returns the largest one. + The function will return null only if all arguments evaluate to null. impls: - args: - value: T variadic: min: 2 return: T + # NOTE: The return type nullability as described above cannot be expressed currently + # See https://github.com/substrait-io/substrait/issues/601 + # Using MIRROR for now until it can be expressed nullability: MIRROR