Merge pull request #63756 from ClickHouse/fix-disk-hidden-arg

Do not hide disk name
This commit is contained in:
Kseniia Sumarokova 2024-05-14 19:47:20 +00:00 committed by GitHub
commit fab4217293
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -51,7 +51,7 @@ public:
{
/// We allow to not hide type of the disk, e.g. disk(type = s3, ...)
/// and also nested disk, e.g. disk = 'disk_name'
return arg_name != "type" && arg_name != "disk";
return arg_name != "type" && arg_name != "disk" && arg_name != "name" ;
};
for (const auto & arg : disk_function_args)

View File

@ -254,6 +254,7 @@ def test_merge_tree_custom_disk_setting(start_cluster):
ORDER BY tuple()
SETTINGS
disk = disk(
name='test_name',
type=s3,
endpoint='http://minio1:9001/root/data2/',
access_key_id='minio',
@ -262,7 +263,7 @@ def test_merge_tree_custom_disk_setting(start_cluster):
)
expected = """
SETTINGS disk = disk(type = s3, endpoint = \\'[HIDDEN]\\', access_key_id = \\'[HIDDEN]\\', secret_access_key = \\'[HIDDEN]\\'), index_granularity = 8192
SETTINGS disk = disk(name = \\'test_name\\', type = s3, endpoint = \\'[HIDDEN]\\', access_key_id = \\'[HIDDEN]\\', secret_access_key = \\'[HIDDEN]\\'), index_granularity = 8192
"""
assert expected.strip() in node1.query(f"SHOW CREATE TABLE {TABLE_NAME}_4").strip()