Skip to content

Commit 700b039

Browse files
committed
Fix tidy build
1 parent c66c37d commit 700b039

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

src/Storages/ObjectStorage/DataLakes/DataLakeConfiguration.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,15 @@ class StorageIcebergConfiguration : public StorageObjectStorage::Configuration,
370370

371371
protected:
372372
void fromNamedCollection(const NamedCollection & collection, ContextPtr context) override
373-
{ return getImpl().fromNamedCollection(collection, context); }
373+
{ getImpl().fromNamedCollection(collection, context); }
374374
void fromAST(ASTs & args, ContextPtr context, bool with_structure) override
375-
{ return getImpl().fromAST(args, context, with_structure); }
375+
{ getImpl().fromAST(args, context, with_structure); }
376376

377377
/// Find storage_type argument and remove it from args if exists.
378378
/// Return storage type.
379379
ObjectStorageType extractDynamicStorageType(ASTs & args, ContextPtr context, ASTPtr * type_arg) const override
380380
{
381-
static const auto storage_type_name = "storage_type";
381+
static const auto * const storage_type_name = "storage_type";
382382

383383
if (auto named_collection = tryGetNamedCollectionWithOverrides(args, context))
384384
{
@@ -388,20 +388,20 @@ class StorageIcebergConfiguration : public StorageObjectStorage::Configuration,
388388
}
389389
}
390390

391-
auto type_it = args.end();
391+
auto * type_it = args.end();
392392

393393
/// S3 by default for backward compatibility
394394
/// Iceberg without storage_type == IcebergS3
395395
ObjectStorageType type = ObjectStorageType::S3;
396396

397-
for (auto arg_it = args.begin(); arg_it != args.end(); ++arg_it)
397+
for (auto * arg_it = args.begin(); arg_it != args.end(); ++arg_it)
398398
{
399399
const auto * type_ast_function = (*arg_it)->as<ASTFunction>();
400400

401401
if (type_ast_function && type_ast_function->name == "equals"
402402
&& type_ast_function->arguments && type_ast_function->arguments->children.size() == 2)
403403
{
404-
auto name = type_ast_function->arguments->children[0]->as<ASTIdentifier>();
404+
auto * name = type_ast_function->arguments->children[0]->as<ASTIdentifier>();
405405

406406
if (name && name->name() == storage_type_name)
407407
{
@@ -412,7 +412,7 @@ class StorageIcebergConfiguration : public StorageObjectStorage::Configuration,
412412
"DataLake can have only one key-value argument: storage_type='type'.");
413413
}
414414

415-
auto value = type_ast_function->arguments->children[1]->as<ASTLiteral>();
415+
auto * value = type_ast_function->arguments->children[1]->as<ASTLiteral>();
416416

417417
if (!value)
418418
{
@@ -451,7 +451,7 @@ class StorageIcebergConfiguration : public StorageObjectStorage::Configuration,
451451
createDynamicStorage(type);
452452
}
453453

454-
void assertInitialized() const override { return getImpl().assertInitialized(); }
454+
void assertInitialized() const override { getImpl().assertInitialized(); }
455455

456456
private:
457457
inline StorageObjectStorage::Configuration & getImpl() const

src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,10 @@ void StorageObjectStorageCluster::truncate(
510510
{
511511
/// Full query if fall back to pure storage.
512512
if (getClusterName(local_context).empty())
513-
return pure_storage->truncate(query, metadata_snapshot, local_context, lock_holder);
513+
{
514+
pure_storage->truncate(query, metadata_snapshot, local_context, lock_holder);
515+
return;
516+
}
514517

515518
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Truncate is not supported by storage {}", getName());
516519
}

src/Storages/ObjectStorage/registerStorageObjectStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ createStorageObjectStorage(const StorageFactory::Arguments & args, StorageObject
3737

3838
const auto context = args.getLocalContext();
3939

40-
std::string cluster_name = "";
40+
std::string cluster_name;
4141

4242
if (args.storage_def->settings)
4343
{

src/Storages/extractTableFunctionFromSelectQuery.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include <Parsers/IAST_fwd.h>
44
#include <Parsers/ASTFunction.h>
55
#include <Parsers/ASTExpressionList.h>
6-
#include <Parsers/ASTFunction.h>
76

87
namespace DB
98
{

0 commit comments

Comments
 (0)