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..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 @@ -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,22 @@ 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",