Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
al13n321 committed Mar 27, 2024
1 parent 1b828ab commit d5da446
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Disks/ObjectStorages/HDFS/HDFSObjectStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ std::unique_ptr<ReadBufferFromFileBase> HDFSObjectStorage::readObjects( /// NOLI
[this, disk_read_settings]
(bool /* restricted_seek */, const StoredObject & object_) -> std::unique_ptr<ReadBufferFromFileBase>
{
auto path = object_.remote_path;
const auto & path = object_.remote_path;
size_t begin_of_path = path.find('/', path.find("//") + 2);
auto hdfs_path = path.substr(begin_of_path);
auto hdfs_uri = path.substr(0, begin_of_path);
Expand Down
3 changes: 1 addition & 2 deletions src/Disks/ObjectStorages/Local/LocalObjectStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ std::unique_ptr<ReadBufferFromFileBase> LocalObjectStorage::readObjects( /// NOL
[=] (bool /* restricted_seek */, const StoredObject & object)
-> std::unique_ptr<ReadBufferFromFileBase>
{
auto & file_path = object.remote_path;
return createReadBufferFromFileBase(file_path, modified_settings, read_hint, file_size);
return createReadBufferFromFileBase(object.remote_path, modified_settings, read_hint, file_size);
};

switch (read_settings.remote_fs_method)
Expand Down
3 changes: 1 addition & 2 deletions src/Disks/ObjectStorages/S3/S3ObjectStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,10 @@ std::unique_ptr<ReadBufferFromFileBase> S3ObjectStorage::readObjects( /// NOLINT
[this, settings_ptr, disk_read_settings]
(bool restricted_seek, const StoredObject & object_) -> std::unique_ptr<ReadBufferFromFileBase>
{
auto & path = object_.remote_path;
return std::make_unique<ReadBufferFromS3>(
client.get(),
uri.bucket,
path,
object_.remote_path,
uri.version_id,
settings_ptr->request_settings,
disk_read_settings,
Expand Down
3 changes: 1 addition & 2 deletions src/Disks/ObjectStorages/Web/WebObjectStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,8 @@ std::unique_ptr<ReadBufferFromFileBase> WebObjectStorage::readObject( /// NOLINT
[this, read_settings, object_size]
(bool /* restricted_seek */, const StoredObject & object_) -> std::unique_ptr<ReadBufferFromFileBase>
{
auto & path_ = object_.remote_path;
return std::make_unique<ReadBufferFromWebServer>(
fs::path(url) / path_,
fs::path(url) / object_.remote_path,
getContext(),
object_size,
read_settings,
Expand Down
3 changes: 1 addition & 2 deletions src/Storages/StorageS3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -727,11 +727,10 @@ std::unique_ptr<ReadBuffer> StorageS3Source::createAsyncS3ReadBuffer(
[this, read_settings, object_size]
(bool restricted_seek, const StoredObject & object) -> std::unique_ptr<ReadBufferFromFileBase>
{
auto & path = object.remote_path;
return std::make_unique<ReadBufferFromS3>(
client,
bucket,
path,
object.remote_path,
version_id,
request_settings,
read_settings,
Expand Down

0 comments on commit d5da446

Please sign in to comment.