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 75c79f108 [GLUTEN-1632][CH]Daily Update Clickhouse Version (20240806) 
(#6718)
75c79f108 is described below

commit 75c79f108a06af8bc31ddbad8e219fefc7995f7c
Author: Kyligence Git <[email protected]>
AuthorDate: Mon Aug 5 23:47:25 2024 -0500

    [GLUTEN-1632][CH]Daily Update Clickhouse Version (20240806) (#6718)
    
    * [GLUTEN-1632][CH]Daily Update Clickhouse Version (20240806)
    
    * Fix build due to https://github.com/apache/incubator-gluten/pull/6621
    * Fix debug build due to 
https://github.com/apache/incubator-gluten/pull/6710
    * Fix build due to https://github.com/ClickHouse/ClickHouse/pull/67405
    
    ---------
    
    Co-authored-by: kyligence-git <[email protected]>
    Co-authored-by: Chang Chen <[email protected]>
---
 cpp-ch/clickhouse.version                                |  4 ++--
 .../local-engine/Functions/SparkFunctionPositionUTF8.cpp | 16 ++++++++--------
 cpp-ch/local-engine/Storages/Output/OutputFormatFile.cpp |  2 +-
 cpp-ch/local-engine/tests/benchmark_local_engine.cpp     |  2 --
 cpp-ch/local-engine/tests/gtest_ch_join.cpp              |  2 +-
 cpp-ch/local-engine/tests/gtest_ch_storages.cpp          |  1 -
 cpp-ch/local-engine/tests/gtest_local_engine.cpp         |  1 -
 7 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/cpp-ch/clickhouse.version b/cpp-ch/clickhouse.version
index d73e34fb4..46b23e5f0 100644
--- a/cpp-ch/clickhouse.version
+++ b/cpp-ch/clickhouse.version
@@ -1,4 +1,4 @@
 CH_ORG=Kyligence
-CH_BRANCH=rebase_ch/20240803
-CH_COMMIT=b3cfc38f967
+CH_BRANCH=rebase_ch/20240806
+CH_COMMIT=c8a7d6e496d
 
diff --git a/cpp-ch/local-engine/Functions/SparkFunctionPositionUTF8.cpp 
b/cpp-ch/local-engine/Functions/SparkFunctionPositionUTF8.cpp
index 4a17c4371..856dd6bd0 100644
--- a/cpp-ch/local-engine/Functions/SparkFunctionPositionUTF8.cpp
+++ b/cpp-ch/local-engine/Functions/SparkFunctionPositionUTF8.cpp
@@ -51,7 +51,8 @@ struct PositionSparkImpl
         const std::string & needle,
         const ColumnPtr & start_pos,
         PaddedPODArray<UInt64> & res,
-        [[maybe_unused]] ColumnUInt8 * res_null)
+        [[maybe_unused]] ColumnUInt8 * res_null,
+        [[maybe_unused]] size_t input_rows_count)
     {
         /// `res_null` serves as an output parameter for implementing an 
XYZOrNull variant.
         assert(!res_null);
@@ -163,7 +164,8 @@ struct PositionSparkImpl
         const ColumnString::Offsets & needle_offsets,
         const ColumnPtr & start_pos,
         PaddedPODArray<UInt64> & res,
-        [[maybe_unused]] ColumnUInt8 * res_null)
+        [[maybe_unused]] ColumnUInt8 * res_null,
+        size_t input_rows_count)
     {
         /// `res_null` serves as an output parameter for implementing an 
XYZOrNull variant.
         assert(!res_null);
@@ -171,9 +173,8 @@ struct PositionSparkImpl
         ColumnString::Offset prev_haystack_offset = 0;
         ColumnString::Offset prev_needle_offset = 0;
 
-        size_t size = haystack_offsets.size();
 
-        for (size_t i = 0; i < size; ++i)
+        for (size_t i = 0; i < input_rows_count; ++i)
         {
             size_t needle_size = needle_offsets[i] - prev_needle_offset - 1;
             size_t haystack_size = haystack_offsets[i] - prev_haystack_offset 
- 1;
@@ -227,7 +228,8 @@ struct PositionSparkImpl
         const ColumnString::Offsets & needle_offsets,
         const ColumnPtr & start_pos,
         PaddedPODArray<UInt64> & res,
-        [[maybe_unused]] ColumnUInt8 * res_null)
+        [[maybe_unused]] ColumnUInt8 * res_null,
+        size_t input_rows_count)
     {
         /// `res_null` serves as an output parameter for implementing an 
XYZOrNull variant.
         assert(!res_null);
@@ -235,9 +237,7 @@ struct PositionSparkImpl
         /// NOTE You could use haystack indexing. But this is a rare case.
         ColumnString::Offset prev_needle_offset = 0;
 
-        size_t size = needle_offsets.size();
-
-        for (size_t i = 0; i < size; ++i)
+        for (size_t i = 0; i < input_rows_count; ++i)
         {
             size_t needle_size = needle_offsets[i] - prev_needle_offset - 1;
 
diff --git a/cpp-ch/local-engine/Storages/Output/OutputFormatFile.cpp 
b/cpp-ch/local-engine/Storages/Output/OutputFormatFile.cpp
index ccb97326e..194d997dd 100644
--- a/cpp-ch/local-engine/Storages/Output/OutputFormatFile.cpp
+++ b/cpp-ch/local-engine/Storages/Output/OutputFormatFile.cpp
@@ -61,7 +61,7 @@ Block OutputFormatFile::createHeaderWithPreferredSchema(const 
Block & header)
         ColumnWithTypeAndName column(preferred_column.type->createColumn(), 
preferred_column.type, preferred_column.name);
         columns.emplace_back(std::move(column));
     }
-    assert(prefered_schema.columns() == index);
+    assert(preferred_schema.columns() == index);
     return {std::move(columns)};
 }
 
