From 32ff7d2722c8ec70e7b692d4980d09760ddbea93 Mon Sep 17 00:00:00 2001 From: kssenii Date: Fri, 15 Nov 2024 11:41:54 +0100 Subject: [PATCH] Fix build and test --- src/Databases/Iceberg/DatabaseIceberg.cpp | 12 ++++++++++++ tests/integration/test_database_iceberg/test.py | 4 +--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Databases/Iceberg/DatabaseIceberg.cpp b/src/Databases/Iceberg/DatabaseIceberg.cpp index 39ed6118af1..8f46baf0405 100644 --- a/src/Databases/Iceberg/DatabaseIceberg.cpp +++ b/src/Databases/Iceberg/DatabaseIceberg.cpp @@ -110,22 +110,34 @@ std::shared_ptr DatabaseIceberg::getConfigu { switch (settings[DatabaseIcebergSetting::storage_type].value) { +#if USE_AWS_S3 case DB::DatabaseIcebergStorageType::S3: { return std::make_shared(); } +#endif +#if USE_AZURE_BLOB_STORAGE case DB::DatabaseIcebergStorageType::Azure: { return std::make_shared(); } +#endif +#if USE_HDFS case DB::DatabaseIcebergStorageType::HDFS: { return std::make_shared(); } +#endif case DB::DatabaseIcebergStorageType::Local: { return std::make_shared(); } +#if !USE_AWS_S3 || !USE_AZURE_BLOB_STORAGE || !USE_HDFS + default: + throw Exception(ErrorCodes::BAD_ARGUMENTS, + "Server does not contain support for storage type {}", + settings[DatabaseIcebergSetting::storage_type].value); +#endif } } diff --git a/tests/integration/test_database_iceberg/test.py b/tests/integration/test_database_iceberg/test.py index 310880c282a..51d89444c2e 100644 --- a/tests/integration/test_database_iceberg/test.py +++ b/tests/integration/test_database_iceberg/test.py @@ -242,13 +242,11 @@ def test_many_namespaces(started_cluster): f"{root_namespace_1}.B.C", f"{root_namespace_1}.B.C.D", f"{root_namespace_1}.B.C.D.E", - f"{root_namespace_1}.B.C.D.E.F", - f"{root_namespace_1}.B.C.D.E.FF", f"{root_namespace_2}", f"{root_namespace_2}.C", f"{root_namespace_2}.CC", ] - tables = ["A", "B", "C", "D", "E", "F"] + tables = ["A", "B", "C"] catalog = load_catalog_impl(started_cluster) for namespace in namespaces: