From 1d41190c8c222966be273bf713eb858526a7853c Mon Sep 17 00:00:00 2001 From: yangjie01 Date: Tue, 25 Aug 2026 15:42:10 +0800 Subject: [PATCH 1/3] test: re-enable three ClickHouse cast cases on Spark 3.5 --- .../gluten/utils/clickhouse/ClickHouseTestSettings.scala | 3 --- 1 file changed, 3 deletions(-) diff --git a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala index 920554f91e8..6f6f102459f 100644 --- a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala +++ b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala @@ -2195,9 +2195,6 @@ class ClickHouseTestSettings extends BackendTestSettings { .excludeCH("cast from timestamp II") .excludeCH("cast a timestamp before the epoch 1970-01-01 00:00:00Z II") .excludeCH("cast a timestamp before the epoch 1970-01-01 00:00:00Z") - .excludeCH("cast from array II") - .excludeCH("cast from array III") - .excludeCH("cast from struct III") .excludeCH("ANSI mode: cast string to timestamp with parse error") .excludeCH("ANSI mode: cast string to date with parse error") .excludeCH("Gluten - data type casting") From b7cdc6b27426a825148cc39b892752e1d5312003 Mon Sep 17 00:00:00 2001 From: yangjie01 Date: Tue, 25 Aug 2026 15:47:00 +0800 Subject: [PATCH 2/3] test: also re-enable tanh on ClickHouse Spark 3.5 --- .../apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala index 6f6f102459f..832f3deb024 100644 --- a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala +++ b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala @@ -1180,7 +1180,6 @@ class ClickHouseTestSettings extends BackendTestSettings { enableSuite[GlutenMathExpressionsSuite] // Spark round UT for round(3.1415,3) is not correct. .exclude("round/bround/floor/ceil") - .excludeCH("tanh") .excludeCH("unhex") .excludeCH("atan2") .excludeCH("SPARK-42045: integer overflow in round/bround") From 79ffee1827f09c6b598a951d77aaecaa2c337286 Mon Sep 17 00:00:00 2001 From: yangjie01 Date: Tue, 25 Aug 2026 18:55:43 +0800 Subject: [PATCH 3/3] test: restore the four ClickHouse exclusions with the reasons CI reported --- .../utils/clickhouse/ClickHouseTestSettings.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala index 832f3deb024..02f39d6c72d 100644 --- a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala +++ b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseTestSettings.scala @@ -1180,6 +1180,9 @@ class ClickHouseTestSettings extends BackendTestSettings { enableSuite[GlutenMathExpressionsSuite] // Spark round UT for round(3.1415,3) is not correct. .exclude("round/bround/floor/ceil") + // ClickHouse's tanh differs from Spark's at the sixth significant digit: + // TANH(-0.1) returns -0.0996695958408681, the case expects -0.09966799462495582. + .excludeCH("tanh") .excludeCH("unhex") .excludeCH("atan2") .excludeCH("SPARK-42045: integer overflow in round/bround") @@ -2194,6 +2197,15 @@ class ClickHouseTestSettings extends BackendTestSettings { .excludeCH("cast from timestamp II") .excludeCH("cast a timestamp before the epoch 1970-01-01 00:00:00Z II") .excludeCH("cast a timestamp before the epoch 1970-01-01 00:00:00Z") + // ClickHouse throws instead of yielding null: try_cast([123,true,f] as + // array) fails with an exception. + .excludeCH("cast from array II") + // TRY-mode overflow inside a complex type wraps instead of yielding null on + // ClickHouse: try_cast([2.147483648E9] as array) returns [-2147483648]. + .excludeCH("cast from array III") + // Same as "cast from array III": try_cast([2.147483648E9] as struct) + // returns [-2147483648] on ClickHouse. + .excludeCH("cast from struct III") .excludeCH("ANSI mode: cast string to timestamp with parse error") .excludeCH("ANSI mode: cast string to date with parse error") .excludeCH("Gluten - data type casting")