diff --git a/cpp-ch/local-engine/tests/benchmark_local_engine.cpp 
b/cpp-ch/local-engine/tests/benchmark_local_engine.cpp
index fba8ef732..839f3ea52 100644
--- a/cpp-ch/local-engine/tests/benchmark_local_engine.cpp
+++ b/cpp-ch/local-engine/tests/benchmark_local_engine.cpp
@@ -35,8 +35,6 @@
 #include <Processors/QueryPlan/Optimizations/QueryPlanOptimizationSettings.h>
 #include <QueryPipeline/QueryPipelineBuilder.h>
 #include <Shuffle/ShuffleReader.h>
-
-#include <Storages/CustomMergeTreeSink.h>
 #include <Storages/CustomStorageMergeTree.h>
 #include <Storages/MergeTree/MergeTreeData.h>
 #include <Storages/SelectQueryInfo.h>
diff --git a/cpp-ch/local-engine/tests/gtest_ch_join.cpp 
b/cpp-ch/local-engine/tests/gtest_ch_join.cpp
index 4885881f9..e130d82b9 100644
--- a/cpp-ch/local-engine/tests/gtest_ch_join.cpp
+++ b/cpp-ch/local-engine/tests/gtest_ch_join.cpp
@@ -25,7 +25,7 @@
 #include <Processors/QueryPlan/ReadFromPreparedSource.h>
 #include <Processors/Sources/SourceFromSingleChunk.h>
 #include <QueryPipeline/QueryPipelineBuilder.h>
-#include <Storages/CustomMergeTreeSink.h>
+
 #include <Storages/SubstraitSource/SubstraitFileSource.h>
 #include <gtest/gtest.h>
 #include <Common/DebugUtils.h>
diff --git a/cpp-ch/local-engine/tests/gtest_ch_storages.cpp 
b/cpp-ch/local-engine/tests/gtest_ch_storages.cpp
index 36c0b32ae..7de21a26d 100644
--- a/cpp-ch/local-engine/tests/gtest_ch_storages.cpp
+++ b/cpp-ch/local-engine/tests/gtest_ch_storages.cpp
@@ -20,7 +20,6 @@
 #include <Parsers/ASTFunction.h>
 #include <Processors/Executors/PipelineExecutor.h>
 #include <QueryPipeline/QueryPipelineBuilder.h>
-#include <Storages/CustomMergeTreeSink.h>
 #include <Storages/SubstraitSource/SubstraitFileSource.h>
 #include <google/protobuf/util/json_util.h>
 #include <google/protobuf/wrappers.pb.h>
diff --git a/cpp-ch/local-engine/tests/gtest_local_engine.cpp 
b/cpp-ch/local-engine/tests/gtest_local_engine.cpp
index 50e527afc..86cea39e5 100644
--- a/cpp-ch/local-engine/tests/gtest_local_engine.cpp
+++ b/cpp-ch/local-engine/tests/gtest_local_engine.cpp
@@ -29,7 +29,6 @@
 #include <Parser/SubstraitParserUtils.h>
 #include <Processors/Executors/PipelineExecutor.h>
 #include <Processors/QueryPlan/Optimizations/QueryPlanOptimizationSettings.h>
-#include <Storages/CustomMergeTreeSink.h>
 #include <Storages/CustomStorageMergeTree.h>
 #include <Storages/MergeTree/MergeTreeData.h>
 #include <gtest/gtest.h>


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

Reply via email to