diff --git a/src/Parsers/FieldFromAST.cpp b/src/Parsers/FieldFromAST.cpp index a81bf45a8be..ad1eab49eeb 100644 --- a/src/Parsers/FieldFromAST.cpp +++ b/src/Parsers/FieldFromAST.cpp @@ -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) diff --git a/tests/integration/test_disk_configuration/test.py b/tests/integration/test_disk_configuration/test.py index 3fe8286fa43..c003ff85755 100644 --- a/tests/integration/test_disk_configuration/test.py +++ b/tests/integration/test_disk_configuration/test.py @@ -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()