From 91160dd66c57693c3df815db2c6cf245049893bb Mon Sep 17 00:00:00 2001 From: Wenzheng Liu Date: Sat, 3 Jun 2023 11:44:22 +0800 Subject: [PATCH] [GLUTEN-1632][CH]Daily Update Clickhouse Version (20230603) (#1837) * [GLUTEN-1632][CH]Daily Update Clickhouse Version (20230603) * Fix Build since https://github.com/ClickHouse/ClickHouse/pull/50400 * Fix Build since https://github.com/ClickHouse/ClickHouse/pull/49539 * Workaround protoc's issue(https://github.com/protocolbuffers/protobuf/issues/9378). --------- Co-authored-by: kyligence-git Co-authored-by: Chang Chen --- cpp-ch/clickhouse.version | 4 ++-- cpp-ch/local-engine/CMakeLists.txt | 7 ++++--- .../Storages/SubstraitSource/ParquetFormatFile.cpp | 2 +- cpp-ch/local-engine/proto/CMakeLists.txt | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cpp-ch/clickhouse.version b/cpp-ch/clickhouse.version index d0c4842cb6ad..066e9626bd7d 100644 --- a/cpp-ch/clickhouse.version +++ b/cpp-ch/clickhouse.version @@ -1,3 +1,3 @@ CH_ORG=Kyligence -CH_BRANCH=rebase_ch/20230530 -CH_COMMIT=ff9a20e31e2 \ No newline at end of file +CH_BRANCH=rebase_ch/20230603 +CH_COMMIT=3d583de4d6e \ No newline at end of file diff --git a/cpp-ch/local-engine/CMakeLists.txt b/cpp-ch/local-engine/CMakeLists.txt index b55e2c4ecb4c..a26b87bb79fa 100644 --- a/cpp-ch/local-engine/CMakeLists.txt +++ b/cpp-ch/local-engine/CMakeLists.txt @@ -82,17 +82,18 @@ add_library(${LOCALENGINE_SHARED_LIB} SHARED target_compile_options(${LOCALENGINE_SHARED_LIB} PUBLIC -fPIC -Wno-shorten-64-to-32) -target_link_libraries(${LOCALENGINE_SHARED_LIB} PUBLIC - +target_link_libraries(${LOCALENGINE_SHARED_LIB} +PUBLIC clickhouse_new_delete clickhouse_common_config clickhouse_common_io clickhouse_parsers clickhouse_storages_system - substrait loggers gluten_clickhouse_backend_libs ch_contrib::protobuf +PRIVATE + substrait ) if (ENABLE_LOCAL_FORMATS) diff --git a/cpp-ch/local-engine/Storages/SubstraitSource/ParquetFormatFile.cpp b/cpp-ch/local-engine/Storages/SubstraitSource/ParquetFormatFile.cpp index e89105abb8a0..2104a3e58ca9 100644 --- a/cpp-ch/local-engine/Storages/SubstraitSource/ParquetFormatFile.cpp +++ b/cpp-ch/local-engine/Storages/SubstraitSource/ParquetFormatFile.cpp @@ -82,7 +82,7 @@ FormatFile::InputFormatPtr ParquetFormatFile::createInputFormat(const DB::Block std::back_inserter(skip_row_group_indices)); format_settings.parquet.skip_row_groups = std::unordered_set(skip_row_group_indices.begin(), skip_row_group_indices.end()); - auto input_format = std::make_shared(res->read_buffer.get(), nullptr, header, format_settings, 1, 8192); + auto input_format = std::make_shared(*(res->read_buffer), header, format_settings, 1, 8192); // clang-format off #endif // clang-format on diff --git a/cpp-ch/local-engine/proto/CMakeLists.txt b/cpp-ch/local-engine/proto/CMakeLists.txt index 12586d6c7df9..9a52737e7a7b 100644 --- a/cpp-ch/local-engine/proto/CMakeLists.txt +++ b/cpp-ch/local-engine/proto/CMakeLists.txt @@ -12,7 +12,7 @@ ENDFOREACH() add_custom_target( generate_substrait - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/../../../contrib/protobuf-cmake/protoc -I${CMAKE_CURRENT_SOURCE_DIR} -I${ClickHouse_SOURCE_DIR}/contrib/protobuf/src --cpp_out=${CMAKE_CURRENT_BINARY_DIR}/ ${protobuf_files} + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/../../../contrib/google-protobuf-cmake/protoc -I${CMAKE_CURRENT_SOURCE_DIR} -I${ClickHouse_SOURCE_DIR}/contrib/google-protobuf/src --cpp_out=${CMAKE_CURRENT_BINARY_DIR}/ ${protobuf_files} DEPENDS protoc COMMENT "Running cpp protocol buffer compiler" VERBATIM ) @@ -21,7 +21,7 @@ set_source_files_properties(${SUBSTRAIT_SRCS} PROPERTIES GENERATED TRUE) add_library(substrait ${SUBSTRAIT_SRCS}) add_dependencies(substrait generate_substrait) -target_compile_options(substrait PUBLIC -fPIC -Wno-reserved-identifier -Wno-deprecated) +target_compile_options(substrait PUBLIC -fPIC -Wno-reserved-identifier -Wno-deprecated -Wno-shadow-field) target_include_directories(substrait SYSTEM BEFORE PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(substrait ch_contrib::protobuf)