Skip to content

Commit 8c5a8ad

Browse files
authored
Merge pull request ClickHouse#79541 from ClickHouse/make-delta-kernel-default
Enable delta-kernel by default
2 parents d97792e + 18fbb0c commit 8c5a8ad

File tree

6 files changed

+14
-16
lines changed

6 files changed

+14
-16
lines changed

src/Core/Settings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6652,9 +6652,9 @@ Enable PRQL - an alternative to SQL.
66526652
DECLARE(Bool, enable_adaptive_memory_spill_scheduler, false, R"(
66536653
Trigger processor to spill data into external storage adpatively. grace join is supported at present.
66546654
)", EXPERIMENTAL) \
6655-
DECLARE(Bool, allow_experimental_delta_kernel_rs, false, R"(
6655+
DECLARE(Bool, allow_experimental_delta_kernel_rs, true, R"(
66566656
Allow experimental delta-kernel-rs implementation.
6657-
)", EXPERIMENTAL) \
6657+
)", BETA) \
66586658
DECLARE(Bool, make_distributed_plan, false, R"(
66596659
Make distributed query plan.
66606660
)", EXPERIMENTAL) \

src/Core/SettingsChangesHistory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const VersionToSettingsChangesMap & getSettingsChangesHistory()
8484
{"default_reader_bucket_count", 8, 8, "New experimental setting."},
8585
{"optimize_exchanges", 0, 0, "New experimental setting."},
8686
{"force_exchange_kind", "", "", "New experimental setting."},
87-
{"allow_experimental_delta_kernel_rs", false, false, "New setting"},
87+
{"allow_experimental_delta_kernel_rs", true, true, "New setting"},
8888
{"allow_experimental_database_hms_catalog", false, false, "Allow experimental database engine DataLakeCatalog with catalog_type = 'hive'"},
8989
});
9090
addSettingsChanges(settings_changes_history, "25.4",

src/Storages/ObjectStorage/DataLakes/DeltaLakeMetadata.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ namespace DB
1818
{
1919
namespace StorageObjectStorageSetting
2020
{
21-
extern const StorageObjectStorageSettingsBool allow_experimental_delta_kernel_rs;
2221
extern const StorageObjectStorageSettingsBool delta_lake_read_schema_same_as_table_schema;
2322
}
2423
namespace Setting
@@ -65,14 +64,15 @@ class DeltaLakeMetadata final : public IDataLakeMetadata
6564
{
6665
#if USE_DELTA_KERNEL_RS
6766
auto configuration_ptr = configuration.lock();
67+
6868
const auto & storage_settings_ref = configuration_ptr->getSettingsRef();
6969
const auto & query_settings_ref = local_context->getSettingsRef();
7070

71-
bool enable_delta_kernel = storage_settings_ref[StorageObjectStorageSetting::allow_experimental_delta_kernel_rs];
72-
if (query_settings_ref[Setting::allow_experimental_delta_kernel_rs].changed)
73-
enable_delta_kernel = query_settings_ref[Setting::allow_experimental_delta_kernel_rs].value;
71+
const auto storage_type = configuration_ptr->getType();
72+
const bool supports_delta_kernel = storage_type == ObjectStorageType::S3 || storage_type == ObjectStorageType::Local;
7473

75-
if (enable_delta_kernel)
74+
bool enable_delta_kernel = query_settings_ref[Setting::allow_experimental_delta_kernel_rs];
75+
if (supports_delta_kernel && enable_delta_kernel)
7676
{
7777
return std::make_unique<DeltaLakeMetadataDeltaKernel>(
7878
object_storage,

src/Storages/ObjectStorage/StorageObjectStorageSettings.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ class SettingsChanges;
4949
#define STORAGE_OBJECT_STORAGE_RELATED_SETTINGS(DECLARE, ALIAS) \
5050
DECLARE(Bool, allow_dynamic_metadata_for_data_lakes, false, R"(
5151
If enabled, indicates that metadata is taken from iceberg specification that is pulled from cloud before each query.
52-
)", 0) \
53-
DECLARE(Bool, allow_experimental_delta_kernel_rs, false, R"(
54-
If enabled, the engine would use delta-kernel-rs for DeltaLake metadata parsing
5552
)", 0) \
5653
DECLARE(Bool, delta_lake_read_schema_same_as_table_schema, false, R"(
5754
Whether delta-lake read schema is the same as table schema.
@@ -69,6 +66,9 @@ If enabled, the engine would use the metadata file with the most recent last_upd
6966
Get latest metadata path from version-hint.text file.
7067
)", 0) \
7168

69+
#define OBSOLETE_SETTINGS(M, ALIAS) \
70+
MAKE_OBSOLETE(M, Bool, allow_experimental_delta_kernel_rs, true) \
71+
7272
// clang-format on
7373

7474
STORAGE_OBJECT_STORAGE_SETTINGS_SUPPORTED_TYPES(StorageObjectStorageSettings, DECLARE_SETTING_TRAIT)
@@ -98,6 +98,7 @@ using StorageObjectStorageSettingsPtr = std::shared_ptr<StorageObjectStorageSett
9898

9999
#define LIST_OF_STORAGE_OBJECT_STORAGE_SETTINGS(M, ALIAS) \
100100
STORAGE_OBJECT_STORAGE_RELATED_SETTINGS(M, ALIAS) \
101+
OBSOLETE_SETTINGS(M, ALIAS) \
101102
LIST_OF_ALL_FORMAT_SETTINGS(M, ALIAS)
102103

103104
}

tests/integration/test_database_delta/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def test_complex_table_schema(started_cluster, use_delta_kernel):
216216
)
217217
complex_data = (
218218
node1.query(
219-
f"SELECT * FROM complex_schema.`{schema_name}.{table_name}`"
219+
f"SELECT * FROM complex_schema.`{schema_name}.{table_name}`", settings={"allow_experimental_delta_kernel_rs": use_delta_kernel}
220220
)
221221
.strip()
222222
.split("\t")

tests/integration/test_mask_sensitive_info/test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,7 @@ def test_create_table():
260260
f"S3(named_collection_6, url = 'http://minio1:9001/root/data/test8.csv', access_key_id = 'minio', secret_access_key = '{password}', format = 'CSV')",
261261
f"S3('http://minio1:9001/root/data/test9.csv.gz', 'NOSIGN', 'CSV', 'gzip')",
262262
f"S3('http://minio1:9001/root/data/test10.csv.gz', 'minio', '{password}')",
263-
(
264-
f"DeltaLake('http://minio1:9001/root/data/test11.csv.gz', 'minio', '{password}')",
265-
"DNS_ERROR",
266-
),
263+
f"DeltaLake('http://minio1:9001/root/data/test11.csv.gz', 'minio', '{password}')",
267264
f"S3Queue('http://minio1:9001/root/data/', 'CSV') settings mode = 'ordered'",
268265
f"S3Queue('http://minio1:9001/root/data/', 'CSV', 'gzip') settings mode = 'ordered'",
269266
f"S3Queue('http://minio1:9001/root/data/', 'minio', '{password}', 'CSV') settings mode = 'ordered'",

0 commit comments

Comments
 (0)