Fix confusing cluster name and named collection name in cluster functions #1234
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Solved #1228
Fix confusing cluster name and named collection name in cluster functions
Documentation entry for user-facing changes
This query failed with error
There is no named collection 'cluster'but next queries works:
In query
first argument is a cluster name, second is a named collection name with storage parameters.
icebergClustertable function also can have named argumentstorage_typewith type of storage -s3/azure/hdfs/local.By default
storage_typeiss3to backward compatibility,icebergClusterwas an alias foricebergS3Cluster.If
storage_typeis not found in arguments, clickhouse tries to find it in named collection. This must be on early stage to select proper realization -icebergS3Cluster,icebergAzureCluster, etc.So code tries to find named collection name in argument list, and interpret first identifier argument as name: https://github.com/Altinity/ClickHouse/blob/antalya-25.8/src/Storages/NamedCollectionsHelpers.cpp#L30
But in list
cluster, connectioncluster name is also identifier, and code chooses it as name of collection.In this fix known cluster name is removed from arguments before named collection finding.
CI/CD Options
Exclude tests:
Regression jobs to run: