@@ -146,7 +146,7 @@ class DataLakeConfiguration : public BaseStorageConfiguration, public std::enabl
146
146
};
147
147
148
148
#if USE_AVRO
149
- #if USE_AWS_S3
149
+ # if USE_AWS_S3
150
150
using StorageS3IcebergConfiguration = DataLakeConfiguration<StorageS3Configuration, IcebergMetadata>;
151
151
# endif
152
152
@@ -160,7 +160,8 @@ using StorageHDFSIcebergConfiguration = DataLakeConfiguration<StorageHDFSConfigu
160
160
161
161
using StorageLocalIcebergConfiguration = DataLakeConfiguration<StorageLocalConfiguration, IcebergMetadata>;
162
162
163
-
163
+ // / Class detects storage type by `storage_type` parameter if exists
164
+ // / and uses appropriate implementation - S3, Azure, HDFS or Local
164
165
class StorageIcebergConfiguration : public StorageObjectStorage ::Configuration, public std::enable_shared_from_this<StorageObjectStorage::Configuration>
165
166
{
166
167
friend class StorageObjectStorage ::Configuration;
@@ -291,7 +292,7 @@ class StorageIcebergConfiguration : public StorageObjectStorage::Configuration,
291
292
{
292
293
throw Exception (
293
294
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' ." );
295
296
}
296
297
297
298
auto value = type_ast_function->arguments ->children [1 ]->as <ASTLiteral>();
@@ -300,14 +301,14 @@ class StorageIcebergConfiguration : public StorageObjectStorage::Configuration,
300
301
{
301
302
throw Exception (
302
303
ErrorCodes::BAD_ARGUMENTS,
303
- " DataLake parameter 'storage_type' has wrong type." );
304
+ " DataLake parameter 'storage_type' has wrong type, string literal expected ." );
304
305
}
305
306
306
307
if (value->value .getType () != Field::Types::String)
307
308
{
308
309
throw Exception (
309
310
ErrorCodes::BAD_ARGUMENTS,
310
- " DataLake parameter 'storage_type' has wrong value type." );
311
+ " DataLake parameter 'storage_type' has wrong value type, string expected ." );
311
312
}
312
313
313
314
type = objectStorageTypeFromString (value->value .safeGet <String>());
0 commit comments