Skip to content

Commit

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

1 fix build due to ClickHouse/ClickHouse#61502
2 fix build due to ClickHouse/ClickHouse#61114
3 fix build due to ClickHouse/ClickHouse#61267

---------

Co-authored-by: kyligence-git <[email protected]>
Co-authored-by: Chang Chen <[email protected]>
  • Loading branch information
3 people authored Mar 19, 2024
1 parent 94e1638 commit bc08fdf
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 25 deletions.
4 changes: 2 additions & 2 deletions cpp-ch/clickhouse.version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CH_ORG=Kyligence
CH_BRANCH=rebase_ch/20240315
CH_COMMIT=1240fda3f62
CH_BRANCH=rebase_ch/20240319
CH_COMMIT=06814835aa8
1 change: 0 additions & 1 deletion cpp-ch/local-engine/Common/CHUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <DataTypes/NestedUtils.h>
#include <Disks/registerDisks.h>
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionsConversion.h>
#include <Functions/registerFunctions.h>
#include <IO/ReadBufferFromFile.h>
#include <IO/SharedThreadPools.h>
Expand Down
3 changes: 2 additions & 1 deletion cpp-ch/local-engine/Functions/SparkFunctionGetJsonObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ class FlattenJSONStringOnRequiredFunction : public DB::IFunction
const char * query_end = required_fields.back().c_str() + required_fields.back().size();
DB::Tokens tokens(query_begin, query_end);
UInt32 max_parser_depth = static_cast<UInt32>(context->getSettingsRef().max_parser_depth);
DB::IParser::Pos token_iterator(tokens, max_parser_depth);
UInt32 max_parser_backtracks = static_cast<UInt32>(context->getSettingsRef().max_parser_backtracks);
DB::IParser::Pos token_iterator(tokens, max_parser_depth, max_parser_backtracks);
DB::ASTPtr json_path_ast;
DB::ParserJSONPath path_parser;
DB::Expected expected;
Expand Down
1 change: 0 additions & 1 deletion cpp-ch/local-engine/Parser/SerializedPlanParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <DataTypes/Serializations/ISerialization.h>
#include <DataTypes/getLeastSupertype.h>
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionsConversion.h>
#include <Interpreters/ActionsDAG.h>
#include <Interpreters/ActionsVisitor.h>
#include <Interpreters/CollectJoinOnKeysVisitor.h>
Expand Down
32 changes: 13 additions & 19 deletions cpp-ch/local-engine/Storages/Mergetree/SparkMergeTreeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,26 @@ void SparkMergeTreeWriter::write(DB::Block & block)
ExpressionActions do_convert = ExpressionActions(converter);
do_convert.execute(new_block);
}
auto res = squashing_transform->add(new_block);
if (res)

auto blocks_with_partition = MergeTreeDataWriter::splitBlockIntoParts(squashing_transform->add(new_block), 10, metadata_snapshot, context);
for (auto & item : blocks_with_partition)
{
auto blocks_with_partition = MergeTreeDataWriter::splitBlockIntoParts(res, 10, metadata_snapshot, context);
for (auto & item : blocks_with_partition)
{
auto temp_part = writeTempPart(item, metadata_snapshot, context);
temp_part.finalize();
new_parts.emplace_back(temp_part.part);
part_num++;
}
auto temp_part = writeTempPart(item, metadata_snapshot, context);
temp_part.finalize();
new_parts.emplace_back(temp_part.part);
part_num++;
}
}

void SparkMergeTreeWriter::finalize()
{
auto block = squashing_transform->add({});
if (block.rows())

auto blocks_with_partition = MergeTreeDataWriter::splitBlockIntoParts(squashing_transform->add({}), 10, metadata_snapshot, context);
for (auto & item : blocks_with_partition)
{
auto blocks_with_partition = MergeTreeDataWriter::splitBlockIntoParts(block, 10, metadata_snapshot, context);
for (auto & item : blocks_with_partition)
{
auto temp_part = writeTempPart(item, metadata_snapshot, context);
temp_part.finalize();
new_parts.emplace_back(temp_part.part);
}
auto temp_part = writeTempPart(item, metadata_snapshot, context);
temp_part.finalize();
new_parts.emplace_back(temp_part.part);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <DataTypes/IDataType.h>
#include <DataTypes/DataTypeFactory.h>
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionsConversion.h>
#include <Functions/SparkFunctionCastFloatToInt.h>
#include <Parser/SerializedPlanParser.h>
#include <benchmark/benchmark.h>
Expand Down

0 comments on commit bc08fdf

Please sign in to comment.