Skip to content

Commit c3979a0

Browse files
committed
Fixes after code-review
1 parent af8303a commit c3979a0

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/Parsers/FunctionSecretArgumentsFinder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ class FunctionSecretArgumentsFinder
9393
{
9494
if (index >= function->arguments->size())
9595
return;
96-
index = function->arguments->getRealIndex(index);
96+
auto real_index = function->arguments->getRealIndex(index);
9797
if (!result.count)
9898
{
99-
result.start = index;
99+
result.start = real_index;
100100
result.are_named = argument_is_named;
101101
}
102-
chassert(index >= result.start); /// We always check arguments consecutively
102+
chassert(real_index >= result.start); /// We always check arguments consecutively
103103
chassert(result.replacement.empty()); /// We shouldn't use replacement with masking other arguments
104-
result.count = index + 1 - result.start;
104+
result.count = real_index + 1 - result.start;
105105
if (!argument_is_named)
106106
result.are_named = false;
107107
}

src/Storages/ObjectStorage/DataLakes/DataLakeConfiguration.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class DataLakeConfiguration : public BaseStorageConfiguration, public std::enabl
146146
};
147147

148148
#if USE_AVRO
149-
#if USE_AWS_S3
149+
# if USE_AWS_S3
150150
using StorageS3IcebergConfiguration = DataLakeConfiguration<StorageS3Configuration, IcebergMetadata>;
151151
# endif
152152

@@ -160,7 +160,8 @@ using StorageHDFSIcebergConfiguration = DataLakeConfiguration<StorageHDFSConfigu
160160

161161
using StorageLocalIcebergConfiguration = DataLakeConfiguration<StorageLocalConfiguration, IcebergMetadata>;
162162

163-
163+
/// Class detects storage type by `storage_type` parameter if exists
164+
/// and uses appropriate implementation - S3, Azure, HDFS or Local
164165
class StorageIcebergConfiguration : public StorageObjectStorage::Configuration, public std::enable_shared_from_this<StorageObjectStorage::Configuration>
165166
{
166167
friend class StorageObjectStorage::Configuration;
@@ -291,7 +292,7 @@ class StorageIcebergConfiguration : public StorageObjectStorage::Configuration,
291292
{
292293
throw Exception(
293294
ErrorCodes::BAD_ARGUMENTS,
294-
"DataLake can have only one key-value argument: storage_type=().");
295+
"DataLake can have only one key-value argument: storage_type='type'.");
295296
}
296297

297298
auto value = type_ast_function->arguments->children[1]->as<ASTLiteral>();
@@ -300,14 +301,14 @@ class StorageIcebergConfiguration : public StorageObjectStorage::Configuration,
300301
{
301302
throw Exception(
302303
ErrorCodes::BAD_ARGUMENTS,
303-
"DataLake parameter 'storage_type' has wrong type.");
304+
"DataLake parameter 'storage_type' has wrong type, string literal expected.");
304305
}
305306

306307
if (value->value.getType() != Field::Types::String)
307308
{
308309
throw Exception(
309310
ErrorCodes::BAD_ARGUMENTS,
310-
"DataLake parameter 'storage_type' has wrong value type.");
311+
"DataLake parameter 'storage_type' has wrong value type, string expected.");
311312
}
312313

313314
type = objectStorageTypeFromString(value->value.safeGet<String>());

0 commit comments

Comments
 (0)