From cb0ad202442c698fb06611ffebfb113764c21948 Mon Sep 17 00:00:00 2001 From: Kyligence Git Date: Sat, 3 Aug 2024 08:49:04 -0500 Subject: [PATCH] [GLUTEN-1632][CH]Daily Update Clickhouse Version (20240803) (#6700) * [GLUTEN-1632][CH]Daily Update Clickhouse Version (20240803) * fix build due to https://github.com/ClickHouse/ClickHouse/pull/65751 * Fix build due to https://github.com/apache/incubator-gluten/pull/6558 --------- Co-authored-by: kyligence-git Co-authored-by: Chang Chen --- cpp-ch/clickhouse.version | 4 ++-- .../ObjectStorages/CompactObjectStorageDiskTransaction.cpp | 4 ++-- .../Disks/ObjectStorages/GlutenHDFSObjectStorage.cpp | 2 +- .../Disks/ObjectStorages/GlutenHDFSObjectStorage.h | 2 +- cpp-ch/local-engine/Storages/Mergetree/MetaDataHelper.cpp | 2 +- cpp-ch/local-engine/tests/benchmark_local_engine.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cpp-ch/clickhouse.version b/cpp-ch/clickhouse.version index dd638c97424a..d73e34fb425b 100644 --- a/cpp-ch/clickhouse.version +++ b/cpp-ch/clickhouse.version @@ -1,4 +1,4 @@ CH_ORG=Kyligence -CH_BRANCH=rebase_ch/20240801 -CH_COMMIT=768e193bd4d +CH_BRANCH=rebase_ch/20240803 +CH_COMMIT=b3cfc38f967 diff --git a/cpp-ch/local-engine/Disks/ObjectStorages/CompactObjectStorageDiskTransaction.cpp b/cpp-ch/local-engine/Disks/ObjectStorages/CompactObjectStorageDiskTransaction.cpp index 66c4470101a1..3a4d156876c6 100644 --- a/cpp-ch/local-engine/Disks/ObjectStorages/CompactObjectStorageDiskTransaction.cpp +++ b/cpp-ch/local-engine/Disks/ObjectStorages/CompactObjectStorageDiskTransaction.cpp @@ -60,8 +60,8 @@ void CompactObjectStorageDiskTransaction::commit() std::filesystem::path meta_path = std::filesystem::path(prefix_path) / "meta.bin"; auto object_storage = disk.getObjectStorage(); - auto data_key = object_storage->generateObjectKeyForPath(data_path); - auto meta_key = object_storage->generateObjectKeyForPath(meta_path); + auto data_key = object_storage->generateObjectKeyForPath(data_path, std::nullopt); + auto meta_key = object_storage->generateObjectKeyForPath(meta_path, std::nullopt); disk.createDirectories(prefix_path); auto data_write_buffer = object_storage->writeObject(DB::StoredObject(data_key.serialize(), data_path), DB::WriteMode::Rewrite); diff --git a/cpp-ch/local-engine/Disks/ObjectStorages/GlutenHDFSObjectStorage.cpp b/cpp-ch/local-engine/Disks/ObjectStorages/GlutenHDFSObjectStorage.cpp index cab87d66d884..38db8a2dfb1e 100644 --- a/cpp-ch/local-engine/Disks/ObjectStorages/GlutenHDFSObjectStorage.cpp +++ b/cpp-ch/local-engine/Disks/ObjectStorages/GlutenHDFSObjectStorage.cpp @@ -33,7 +33,7 @@ std::unique_ptr GlutenHDFSObjectStorage::readObject( /// return std::make_unique(hdfs_uri, hdfs_path, config, HDFSObjectStorage::patchSettings(read_settings)); } -DB::ObjectStorageKey local_engine::GlutenHDFSObjectStorage::generateObjectKeyForPath(const std::string & path) const +DB::ObjectStorageKey local_engine::GlutenHDFSObjectStorage::generateObjectKeyForPath(const std::string & path, const std::optional & key_prefix) const { initializeHDFSFS(); /// what ever data_source_description.description value is, consider that key as relative key diff --git a/cpp-ch/local-engine/Disks/ObjectStorages/GlutenHDFSObjectStorage.h b/cpp-ch/local-engine/Disks/ObjectStorages/GlutenHDFSObjectStorage.h index da37e1d782db..82f3003eb3d7 100644 --- a/cpp-ch/local-engine/Disks/ObjectStorages/GlutenHDFSObjectStorage.h +++ b/cpp-ch/local-engine/Disks/ObjectStorages/GlutenHDFSObjectStorage.h @@ -41,7 +41,7 @@ class GlutenHDFSObjectStorage final : public DB::HDFSObjectStorage const DB::ReadSettings & read_settings = DB::ReadSettings{}, std::optional read_hint = {}, std::optional file_size = {}) const override; - DB::ObjectStorageKey generateObjectKeyForPath(const std::string & path) const override; + DB::ObjectStorageKey generateObjectKeyForPath(const std::string & path, const std::optional & key_prefix) const override; hdfsFS getHDFSFS() const { return hdfs_fs.get(); } }; #endif diff --git a/cpp-ch/local-engine/Storages/Mergetree/MetaDataHelper.cpp b/cpp-ch/local-engine/Storages/Mergetree/MetaDataHelper.cpp index ebc01544fd1f..bcb1302591a2 100644 --- a/cpp-ch/local-engine/Storages/Mergetree/MetaDataHelper.cpp +++ b/cpp-ch/local-engine/Storages/Mergetree/MetaDataHelper.cpp @@ -105,7 +105,7 @@ void restoreMetaData(CustomStorageMergeTreePtr & storage, const MergeTreeTable & return; else metadata_disk->createDirectories(part_path); - auto key = s3->generateObjectKeyForPath(metadata_file_path.generic_string()); + auto key = s3->generateObjectKeyForPath(metadata_file_path.generic_string(), std::nullopt); StoredObject metadata_object(key.serialize()); auto part_metadata = extractPartMetaData(*s3->readObject(metadata_object)); for (const auto & item : part_metadata) diff --git a/cpp-ch/local-engine/tests/benchmark_local_engine.cpp b/cpp-ch/local-engine/tests/benchmark_local_engine.cpp index 3402d5026284..fba8ef732701 100644 --- a/cpp-ch/local-engine/tests/benchmark_local_engine.cpp +++ b/cpp-ch/local-engine/tests/benchmark_local_engine.cpp @@ -35,7 +35,7 @@ #include #include #include -#include + #include #include #include