Skip to content

Commit

Permalink
[GLUTEN-1632][CH]Daily Update Clickhouse Version (20240806) (#6718)
Browse files Browse the repository at this point in the history
* [GLUTEN-1632][CH]Daily Update Clickhouse Version (20240806)

* Fix build due to #6621
* Fix debug build due to #6710
* Fix build due to ClickHouse/ClickHouse#67405

---------

Co-authored-by: kyligence-git <[email protected]>
Co-authored-by: Chang Chen <[email protected]>
  • Loading branch information
3 people authored Aug 6, 2024
1 parent f7b4027 commit 75c79f1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 16 deletions.
4 changes: 2 additions & 2 deletions cpp-ch/clickhouse.version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CH_ORG=Kyligence
CH_BRANCH=rebase_ch/20240803
CH_COMMIT=b3cfc38f967
CH_BRANCH=rebase_ch/20240806
CH_COMMIT=c8a7d6e496d

16 changes: 8 additions & 8 deletions cpp-ch/local-engine/Functions/SparkFunctionPositionUTF8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -163,17 +164,17 @@ 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);

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;
Expand Down Expand Up @@ -227,17 +228,16 @@ 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);

/// 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;

Expand Down
2 changes: 1 addition & 1 deletion cpp-ch/local-engine/Storages/Output/OutputFormatFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)};
}

Expand Down
2 changes: 0 additions & 2 deletions cpp-ch/local-engine/tests/benchmark_local_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion cpp-ch/local-engine/tests/gtest_ch_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 0 additions & 1 deletion cpp-ch/local-engine/tests/gtest_ch_storages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 0 additions & 1 deletion cpp-ch/local-engine/tests/gtest_local_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 75c79f1

Please sign in to comment.