From a0b7d158386951080575fb4384e1eea29426ea9d Mon Sep 17 00:00:00 2001 From: Zhichao Zhang Date: Mon, 4 May 2026 15:50:36 +0800 Subject: [PATCH 1/2] [CH] Reopen some queries test for the Spark 3.5 Reopen some queries test for the Spark 3.5: - subquery/in-subquery/in-with-cte.sql Close #12032. --- cpp-ch/local-engine/local_engine_jni.cpp | 12 +++++++++++- .../clickhouse/ClickHouseSQLQueryTestSettings.scala | 7 ++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cpp-ch/local-engine/local_engine_jni.cpp b/cpp-ch/local-engine/local_engine_jni.cpp index b35f8b33d12..d70131181fd 100644 --- a/cpp-ch/local-engine/local_engine_jni.cpp +++ b/cpp-ch/local-engine/local_engine_jni.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -539,7 +540,16 @@ Java_org_apache_gluten_vectorized_CHNativeBlock_nativeBlockStats(JNIEnv * env, j } else { - const auto * nullable = checkAndGetColumn(&*col.column); + const DB::ColumnNullable * nullable; + if (col.column->isReplicated()) + { + auto * replicated_col = checkAndGetColumn(&*col.column); + nullable = checkAndGetColumn(&*replicated_col->getNestedColumn()); + } + else + { + nullable = checkAndGetColumn(&*col.column); + } const auto & null_map_data = nullable->getNullMapData(); jobject block_stats = env->NewObject( diff --git a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseSQLQueryTestSettings.scala b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseSQLQueryTestSettings.scala index fd4059bad69..7fe21935d8d 100644 --- a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseSQLQueryTestSettings.scala +++ b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseSQLQueryTestSettings.scala @@ -91,8 +91,10 @@ object ClickHouseSQLQueryTestSettings extends SQLQueryTestSettings { // CH- "null-propagation.sql", "operators.sql", // TODO: rebase-25.12, fix later + // the results are the same, but the order of the unsorted data is different. // "order-by-nulls-ordering.sql", // TODO: rebase-25.12, fix later + // the results are the same, but the order of the unsorted data is different. // "order-by-ordinal.sql", "outer-join.sql", "parse-schema-string.sql", @@ -120,20 +122,23 @@ object ClickHouseSQLQueryTestSettings extends SQLQueryTestSettings { "subquery/exists-subquery/exists-having.sql", "subquery/exists-subquery/exists-joins-and-set-ops.sql", // TODO: rebase-25.12, fix later + // the results are the same, but the order of the unsorted data is different. // "subquery/exists-subquery/exists-orderby-limit.sql", "subquery/exists-subquery/exists-within-and-or.sql", "subquery/in-subquery/in-basic.sql", "subquery/in-subquery/in-group-by.sql", "subquery/in-subquery/in-having.sql", // TODO: rebase-25.12, fix later + // the results are the same, but the order of the unsorted data is different. // "subquery/in-subquery/in-joins.sql", "subquery/in-subquery/in-limit.sql", "subquery/in-subquery/in-multiple-columns.sql", // TODO: rebase-25.12, fix later + // the results are the same, but the order of the unsorted data is different. // "subquery/in-subquery/in-order-by.sql", // CH- "subquery/in-subquery/in-set-operations.sql", // TODO: rebase-25.12, fix later, will core dump - // "subquery/in-subquery/in-with-cte.sql", + "subquery/in-subquery/in-with-cte.sql", "subquery/in-subquery/nested-not-in.sql", "subquery/in-subquery/not-in-group-by.sql", "subquery/in-subquery/not-in-joins.sql", From 0185debb490a787a0a8b3c99da60289e92cf157d Mon Sep 17 00:00:00 2001 From: Zhichao Zhang Date: Mon, 4 May 2026 15:53:33 +0800 Subject: [PATCH 2/2] remove comment --- .../gluten/utils/clickhouse/ClickHouseSQLQueryTestSettings.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseSQLQueryTestSettings.scala b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseSQLQueryTestSettings.scala index 7fe21935d8d..7a518f7c3b4 100644 --- a/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseSQLQueryTestSettings.scala +++ b/gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/clickhouse/ClickHouseSQLQueryTestSettings.scala @@ -137,7 +137,6 @@ object ClickHouseSQLQueryTestSettings extends SQLQueryTestSettings { // the results are the same, but the order of the unsorted data is different. // "subquery/in-subquery/in-order-by.sql", // CH- "subquery/in-subquery/in-set-operations.sql", - // TODO: rebase-25.12, fix later, will core dump "subquery/in-subquery/in-with-cte.sql", "subquery/in-subquery/nested-not-in.sql", "subquery/in-subquery/not-in-group-by.sql",