This is an automated email from the ASF dual-hosted git repository.

changchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new ab1f25345 [GLUTEN-1632][CH]Daily Update Clickhouse Version (20240511) 
(#5694)
ab1f25345 is described below

commit ab1f253456df60f3d0bcbb9c966324770c1f62b1
Author: Kyligence Git <[email protected]>
AuthorDate: Sat May 11 01:53:11 2024 -0500

    [GLUTEN-1632][CH]Daily Update Clickhouse Version (20240511) (#5694)
    
    * [GLUTEN-1632][CH]Daily Update Clickhouse Version (20240511)
    
    * Fix Build due to https://github.com/ClickHouse/ClickHouse/pull/62087
    
    ---------
    
    Co-authored-by: kyligence-git <[email protected]>
    Co-authored-by: Chang Chen <[email protected]>
---
 cpp-ch/clickhouse.version                                 |  4 ++--
 .../local-engine/Functions/SparkFunctionArrayDistinct.cpp |  2 +-
 cpp-ch/local-engine/Parser/CHColumnToSparkRow.cpp         | 15 +++++++--------
 cpp-ch/local-engine/Shuffle/SortedPartitionDataMerger.cpp |  8 ++++----
 .../Storages/IO/AggregateSerializationUtils.cpp           |  6 +++---
 cpp-ch/local-engine/local_engine_jni.cpp                  |  4 ++--
 6 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/cpp-ch/clickhouse.version b/cpp-ch/clickhouse.version
index a692c5666..aba4b7c56 100644
--- a/cpp-ch/clickhouse.version
+++ b/cpp-ch/clickhouse.version
@@ -1,3 +1,3 @@
 CH_ORG=Kyligence
-CH_BRANCH=rebase_ch/20240509
-CH_COMMIT=81ee5ff107b
\ No newline at end of file
+CH_BRANCH=rebase_ch/20240511
+CH_COMMIT=725c7a6c78e
\ No newline at end of file
diff --git a/cpp-ch/local-engine/Functions/SparkFunctionArrayDistinct.cpp 
b/cpp-ch/local-engine/Functions/SparkFunctionArrayDistinct.cpp
index 9ed87f86b..89598ff7a 100644
--- a/cpp-ch/local-engine/Functions/SparkFunctionArrayDistinct.cpp
+++ b/cpp-ch/local-engine/Functions/SparkFunctionArrayDistinct.cpp
@@ -120,7 +120,7 @@ ColumnPtr FunctionArrayDistinctSpark::executeImpl(const 
ColumnsWithTypeAndName &
     IColumn & res_data = res.getData();
     ColumnArray::Offsets & res_offsets = res.getOffsets();
 
-    const ColumnNullable * nullable_col = 
checkAndGetColumn<ColumnNullable>(src_data);
+    const ColumnNullable * nullable_col = 
checkAndGetColumn<ColumnNullable>(&src_data);
 
     const IColumn * inner_col;
 
diff --git a/cpp-ch/local-engine/Parser/CHColumnToSparkRow.cpp 
b/cpp-ch/local-engine/Parser/CHColumnToSparkRow.cpp
index cb5f0111c..6f8df0ecb 100644
--- a/cpp-ch/local-engine/Parser/CHColumnToSparkRow.cpp
+++ b/cpp-ch/local-engine/Parser/CHColumnToSparkRow.cpp
@@ -121,9 +121,9 @@ static void writeFixedLengthNullableValue(
     const std::vector<int64_t> & offsets,
     const MaskVector & masks = nullptr)
 {
-    const auto * nullable_column = 
checkAndGetColumn<ColumnNullable>(*col.column);
-    const auto & null_map = nullable_column->getNullMapData();
-    const auto & nested_column = nullable_column->getNestedColumn();
+    const auto & nullable_column = 
checkAndGetColumn<ColumnNullable>(*col.column);
+    const auto & null_map = nullable_column.getNullMapData();
+    const auto & nested_column = nullable_column.getNestedColumn();
     FixedLengthDataWriter writer(col.type);
 
     if (writer.getWhichDataType().isDecimal32())
@@ -215,9 +215,9 @@ static void writeVariableLengthNullableValue(
     std::vector<int64_t> & buffer_cursor,
     const MaskVector & masks = nullptr)
 {
-    const auto * nullable_column = 
checkAndGetColumn<ColumnNullable>(*col.column);
-    const auto & null_map = nullable_column->getNullMapData();
-    const auto & nested_column = nullable_column->getNestedColumn();
+    const auto & nullable_column = 
checkAndGetColumn<ColumnNullable>(*col.column);
+    const auto & null_map = nullable_column.getNullMapData();
+    const auto & nested_column = nullable_column.getNestedColumn();
     const auto type_without_nullable{removeNullable(col.type)};
     const bool use_raw_data = 
BackingDataLengthCalculator::isDataTypeSupportRawData(type_without_nullable);
     const bool big_endian = 
BackingDataLengthCalculator::isBigEndianInSparkRow(type_without_nullable);
@@ -331,8 +331,7 @@ SparkRowInfo::SparkRowInfo(
             if 
(BackingDataLengthCalculator::isDataTypeSupportRawData(type_without_nullable))
             {
                 auto column = col.column->convertToFullIfNeeded();
-                const auto * nullable_column = 
checkAndGetColumn<ColumnNullable>(*column);
-                if (nullable_column)
+                if (const auto * nullable_column = 
checkAndGetColumn<ColumnNullable>(&*column))
                 {
                     const auto & nested_column = 
nullable_column->getNestedColumn();
                     const auto & null_map = nullable_column->getNullMapData();
diff --git a/cpp-ch/local-engine/Shuffle/SortedPartitionDataMerger.cpp 
b/cpp-ch/local-engine/Shuffle/SortedPartitionDataMerger.cpp
index 44115cb06..9c4ae6bf4 100644
--- a/cpp-ch/local-engine/Shuffle/SortedPartitionDataMerger.cpp
+++ b/cpp-ch/local-engine/Shuffle/SortedPartitionDataMerger.cpp
@@ -53,16 +53,16 @@ SortedPartitionDataMerger::SortedPartitionDataMerger(
 
 int64_t searchLastPartitionIdIndex(ColumnPtr column, size_t start, size_t 
partition_id)
 {
-    const auto * int64_column = checkAndGetColumn<ColumnUInt64>(*column);
-    int64_t low = start, high = int64_column->size() - 1;
+    const auto & int64_column = checkAndGetColumn<ColumnUInt64>(*column);
+    int64_t low = start, high = int64_column.size() - 1;
     while (low <= high)
     {
         int64_t mid = low + (high - low) / 2;
-        if (int64_column->get64(mid) > partition_id)
+        if (int64_column.get64(mid) > partition_id)
             high = mid - 1;
         else
             low = mid + 1;
-        if (int64_column->get64(high) == partition_id)
+        if (int64_column.get64(high) == partition_id)
             return high;
     }
     return -1;
diff --git a/cpp-ch/local-engine/Storages/IO/AggregateSerializationUtils.cpp 
b/cpp-ch/local-engine/Storages/IO/AggregateSerializationUtils.cpp
index d5e336833..4a416abe2 100644
--- a/cpp-ch/local-engine/Storages/IO/AggregateSerializationUtils.cpp
+++ b/cpp-ch/local-engine/Storages/IO/AggregateSerializationUtils.cpp
@@ -51,7 +51,7 @@ bool isFixedSizeAggregateFunction(const 
DB::AggregateFunctionPtr& function)
 
 DB::ColumnWithTypeAndName convertAggregateStateToFixedString(const 
DB::ColumnWithTypeAndName& col)
 {
-    const auto *aggregate_col = 
checkAndGetColumn<ColumnAggregateFunction>(*col.column);
+    const auto *aggregate_col = 
checkAndGetColumn<ColumnAggregateFunction>(&*col.column);
     if (!aggregate_col)
     {
         return col;
@@ -75,7 +75,7 @@ DB::ColumnWithTypeAndName 
convertAggregateStateToFixedString(const DB::ColumnWit
 
 DB::ColumnWithTypeAndName convertAggregateStateToString(const 
DB::ColumnWithTypeAndName& col)
 {
-    const auto *aggregate_col = 
checkAndGetColumn<ColumnAggregateFunction>(*col.column);
+    const auto *aggregate_col = 
checkAndGetColumn<ColumnAggregateFunction>(&*col.column);
     if (!aggregate_col)
     {
         return col;
@@ -130,7 +130,7 @@ DB::Block convertAggregateStateInBlock(DB::Block& block)
     {
         if (WhichDataType(item.type).isAggregateFunction())
         {
-            const auto *aggregate_col = 
checkAndGetColumn<ColumnAggregateFunction>(*item.column);
+            const auto *aggregate_col = 
checkAndGetColumn<ColumnAggregateFunction>(&*item.column);
             if 
(isFixedSizeAggregateFunction(aggregate_col->getAggregateFunction()))
                 columns.emplace_back(convertAggregateStateToFixedString(item));
             else
diff --git a/cpp-ch/local-engine/local_engine_jni.cpp 
b/cpp-ch/local-engine/local_engine_jni.cpp
index 7baad210e..63341cc53 100644
--- a/cpp-ch/local-engine/local_engine_jni.cpp
+++ b/cpp-ch/local-engine/local_engine_jni.cpp
@@ -398,7 +398,7 @@ 
Java_org_apache_gluten_vectorized_CHColumnVector_nativeHasNull(JNIEnv * env, job
     }
     else
     {
-        const auto * nullable = 
checkAndGetColumn<DB::ColumnNullable>(*col.column);
+        const auto * nullable = 
checkAndGetColumn<DB::ColumnNullable>(&*col.column);
         size_t num_nulls = std::accumulate(nullable->getNullMapData().begin(), 
nullable->getNullMapData().end(), 0);
         return num_nulls < block->rows();
     }
@@ -416,7 +416,7 @@ 
Java_org_apache_gluten_vectorized_CHColumnVector_nativeNumNulls(JNIEnv * env, jo
     }
     else
     {
-        const auto * nullable = 
checkAndGetColumn<DB::ColumnNullable>(*col.column);
+        const auto * nullable = 
checkAndGetColumn<DB::ColumnNullable>(&*col.column);
         return std::accumulate(nullable->getNullMapData().begin(), 
nullable->getNullMapData().end(), 0);
     }
     LOCAL_ENGINE_JNI_METHOD_END(env, -1)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to