From 5b7b878d278f25eba7d5e7c31e496efeb78bc428 Mon Sep 17 00:00:00 2001 From: Vladimir Gapeyev <9939945+vgapeyev@users.noreply.github.com> Date: Fri, 30 Aug 2024 04:25:53 +0000 Subject: [PATCH 1/3] Cargo.toml for datafusion-40.0.0 upgrade. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 9e5d262..bc4e449 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ default = ["trino_expressions"] trino_expressions = [] [dependencies] -datafusion = { version = "39.0.0" } +datafusion = { version = "40.0.0" } arrow = { version = "52.0.0", features = ["prettyprint"] } #arrow-flight = { workspace = true } #arrow-schema = { workspace = true } From 605e27ad0e77b8875c6eb2b9e5eca78b3d5115df Mon Sep 17 00:00:00 2001 From: Vladimir Gapeyev <9939945+vgapeyev@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:32:36 +0000 Subject: [PATCH 2/3] stddev / stddev_samp aggregation is now a UDAF https://github.com/apache/datafusion/pull/10834 --- assets/trino/functions.sdf.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/trino/functions.sdf.yml b/assets/trino/functions.sdf.yml index 9d2c7e4..52cffae 100644 --- a/assets/trino/functions.sdf.yml +++ b/assets/trino/functions.sdf.yml @@ -8588,6 +8588,7 @@ function: optional-parameters: [] returns: datatype: double + implemented-by: !datafusion section: aggregate cross-link: https://trino.io/docs/current/functions/aggregate.html#stddev description: > @@ -8649,6 +8650,7 @@ function: returns: datatype: double implemented-by: !datafusion + udf: stddev section: aggregate cross-link: https://trino.io/docs/current/functions/aggregate.html#stddev_samp description: > @@ -8668,6 +8670,7 @@ function: returns: datatype: double implemented-by: !datafusion + udf: stddev section: aggregate cross-link: https://trino.io/docs/current/functions/aggregate.html#stddev_samp description: > From a9e08ab008dc056eaf4fbdd78dc77acca4f65ee0 Mon Sep 17 00:00:00 2001 From: Vladimir Gapeyev <9939945+vgapeyev@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:53:09 +0000 Subject: [PATCH 3/3] Summation UDAF is now renamed from "SUM" to "sum" In DF-39 it was inconsistently named "SUM", but in DF-40 this got corrected. --- assets/trino/functions.sdf.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/assets/trino/functions.sdf.yml b/assets/trino/functions.sdf.yml index 52cffae..c99707d 100644 --- a/assets/trino/functions.sdf.yml +++ b/assets/trino/functions.sdf.yml @@ -8818,7 +8818,6 @@ function: returns: datatype: bigint implemented-by: !datafusion - udf: SUM section: aggregate cross-link: https://trino.io/docs/current/functions/aggregate.html#sum description: > @@ -8838,7 +8837,6 @@ function: returns: datatype: double implemented-by: !datafusion - udf: SUM section: aggregate cross-link: https://trino.io/docs/current/functions/aggregate.html#sum description: > @@ -8853,7 +8851,6 @@ function: returns: datatype: decimal(38, s) implemented-by: !datafusion - udf: SUM section: aggregate cross-link: https://trino.io/docs/current/functions/aggregate.html#sum description: > @@ -8868,7 +8865,6 @@ function: returns: datatype: real implemented-by: !datafusion - udf: SUM section: aggregate cross-link: https://trino.io/docs/current/functions/aggregate.html#sum description: >