From 694340013433b1c0408c2a1cd77b22dfb9b22ad0 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 27 Jun 2023 11:12:05 -0400 Subject: [PATCH] feat: add timestamp types to max/min function (#511) This PR add supports for timestamp types in max/min function. This is currently supported in Acero and I believe most databases support this as well. --- extensions/functions_arithmetic.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/extensions/functions_arithmetic.yaml b/extensions/functions_arithmetic.yaml index 61573e8de..59196f273 100644 --- a/extensions/functions_arithmetic.yaml +++ b/extensions/functions_arithmetic.yaml @@ -1096,6 +1096,20 @@ aggregate_functions: decomposable: MANY intermediate: fp64? return: fp64? + - args: + - name: x + value: timestamp + nullability: DECLARED_OUTPUT + decomposable: MANY + intermediate: timestamp? + return: timestamp? + - args: + - name: x + value: timestamp_tz + nullability: DECLARED_OUTPUT + decomposable: MANY + intermediate: timestamp_tz? + return: timestamp_tz? - name: "max" description: Max a set of values. impls: @@ -1141,6 +1155,20 @@ aggregate_functions: decomposable: MANY intermediate: fp64? return: fp64? + - args: + - name: x + value: timestamp + nullability: DECLARED_OUTPUT + decomposable: MANY + intermediate: timestamp? + return: timestamp? + - args: + - name: x + value: timestamp_tz + nullability: DECLARED_OUTPUT + decomposable: MANY + intermediate: timestamp_tz? + return: timestamp_tz? - name: "product" description: Product of a set of values. Returns 1 for empty input. impls: